LukeShortCloud / rootpages

Root Pages is a collection of easy-to-reference tutorials and guides primarily for Linux and other UNIX-like systems.
Other
56 stars 6 forks source link

[graphics][gaming] Explain shader compilation #955

Open LukeShortCloud opened 1 year ago

LukeShortCloud commented 1 year ago

It is used to reduce lag and stutter in games by pre-compiling a shader cache.

Shaders most re-compile if any of these things change:

the kernel driver

Mesa (or the user-mode part of NVidia's proprietary driver -- but that changes in lockstep with the kernel driver anyway)

the Vulkan loader

DXVK

or the shader code itself.

https://www.reddit.com/r/linux_gaming/comments/113nzi5/comment/j8rs131/?utm_source=share&utm_medium=web2x&context=3

The shader is also not valid across different GPUs (especially if they are different vendors).