Atomic memory function can only be used for shader storage block member or shared variable.

Signed-off-by: ZhiqianXia <xzq0528@outlook.com>
This commit is contained in:
ZhiqianXia
2021-07-12 16:57:25 +08:00
parent 4b7b86d568
commit cf52f73a0c
9 changed files with 478 additions and 2 deletions

19
Test/atomicAdd.comp Normal file
View File

@@ -0,0 +1,19 @@
#version 320 es
layout(local_size_x = 1) in;
struct structType{
int y[3];
};
layout(std430) buffer t2 {
structType f;
} t;
buffer coherent Buffer { int x; };
int z;
void main() {
atomicAdd(x, 1);
atomicAdd(t.f.y[1], 1);
atomicAdd(z, 1);
}