Implement atomic counter offset semantics.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27760 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich
2014-08-19 06:08:38 +00:00
parent aa657c117e
commit d78ca6297d
10 changed files with 207 additions and 66 deletions

View File

@@ -3,15 +3,22 @@ Warning, version 420 is not yet complete; most version-specific features are pre
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:18: 'atomic_uint' : atomic_uints can only be used in uniform variables or function parameters: non_uniform_counter
ERROR: 0:23: 'binding' : cannot be greater-than-or-equal to gl_MaxAtomicCounterBindings
ERROR: 0:28: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type 'layout(binding=0 ) uniform atomic_uint' and a right operand of type 'layout(binding=0 ) uniform atomic_uint' (or there is no acceptable conversion)
ERROR: 0:29: '-' : wrong operand type no operation '-' exists that takes an operand of type layout(binding=0 ) uniform atomic_uint (or there is no acceptable conversion)
ERROR: 0:18: 'atomic_uint' : layout(binding=X) is required
ERROR: 0:23: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCounterBindings
ERROR: 0:28: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type 'layout(binding=0 offset=0 ) uniform atomic_uint' and a right operand of type 'layout(binding=0 offset=0 ) uniform atomic_uint' (or there is no acceptable conversion)
ERROR: 0:29: '-' : wrong operand type no operation '-' exists that takes an operand of type layout(binding=0 offset=0 ) uniform atomic_uint (or there is no acceptable conversion)
ERROR: 0:31: '[]' : scalar integer expression required
ERROR: 0:34: 'assign' : l-value required "counter" (can't modify a uniform)
ERROR: 0:34: 'assign' : cannot convert from 'const int' to 'layout(binding=0 ) uniform atomic_uint'
ERROR: 0:34: 'assign' : cannot convert from 'const int' to 'layout(binding=0 offset=0 ) uniform atomic_uint'
ERROR: 0:37: 'atomic_uint' : atomic_uints can only be used in uniform variables or function parameters: acin
ERROR: 0:37: 'atomic_uint' : layout(binding=X) is required
ERROR: 0:38: 'atomic_uint' : atomic_uints can only be used in uniform variables or function parameters: acg
ERROR: 11 compilation errors. No code generated.
ERROR: 0:38: 'atomic_uint' : layout(binding=X) is required
ERROR: 0:40: 'atomic_uint' : layout(binding=X) is required
ERROR: 0:46: 'atomic_uint' : layout(binding=X) is required
ERROR: 0:47: 'offset' : atomic counters sharing the same offset: 12
ERROR: 0:48: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCounterBindings
ERROR: 18 compilation errors. No code generated.
Shader version: 420
@@ -28,10 +35,10 @@ ERROR: node is still EOpNull!
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:12 'counter' (layout(binding=0 offset=0 ) uniform atomic_uint)
0:13 Branch: Return with expression
0:13 Function Call: atomicCounter(au1; (uint)
0:13 'counter' (layout(binding=0 ) uniform atomic_uint)
0:13 'counter' (layout(binding=0 offset=0 ) uniform atomic_uint)
0:16 Function Definition: main( (void)
0:16 Function Parameters:
0:? Sequence
@@ -39,17 +46,17 @@ ERROR: node is still EOpNull!
0:19 move second child to first child (uint)
0:19 'val' (uint)
0:19 Function Call: atomicCounter(au1; (uint)
0:19 'counter' (layout(binding=0 ) uniform atomic_uint)
0:19 'counter' (layout(binding=0 offset=0 ) uniform atomic_uint)
0:20 Function Call: atomicCounterDecrement(au1; (uint)
0:20 'counter' (layout(binding=0 ) uniform atomic_uint)
0:20 'counter' (layout(binding=0 offset=0 ) uniform atomic_uint)
0:26 Function Definition: opac( (void)
0:26 Function Parameters:
0:28 Sequence
0:28 'counter' (layout(binding=0 ) uniform atomic_uint)
0:29 'counter' (layout(binding=0 ) uniform atomic_uint)
0:28 'counter' (layout(binding=0 offset=0 ) uniform atomic_uint)
0:29 'counter' (layout(binding=0 offset=0 ) uniform atomic_uint)
0:31 indirect index (int)
0:31 'a' (3-element array of int)
0:31 'counter' (layout(binding=0 ) uniform atomic_uint)
0:31 'counter' (layout(binding=0 offset=0 ) uniform atomic_uint)
0:32 direct index (layout(binding=1 offset=3 ) atomic_uint)
0:32 'countArr' (layout(binding=1 offset=3 ) uniform 4-element array of atomic_uint)
0:32 Constant:
@@ -57,13 +64,21 @@ ERROR: node is still EOpNull!
0:33 indirect index (layout(binding=1 offset=3 ) atomic_uint)
0:33 'countArr' (layout(binding=1 offset=3 ) uniform 4-element array of atomic_uint)
0:33 'i' (uniform int)
0:34 'counter' (layout(binding=0 ) uniform atomic_uint)
0:34 'counter' (layout(binding=0 offset=0 ) uniform atomic_uint)
0:? Linker Objects
0:? 'counter' (layout(binding=0 ) uniform atomic_uint)
0:? 'counter' (layout(binding=0 offset=0 ) uniform atomic_uint)
0:? 'countArr' (layout(binding=1 offset=3 ) uniform 4-element array of atomic_uint)
0:? 'i' (uniform int)
0:? 'acin' (smooth in atomic_uint)
0:? 'acg' (atomic_uint)
0:? 'aNoBind' (uniform atomic_uint)
0:? 'aOffset' (layout(binding=0 offset=32 ) uniform atomic_uint)
0:? 'bar3' (layout(binding=0 offset=4 ) uniform atomic_uint)
0:? 'ac' (layout(binding=0 offset=8 ) uniform 3-element array of atomic_uint)
0:? 'ad' (layout(binding=0 offset=20 ) uniform atomic_uint)
0:? 'bar4' (layout(offset=8 ) uniform atomic_uint)
0:? 'overlap' (layout(binding=0 offset=12 ) uniform atomic_uint)
0:? 'bigBind' (layout(binding=20 ) uniform atomic_uint)
Linked fragment stage:
@@ -83,10 +98,10 @@ ERROR: node is still EOpNull!
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:12 'counter' (layout(binding=0 offset=0 ) uniform atomic_uint)
0:13 Branch: Return with expression
0:13 Function Call: atomicCounter(au1; (uint)
0:13 'counter' (layout(binding=0 ) uniform atomic_uint)
0:13 'counter' (layout(binding=0 offset=0 ) uniform atomic_uint)
0:16 Function Definition: main( (void)
0:16 Function Parameters:
0:? Sequence
@@ -94,17 +109,17 @@ ERROR: node is still EOpNull!
0:19 move second child to first child (uint)
0:19 'val' (uint)
0:19 Function Call: atomicCounter(au1; (uint)
0:19 'counter' (layout(binding=0 ) uniform atomic_uint)
0:19 'counter' (layout(binding=0 offset=0 ) uniform atomic_uint)
0:20 Function Call: atomicCounterDecrement(au1; (uint)
0:20 'counter' (layout(binding=0 ) uniform atomic_uint)
0:20 'counter' (layout(binding=0 offset=0 ) uniform atomic_uint)
0:26 Function Definition: opac( (void)
0:26 Function Parameters:
0:28 Sequence
0:28 'counter' (layout(binding=0 ) uniform atomic_uint)
0:29 'counter' (layout(binding=0 ) uniform atomic_uint)
0:28 'counter' (layout(binding=0 offset=0 ) uniform atomic_uint)
0:29 'counter' (layout(binding=0 offset=0 ) uniform atomic_uint)
0:31 indirect index (int)
0:31 'a' (3-element array of int)
0:31 'counter' (layout(binding=0 ) uniform atomic_uint)
0:31 'counter' (layout(binding=0 offset=0 ) uniform atomic_uint)
0:32 direct index (layout(binding=1 offset=3 ) atomic_uint)
0:32 'countArr' (layout(binding=1 offset=3 ) uniform 4-element array of atomic_uint)
0:32 Constant:
@@ -112,11 +127,19 @@ ERROR: node is still EOpNull!
0:33 indirect index (layout(binding=1 offset=3 ) atomic_uint)
0:33 'countArr' (layout(binding=1 offset=3 ) uniform 4-element array of atomic_uint)
0:33 'i' (uniform int)
0:34 'counter' (layout(binding=0 ) uniform atomic_uint)
0:34 'counter' (layout(binding=0 offset=0 ) uniform atomic_uint)
0:? Linker Objects
0:? 'counter' (layout(binding=0 ) uniform atomic_uint)
0:? 'counter' (layout(binding=0 offset=0 ) uniform atomic_uint)
0:? 'countArr' (layout(binding=1 offset=3 ) uniform 4-element array of atomic_uint)
0:? 'i' (uniform int)
0:? 'acin' (smooth in atomic_uint)
0:? 'acg' (atomic_uint)
0:? 'aNoBind' (uniform atomic_uint)
0:? 'aOffset' (layout(binding=0 offset=32 ) uniform atomic_uint)
0:? 'bar3' (layout(binding=0 offset=4 ) uniform atomic_uint)
0:? 'ac' (layout(binding=0 offset=8 ) uniform 3-element array of atomic_uint)
0:? 'ad' (layout(binding=0 offset=20 ) uniform atomic_uint)
0:? 'bar4' (layout(offset=8 ) uniform atomic_uint)
0:? 'overlap' (layout(binding=0 offset=12 ) uniform atomic_uint)
0:? 'bigBind' (layout(binding=20 ) uniform atomic_uint)