glslang/Test/atomic_uint.frag
John Kessenich 4d57090da5 Turn on ESSL 3.1 for most features:
- images: load/store, memory qualifiers
 - buffer blocks
 - compute shaders
 - atomic counters
 - texture gather
 - SSO
 - uniform locations
 - all the numeric-based version # comparisons


git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27710 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-08-12 22:07:22 +00:00

22 lines
411 B
GLSL

#version 420 core
layout(binding = 0) uniform atomic_uint counter;
uint func(atomic_uint c)
{
return atomicCounterIncrement(c);
}
uint func2(out atomic_uint c) // ERROR
{
return counter; // ERROR, type mismatch
return atomicCounter(counter);
}
void main()
{
atomic_uint non_uniform_counter; // ERROR
uint val = atomicCounter(counter);
atomicCounterDecrement(counter);
}