NVK moves closer to real RTX Ray Tracing: Mesa gains first TTU instructions for NVIDIA RT Cores
The open-source NVIDIA Vulkan driver, NVK, has secured a critical building block for hardware-accelerated ray tracing. In the Mesa 27.0-devel branch, the NAK shader compiler has received its first instructions for NVIDIA's Tree Traversal Unit (TTU). This development, alongside new NVIDIA-specific ray tracing intrinsics in the NIR intermediate representation, means the open driver can finally map the fundamental instructions required to access NVIDIA's dedicated RT hardware. While this does not mean full Vulkan ray tracing is ready for use, it establishes the essential compiler foundation needed for future implementation.
NVIDIA's RTX GPUs rely on specialized hardware to handle Bounding-Volume-Hierarchy (BVH) traversal and ray-triangle intersection tests. For a Vulkan driver to utilize these dedicated units, the shader compiler must be capable of generating the specific instructions that trigger them. This has been a significant missing piece for NVK. The recent updates to the Mesa Git repository include four interconnected changes: new NVIDIA-specific ray traversal intrinsics in NIR, the actual TTU instructions within NAK, the processing of `TTUMACROFUSE`, and a basic hardware test for these instructions.
Building the Foundation for Vulkan Ray Tracing
It is important to clarify that these patches do not constitute a complete ray tracing path. Instead, they provide the compiler groundwork necessary to eventually support key Vulkan extensions, specifically `VK_KHR_ray_query` and `VK_KHR_ray_tracing_pipeline`. The former allows ray queries from standard shader stages, while the latter defines full Vulkan ray tracing pipelines with specialized shader stages. Both are vital for modern Vulkan-based games and translation layers. Currently, NVK does not report full support for either.
Achieving full ray tracing support requires much more than just compiler instructions. Developers still need to implement acceleration structure building, memory formats, pipeline management, synchronization, and various other hardware-level details. However, without this compiler support for TTU instructions, the RT Cores simply cannot be utilized effectively. This makes the current update a strategic necessity for the project.
The Long-term Impact for Linux Gaming
NVK has made significant strides in recent years, now officially supporting architectures from Kepler up to Ada, as well as consumer Blackwell GPUs. It is also Vulkan 1.4 compliant for supported hardware. While ray tracing remains a major gap compared to NVIDIA's proprietary Linux driver, this TTU support is a major step toward closing that divide. If NVK can implement full Vulkan RT extensions, Linux games could eventually access RTX hardware without needing the proprietary driver. This would also benefit compatibility layers like Proton and VKD3D-Proton, provided the open-source implementation becomes sufficiently complete and performant.
At this stage, it is too early to draw conclusions regarding performance. Compiler support is not a guarantee of optimal traversal, memory access, or shader scheduling. Furthermore, the implementation must account for the architectural differences between Turing, Ampere, Ada, and Blackwell. Initial functional implementations are likely to be significantly slower than the proprietary driver until the implementation is fully optimized.