Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about NVIDIA shader cache #4014

Closed
Tiagoquix opened this issue May 19, 2024 · 2 comments
Closed

Question about NVIDIA shader cache #4014

Tiagoquix opened this issue May 19, 2024 · 2 comments
Labels

Comments

@Tiagoquix
Copy link
Contributor

Tiagoquix commented May 19, 2024

Hi there.

In version 2.0, the following was stated:

On Nvidia drivers, the on-disk shader cache will be significantly larger than with previous versions of DXVK. It may be necessary to bypass the size limit by setting the environment variable __GL_SHADER_DISK_CACHE_SKIP_CLEANUP=1, or setting a new limit manually via __GL_SHADER_DISK_CACHE_SIZE (in bytes).

In NVIDIA Beta driver version 460, the default was changed from 128 MB to 1024 MB:

Increased the default size for new OpenGL/Vulkan Shader Disk Cache location to 1024MB. Note that caches with paths containing "/.nv/ will continue to use the previous default of 128MB unless the size is manually overridden. For more information see the "OpenGL Shader Disk Cache" section in the "Specifying OpenGL Environment Variable Settings" chapter of the README.

Taking this into consideration, is it still necessary or recommended that NVIDIA users on Linux increase the cache size globally?

I primarily play games via Steam using Proton-GE.

I haven't had any problems with cache generation so far, but I would like to know if, somehow, DXVK's information about increasing the cache is still relevant to this day or if DXVK/Proton somehow already remedy this (for example, by setting the variable for specific games or creating a per-game cache folder isolated from the system, just like Lutris does).

To be clear, I'm not talking about Steam shader pre-caching. When it's turned off, it's the system that compiles the shaders, and that's what I'm talking about.

Considering that such information about increasing cache size is still relevant, and considering that nothing has been done on the DXVK/Proton side (I'm not saying nothing has been done; I'm just hypothesizing as I'm not sure), shouldn't then DXVK or Proton do something about it, since it seems like there isn't much cooperation, so far, from NVIDIA's side?

Thanks in advance for your attention.

@K0bin K0bin added the question label May 19, 2024
@thanhdoan1201
Copy link

image
i always set unlimited cache folder and i no care global settings

@doitsujin
Copy link
Owner

1GB is probably good enough for most games but there's still plenty of examples where it just isn't; I'd expect any modern D3D11 game with >20k shaders to run into issues. The nasty thing about GPL is that it essentially doubles the number of pipelines that need to be cached, and even if the driver tries to deduplicate things (not sure if it does) there will always be scenarios where doing so just isn't possible.

I'd also expect almost all recent D3D12 games to need significantly more storage than this, but for different reasons. Those just tend to ship significantly more and significantly bigger shaders than your average D3D11 one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants