mirror of
https://github.com/RPCS3/glslang.git
synced 2024-11-23 19:29:44 +00:00
27 lines
522 B
Plaintext
27 lines
522 B
Plaintext
#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);
|
|
}
|