RADV Adds Knobs To Force Shader Re-Compilation - Helping Games On The Steam Deck
Valve's Steam Deck is a heavy user of relying on pre-compiled shaders to yield quicker start times and a more efficient handheld gaming experience. But in cases where bugs happen and a shader compiler fix needs to be back-ported, there isn't a straight-forward means of properly handling that for the Steam Deck. But with new knobs being added to the Mesa RADV driver code, there will be some options for better dealing with this moving forward.
In cases where wanting to force RADV shaders to be re-compiled, namely for back-porting fixes and the like, there are some new DRIRC options added to Mesa 24.0-devel to easily force the re-compilation that can be targeted at specific games.
Prolific RADV contributor Samuel Pitoiset of Valve's Linux graphics driver team added the new DRIRC options for making it easier to force shader re-compilation for specific game(s) shaders when needed. He explained in the code merge that hit Mesa Git this morning:
A nice, straight-forward improvement for RADV to better deal with shader issues on a per-game basis. This change will presumably be back-ported for SteamOS and be working its way to Steam Deck devices shortly. This is a change that is also beneficial to the Linux desktop/gaming at large.
In cases where wanting to force RADV shaders to be re-compiled, namely for back-porting fixes and the like, there are some new DRIRC options added to Mesa 24.0-devel to easily force the re-compilation that can be targeted at specific games.
Prolific RADV contributor Samuel Pitoiset of Valve's Linux graphics driver team added the new DRIRC options for making it easier to force shader re-compilation for specific game(s) shaders when needed. He explained in the code merge that hit Mesa Git this morning:
radv: add drirc options to force re-compilation of shaders when needed
On Steam Deck, shaders are pre-compiled for better performance (less stuttering, less CPU usage, etc). But when a compiler fix needs to be backported, there is currently no way to handle this properly.
This introduces 3 drirc options radv_override_{graphics,compute,ray_tracing}_shader_version in order to force the driver to re-compile pipelines when needed. By default, the shader version is 0 for all pipelines.
When one drirc is set for a specific game, RADV will re-compile all pipelines only once with the compiler fix included (because the pipeline key would be different).
A nice, straight-forward improvement for RADV to better deal with shader issues on a per-game basis. This change will presumably be back-ported for SteamOS and be working its way to Steam Deck devices shortly. This is a change that is also beneficial to the Linux desktop/gaming at large.
19 Comments