I try to use atomic operations on shared memory in a task shader with GL_NV_mesh_shader extension enabled.
My understanding from the Extension GL_NV_mesh_shader description is, that doing this should work. It works in Compute Shaders.
The program won’t compile because there’s an exception thrown from nvoglv64.dll when calling glCreateShaderProgramv with type GL_TASK_SHADER_NV or GL_MESH_SHADER_NV.
Here is a minimal example of such a task shader:
Task Shader Code
#version 450
#extension GL_NV_mesh_shader : require
layout(local_size_x=32) in;
shared uint test;
void main()
{
atomicAdd(test, 1u);
gl_TaskCountNV = 32;
}
If this is not supported, I think it’s not clear that it is not.
If this should be supported, then it may be a bug.