Partial implementation of atomic counters.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27701 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
20
Test/atomic_uint.frag
Normal file
20
Test/atomic_uint.frag
Normal file
@@ -0,0 +1,20 @@
|
||||
#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;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
atomic_uint non_uniform_counter; // ERROR
|
||||
uint val = atomicCounter(counter);
|
||||
atomicCounterDecrement(counter);
|
||||
}
|
||||
68
Test/baseResults/atomic_uint.frag.out
Normal file
68
Test/baseResults/atomic_uint.frag.out
Normal file
@@ -0,0 +1,68 @@
|
||||
atomic_uint.frag
|
||||
Warning, version 420 is not yet complete; most version-specific features are present, but some are missing.
|
||||
ERROR: 0:10: 'atomic_uint' : samplers and atomic_uints cannot be output parameters
|
||||
ERROR: 0:12: 'return' : type does not match, or is not convertible to, the function's return type
|
||||
ERROR: 0:17: 'atomic_uint' : atomic_uints can only be used in uniform variables or function parameters: non_uniform_counter
|
||||
ERROR: 3 compilation errors. No code generated.
|
||||
|
||||
|
||||
Shader version: 420
|
||||
ERROR: node is still EOpNull!
|
||||
0:5 Function Definition: func(au1; (uint)
|
||||
0:5 Function Parameters:
|
||||
0:5 'c' (in atomic_uint)
|
||||
0:7 Sequence
|
||||
0:7 Branch: Return with expression
|
||||
0:7 Function Call: atomicCounterIncrement(au1; (uint)
|
||||
0:7 'c' (in atomic_uint)
|
||||
0:10 Function Definition: func2(au1; (uint)
|
||||
0:10 Function Parameters:
|
||||
0:10 'c' (out atomic_uint)
|
||||
0:12 Sequence
|
||||
0:12 Branch: Return with expression
|
||||
0:12 'counter' (layout(binding=0 ) uniform atomic_uint)
|
||||
0:15 Function Definition: main( (void)
|
||||
0:15 Function Parameters:
|
||||
0:? Sequence
|
||||
0:18 Sequence
|
||||
0:18 move second child to first child (uint)
|
||||
0:18 'val' (uint)
|
||||
0:18 Function Call: atomicCounter(au1; (uint)
|
||||
0:18 'counter' (layout(binding=0 ) uniform atomic_uint)
|
||||
0:19 Function Call: atomicCounterDecrement(au1; (uint)
|
||||
0:19 'counter' (layout(binding=0 ) uniform atomic_uint)
|
||||
0:? Linker Objects
|
||||
0:? 'counter' (layout(binding=0 ) uniform atomic_uint)
|
||||
|
||||
|
||||
Linked fragment stage:
|
||||
|
||||
|
||||
Shader version: 420
|
||||
ERROR: node is still EOpNull!
|
||||
0:5 Function Definition: func(au1; (uint)
|
||||
0:5 Function Parameters:
|
||||
0:5 'c' (in atomic_uint)
|
||||
0:7 Sequence
|
||||
0:7 Branch: Return with expression
|
||||
0:7 Function Call: atomicCounterIncrement(au1; (uint)
|
||||
0:7 'c' (in atomic_uint)
|
||||
0:10 Function Definition: func2(au1; (uint)
|
||||
0:10 Function Parameters:
|
||||
0:10 'c' (out atomic_uint)
|
||||
0:12 Sequence
|
||||
0:12 Branch: Return with expression
|
||||
0:12 'counter' (layout(binding=0 ) uniform atomic_uint)
|
||||
0:15 Function Definition: main( (void)
|
||||
0:15 Function Parameters:
|
||||
0:? Sequence
|
||||
0:18 Sequence
|
||||
0:18 move second child to first child (uint)
|
||||
0:18 'val' (uint)
|
||||
0:18 Function Call: atomicCounter(au1; (uint)
|
||||
0:18 'counter' (layout(binding=0 ) uniform atomic_uint)
|
||||
0:19 Function Call: atomicCounterDecrement(au1; (uint)
|
||||
0:19 'counter' (layout(binding=0 ) uniform atomic_uint)
|
||||
0:? Linker Objects
|
||||
0:? 'counter' (layout(binding=0 ) uniform atomic_uint)
|
||||
|
||||
@@ -18,9 +18,7 @@ ERROR: 0:50: 'stream' : there is no such layout identifier for this stage taking
|
||||
ERROR: 0:55: 'stream' : there is no such layout identifier for this stage taking an assigned value
|
||||
ERROR: 0:80: 's17' : redefinition
|
||||
ERROR: 0:85: 'uniform buffer-member offset' : not supported for this version or the enabled extensions
|
||||
ERROR: 0:85: 'binding' : requires block, or sampler/image, or atomic-counter type
|
||||
ERROR: 0:85: 'offset' : cannot specify on a variable declaration
|
||||
ERROR: 0:87: 'binding' : requires block, or sampler/image, or atomic-counter type
|
||||
ERROR: 0:89: 'uniform buffer-member offset' : not supported for this version or the enabled extensions
|
||||
WARNING: 0:89: 'layout' : useless application of layout qualifier
|
||||
ERROR: 0:91: 'bar' : redefinition
|
||||
@@ -28,9 +26,6 @@ ERROR: 0:92: 'uniform buffer-member offset' : not supported for this version or
|
||||
ERROR: 0:92: 'bar' : redefinition
|
||||
ERROR: 0:94: 'uniform buffer-member offset' : not supported for this version or the enabled extensions
|
||||
ERROR: 0:94: 'a2' : redefinition
|
||||
ERROR: 0:95: 'binding' : requires block, or sampler/image, or atomic-counter type
|
||||
ERROR: 0:96: 'binding' : requires block, or sampler/image, or atomic-counter type
|
||||
ERROR: 0:97: 'binding' : requires block, or sampler/image, or atomic-counter type
|
||||
ERROR: 0:106: '' : vertex input cannot be further qualified
|
||||
ERROR: 0:106: 'redeclaration' : cannot change storage, memory, or auxiliary qualification of gl_FrontColor
|
||||
ERROR: 0:112: 'ColorIvn' : identifier not previously declared
|
||||
@@ -43,7 +38,7 @@ ERROR: 0:170: 'coherent' : argument cannot drop memory qualifier when passed to
|
||||
ERROR: 0:192: 'constructor' : constructing from a non-dereferenced array
|
||||
ERROR: 0:193: 'constructor' : constructing from a non-dereferenced array
|
||||
ERROR: 0:194: 'constructor' : constructing from a non-dereferenced array
|
||||
ERROR: 41 compilation errors. No code generated.
|
||||
ERROR: 36 compilation errors. No code generated.
|
||||
|
||||
|
||||
Shader version: 430
|
||||
@@ -294,11 +289,11 @@ ERROR: node is still EOpNull!
|
||||
0:? 'anon@3' (layout(row_major std140 ) uniform block{layout(row_major std140 offset=0 ) uniform 4X4 matrix of float M1, layout(column_major std140 offset=64 ) uniform 4X4 matrix of float M2, layout(row_major std140 offset=128 ) uniform 3X3 matrix of float N1})
|
||||
0:? 'anon@4' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform 4X4 matrix of float M13, layout(row_major shared ) uniform 4X4 matrix of float m14, layout(column_major shared ) uniform 3X3 matrix of float N12})
|
||||
0:? 's17' (layout(binding=3 ) uniform sampler2D)
|
||||
0:? 'a2' (layout(binding=2 offset=4 ) uniform int)
|
||||
0:? 'bar' (layout(binding=2 ) uniform int)
|
||||
0:? 'b2' (layout(binding=2 ) uniform int)
|
||||
0:? 'c2' (layout(binding=3 ) uniform int)
|
||||
0:? 'd2' (layout(binding=2 ) uniform int)
|
||||
0:? 'a2' (layout(binding=2 offset=4 ) uniform atomic_uint)
|
||||
0:? 'bar' (layout(binding=2 ) uniform atomic_uint)
|
||||
0:? 'b2' (layout(binding=2 ) uniform atomic_uint)
|
||||
0:? 'c2' (layout(binding=3 ) uniform atomic_uint)
|
||||
0:? 'd2' (layout(binding=2 ) uniform atomic_uint)
|
||||
0:? 'anon@5' (out block{invariant gl_Position 4-component vector of float gl_Position, gl_PointSize float gl_PointSize, out implicitly-sized array of float gl_ClipDistance, gl_ClipVertex 4-component vector of float gl_ClipVertex, flat out 4-component vector of float gl_FrontColor, out 4-component vector of float gl_BackColor, out 4-component vector of float gl_FrontSecondaryColor, out 4-component vector of float gl_BackSecondaryColor, out implicitly-sized array of 4-component vector of float gl_TexCoord, out float gl_FogFragCoord})
|
||||
0:? 'anon@5' (out block{invariant gl_Position 4-component vector of float gl_Position, gl_PointSize float gl_PointSize, out implicitly-sized array of float gl_ClipDistance, gl_ClipVertex 4-component vector of float gl_ClipVertex, flat out 4-component vector of float gl_FrontColor, out 4-component vector of float gl_BackColor, out 4-component vector of float gl_FrontSecondaryColor, out 4-component vector of float gl_BackSecondaryColor, out implicitly-sized array of 4-component vector of float gl_TexCoord, out float gl_FogFragCoord})
|
||||
0:? 'ColorInv' (smooth out 3-component vector of float)
|
||||
@@ -570,11 +565,11 @@ ERROR: node is still EOpNull!
|
||||
0:? 'anon@3' (layout(row_major std140 ) uniform block{layout(row_major std140 offset=0 ) uniform 4X4 matrix of float M1, layout(column_major std140 offset=64 ) uniform 4X4 matrix of float M2, layout(row_major std140 offset=128 ) uniform 3X3 matrix of float N1})
|
||||
0:? 'anon@4' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform 4X4 matrix of float M13, layout(row_major shared ) uniform 4X4 matrix of float m14, layout(column_major shared ) uniform 3X3 matrix of float N12})
|
||||
0:? 's17' (layout(binding=3 ) uniform sampler2D)
|
||||
0:? 'a2' (layout(binding=2 offset=4 ) uniform int)
|
||||
0:? 'bar' (layout(binding=2 ) uniform int)
|
||||
0:? 'b2' (layout(binding=2 ) uniform int)
|
||||
0:? 'c2' (layout(binding=3 ) uniform int)
|
||||
0:? 'd2' (layout(binding=2 ) uniform int)
|
||||
0:? 'a2' (layout(binding=2 offset=4 ) uniform atomic_uint)
|
||||
0:? 'bar' (layout(binding=2 ) uniform atomic_uint)
|
||||
0:? 'b2' (layout(binding=2 ) uniform atomic_uint)
|
||||
0:? 'c2' (layout(binding=3 ) uniform atomic_uint)
|
||||
0:? 'd2' (layout(binding=2 ) uniform atomic_uint)
|
||||
0:? 'anon@5' (out block{invariant gl_Position 4-component vector of float gl_Position, gl_PointSize float gl_PointSize, out 1-element array of float gl_ClipDistance, gl_ClipVertex 4-component vector of float gl_ClipVertex, flat out 4-component vector of float gl_FrontColor, out 4-component vector of float gl_BackColor, out 4-component vector of float gl_FrontSecondaryColor, out 4-component vector of float gl_BackSecondaryColor, out 1-element array of 4-component vector of float gl_TexCoord, out float gl_FogFragCoord})
|
||||
0:? 'anon@5' (out block{invariant gl_Position 4-component vector of float gl_Position, gl_PointSize float gl_PointSize, out 1-element array of float gl_ClipDistance, gl_ClipVertex 4-component vector of float gl_ClipVertex, flat out 4-component vector of float gl_FrontColor, out 4-component vector of float gl_BackColor, out 4-component vector of float gl_FrontSecondaryColor, out 4-component vector of float gl_BackSecondaryColor, out 1-element array of 4-component vector of float gl_TexCoord, out float gl_FogFragCoord})
|
||||
0:? 'ColorInv' (smooth out 3-component vector of float)
|
||||
|
||||
@@ -69,6 +69,7 @@ numeral.frag
|
||||
440.vert
|
||||
440.frag
|
||||
dce.frag
|
||||
atomic_uint.frag
|
||||
../../LunarGLASS/test/aggOps.frag
|
||||
../../LunarGLASS/test/always-discard.frag
|
||||
../../LunarGLASS/test/always-discard2.frag
|
||||
|
||||
Reference in New Issue
Block a user