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

Shader on-disk caching question #61

Open
Svyatpro opened this issue Apr 20, 2018 · 3 comments
Open

Shader on-disk caching question #61

Svyatpro opened this issue Apr 20, 2018 · 3 comments

Comments

@Svyatpro
Copy link

Implementing shader on-disk caching may eliminate stuttering in games and improve overall games performance.

Similar to one present in DXVK. Any ideas?
doitsujin/dxvk@ca8c96b

@IngeniousDox
Copy link

Shader caching is best done by drivers itself. Both nvidia and mesa (amd) have a good disk cache. They can cache it in GPU byte code.

It was tried in Wine Staging for OpenGL, but it was slower then driver caches by far.

It was in DXVK, but got removed (for now). Vulkan pipeline caches are basically the same as driver caches.

PS: Regarding NVidia shadercache, it has a max of 128mb atm, and needs to be increased in size: https://devtalk.nvidia.com/default/topic/1032059/linux/opengl-shader-disk-cache-max-size-garbage-collection-/

@qwertychouskie
Copy link

The only type of caching that would add something the driver doesn't already do is https://dev.wine-staging.com/patches/204/ (which seems to make a decent difference according to the comments).

@SveSop
Copy link

SveSop commented May 1, 2018

@IngeniousDox Seems as nVidia has added this to "Enhancement request tracked as NVIDIA bug 2109833", so hopefully there would atleast be a tweakable knob for this in the future.

Incase ppl are not aware, you can (and probably should) make each wine game use its own nVidia shader cache folder with something like export __GL_SHADER_DISK_CACHE_PATH="$HOME/.nv/name_of_game". ($HOME/.nv being the default nVidia shader cache folder.. dunno for radv tho)

@Svyatpro Many games have their own cache functions as it is, so adding yet another cache function would probably not be entirely beneficial (as has been experienced in both staging and dxvk), although for games/apps that do not have this, something could possibly be earned.

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

No branches or pull requests

4 participants