VK_EXT_mesh_shader is 5x slower than VK_NV_mesh_shader

Hello.

I’m trying to implement mesh shading in my pet-project. As it is 2023 and mesh shading is available via VK_EXT_MESH_SHADER I decided to stick with it and NOT use vendor specific extension. But I got disappointing results. My mesh shader (no culling, no nothing, this shader is almost identical to my vertex shader from traditional pipeline) turned out to be ~4-5x (four to five times) slower than traditional pipeline. I was impressed to say the least. But then I decided to use VK_NV_mesh_shader extension. I barely changed my C++ code to make it work. And voila - using VK_NV_mesh_shader made it faster than traditional pipeline by couple of percents. Shaders were built using DirectXShaderCompiler. So my question is: Can you please explain this weird behavior? Is it recommended by Nvidia to use VK_NV_mesh_shader?

GPU: RTX 3050 Laptop
Driver: NVIDIA Studio Driver 537.58

I guess I found what caused the performance drop. Querying VK_QUERY_PIPELINE_STATISTIC_TASK_SHADER_INVOCATIONS_BIT_EXT and VK_QUERY_PIPELINE_STATISTIC_MESH_SHADER_INVOCATIONS_BIT_EXT made it run slower. Removind these flags from VkQueryPoolCreateInfo solves the problem.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.