You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
522 B

#version 450
layout(binding = 0) uniform atomic_uint counter;
layout(binding = 0, offset = 4) uniform atomic_uint countArr[4];
shared uint value;
int arrX[gl_WorkGroupSize.x];
int arrY[gl_WorkGroupSize.y];
int arrZ[gl_WorkGroupSize.z];
uint func(atomic_uint c)
{
return atomicCounterIncrement(c);
}
void main()
{
memoryBarrierAtomicCounter();
func(counter);
uint val = atomicCounter(countArr[2]);
atomicCounterDecrement(counter);
atomicCounterIncrement(counter);
}