Web: Add basic atomics for SSBOs.

This commit is contained in:
John Kessenich
2019-10-18 01:03:11 -06:00
parent 3dd1ce5b54
commit e5eee8fb03
4 changed files with 60 additions and 24 deletions

View File

@@ -38,4 +38,13 @@ void main()
s[3] = vec4(0, arrX[0], arrY[0], arrZ[0]);
bInst.count = gl_NumWorkGroups + gl_WorkGroupSize + gl_WorkGroupID + gl_LocalInvocationID +
gl_GlobalInvocationID * gl_LocalInvocationIndex;
atomicAdd(bInst.size, 2);
atomicMin(bInst.size, 2);
atomicMax(bInst.size, 2);
atomicAnd(bInst.size, 2);
atomicOr(bInst.size, 2);
atomicXor(bInst.size, 2);
atomicExchange(bInst.size, 2);
atomicCompSwap(bInst.size, 5, 2);
}