25 More Patches Further Improve RADV's Ray-Tracing For Complex Games
Daniel Schürmann's latest work improving the Mesa Radeon Vulkan driver's ray-tracing support is re-implementing the RT path using separate shader compilation for the recursive stages. Friedrich Vock also worked on some of this code and summed up the overall impact in one of the merge request comments:
"This MR doesn't primarily benefit runtime performance in itself, but rather reworks the compiling part of RT shaders. Previously, we would combine all different parts of the raytracing pipeline into a single big shader.
However, the Vulkan API explicitly has the concept of "pipeline libraries", which you can think of as parts of the pipeline that are compiled separately, and can then be combined/linked together in a big pipeline that you can run raytracing with. Our approach of single megashaders doesn't work here, because we can't actually precompile much without having all of the parts together. Big games/engines often heavily use pipeline libraries, and the single megashader solution doesn't really work for these.
This MR splits that megashader up into separate parts, where we can compile more things at the time the pipeline libraries are created. This should help said big games/engines, and also fix some issues where RADV was crashing on behaviour that is actually valid and expected.
All of that applies to both emulated and HW-accelerated raytracing."
It's another step in the right direction for improving Vulkan ray-tracing support with this Mesa RADV driver that is preferred by Valve and tends to be most popular with AMD Linux gamers rather than using the AMDVLK alternative.
This latest RADV RT work and more will be found in the Mesa 23.2 release that should be out as stable around the end of August. See the merge request if interested in more details on this RT code rework.