Vulkan + Mesh Shader seems to have wrong output in some cases

I am writing a particle system with Vulkan on my laptop (using RTX3070 laptop) , it works fine with the vertex shader, and it basically looks like below.


But when I switched to mesh shader, something strange happened. When I set local_size_x to 8, everything works fine, and no obvious problem happens. But when I set it to 16, it becomes a mess. It produces many unwanted triangles with strange shading and the result is extremely unstable. When I tried to simplify the shader, things become normal again ( I change the per vertex color data output to simply vec3(1,1,1) ).

On the other hand if I try to set the local_size_x to 32, and use:
if(thread_id>=8) return; on the front of the shader and keep everything else unchanged, then less particles are produced…

Therefore I am wondering whether the complexity of the shader will actually influence the result? Or I just make a mistake when writing the mesh shader.

The shader code is uploaded below:
portal_mesh.mesh (3.9 KB)

Thank you very much!

A screen shot of the wrong output .

Hi @570588266 you should provide a simple test project.

Hi, I have similar issues, so far seems that local_size_x is not working properly in vulkan. from several testing seems that local_size_x for some threads some times is skip or not call at all.