VOOZH about

URL: https://www.phoronix.com/news/Mesa-SPIR-V-Shader-Replacement

⇱ Mesa 25.3 Lands SPIR-V Shader Replacement Support - Phoronix


👁 Phoronix

Mesa 25.3 Lands SPIR-V Shader Replacement Support

Written by Michael Larabel in Mesa on 23 September 2025 at 06:45 AM EDT. 7 Comments
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.

👁 SPIR-V Shader Replacement


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.

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.