Vulkan Mesh Shaders To Closely Mirror Direct3D 12 Capabilities

Written by Michael Larabel in Mesa on 21 June 2022 at 01:30 PM EDT. 1 Comment
MESA --
It's been known for a while that The Khronos Group and its Vulkan working group has been working on a cross-vendor extension for mesh shaders akin to what is offered already by Direct3D 12 and with NVIDIA by their VK_NV_mesh_shader extension. A few more details about the forthcoming Vulkan mesh shader support were detailed today.

It's been publicly noted that the Vulkan working group is pursuing a cross-vendor mesh shader extension for the Vulkan API now that AMD RDNA2 GPUs and Intel Arc "Alchemist" GPUs also have the necessary support for mesh shaders, following NVIDIA's lead in this area. Mesh shaders combine vertex and primitive processing as a fundamental change to the graphics rendering pipeline. But details around the yet-to-be-published Vulkan API extension have been light. We have seen though Mesa developers working on Vulkan mesh shader preparations from the likes of Intel and the Valve developers contributing to the Radeon "RADV" driver.

Timur Kristóf of Valve's Linux graphics driver team was able to publicly confirm some details today surrounding this Vulkan mesh shader support. Most significant at a high-level is that the Vulkan mesh shader extension will closely resemble the approach and capabilities with what is available in Direct3D 12. Timur commented on the public GitHub ticket:
We agreed in Khronos that we can now share some information about the upcoming cross-vendor mesh shader extension publicly (though I can't give any promises about when it will be released). For this extension, compatibility with DirectX 12 was very important to us, therefore we follow the same main capabilities and restrictions. The shader programming model is also very similar. In a nutshell: if you can do something with DirectX mesh shaders, you will be able to also do it in Vulkan.

There are two new shader stages: mesh shaders and task shaders (optional, also known as amplification shader in DirectX), which can replace the current graphics pipeline. The new extension will support 3 dimensional dispatches (instead of 1D in NV_mesh_shader) and mesh shader outputs are more like DirectX 12 (the shader has to declare the number of output vertices/primitives first, similarly to SetMeshOutputCounts).

- Both new shader stages follow a compute-like programming model.
- Mesh shaders will support per-vertex and per-primitive output attributes. Their output is cooperatively produced by workgroups and directly consumed by the rasterizer.
- Task shaders have the main purpose of dispatching mesh shader workgroups and an optional payload output which works like shared memory.

Being so close to the Direct3D 12 mesh shader design will be beneficial for portability across APIs and also helping the likes of VKD3D-Proton with being able to efficiently map from D3D12 to Vulkan for modern Windows games.


Microsoft's simple, high-level overview of DirectX 12 mesh shaders.


There is no comment though on when this cross-vendor Vulkan mesh shader extension is expected to be made public. At least when it is made public, the Intel and RADV Mesa Vulkan drivers shouldn't be far behind in their support, and presumably NVIDIA will have a same-day beta driver.
Related News
About The Author
Author picture

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.

Popular News This Week