glslang/Test/spv.atomiAddEXT.task

27 lines
469 B
Plaintext
Raw Permalink Normal View History

#version 460
#extension GL_EXT_mesh_shader : enable
layout(local_size_x = 1) in;
struct structType{
int y[3];
};
layout(std430) buffer t2 {
structType f;
} t;
buffer coherent Buffer { int x; };
// use of storage qualifier "taskPayloadSharedEXT" in mesh shaders:
struct taskBlock {
int atom1;
};
taskPayloadSharedEXT taskBlock mytask;
void main() {
atomicAdd(x, 1);
atomicAdd(t.f.y[1], 1);
atomicAdd(mytask.atom1, 1);
}