Merged to Mesa 25.3-devel on Monday is SPIR-V shader replacement support as a new feature for helping Mesa’s Vulkan drivers in testing and debugging issues.
The latest code added to Mesa allows dumping Vulkan (SPIR-V) shaders to an arbitrary directory for capturing. Those shaders can then be inspected and modified if desired for testing purposes. Then via the SPIR-V Shader Replacement functionality that can be enabled with the “MESA_SPIRV_READ_PATH” environment variable, the desired SPIR-V shaders can be loaded in place of the original shader when there is a matching BLAKE3-based hash of the original shader code.
This documentation patch outlines all the details around the SPIR-V Shader Replacement support for Mesa Vulkan drivers and the new MESA_SPIRV_DUMP_PATH / MESA_SPIRV_READ_PATH environment variables. Again, to be clear, the primary focus here is on enhancing the testing/debugging experience of the drivers.
This merge goes into more details on the SPIR-V Shader Replacement support for the common Mesa code. This functionality will be found in the Mesa 25.3 release due out in Q4.