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:
@@ -36,4 +36,13 @@ void opac()
|
||||
|
||||
in atomic_uint acin; // ERROR
|
||||
atomic_uint acg; // ERROR
|
||||
|
||||
uniform atomic_uint;
|
||||
uniform atomic_uint aNoBind; // ERROR, no binding
|
||||
layout(binding=0, offset=32) uniform atomic_uint aOffset;
|
||||
layout(binding=0, offset=4) uniform atomic_uint;
|
||||
layout(binding=0) uniform atomic_uint bar3; // offset is 4
|
||||
layout(binding=0) uniform atomic_uint ac[3]; // offset = 8
|
||||
layout(binding=0) uniform atomic_uint ad; // offset = 20
|
||||
layout(offset=8) uniform atomic_uint bar4; // ERROR, no binding
|
||||
layout(binding = 0, offset = 12) uniform atomic_uint overlap; // ERROR, overlapping offsets
|
||||
layout(binding = 20) uniform atomic_uint bigBind; // ERROR, binding too big
|
||||
|
||||
@@ -38,9 +38,10 @@ ERROR: 0:119: 'r8ui' : does not apply to signed integer images
|
||||
ERROR: 0:128: 'atomic_uint' : samplers and atomic_uints cannot be output parameters
|
||||
ERROR: 0:130: 'return' : type does not match, or is not convertible to, the function's return type
|
||||
ERROR: 0:136: 'atomic_uint' : atomic_uints can only be used in uniform variables or function parameters: non_uniform_counter
|
||||
ERROR: 0:136: 'atomic_uint' : layout(binding=X) is required
|
||||
ERROR: 0:141: 'atomic_uint' : atomic counters can only be highp
|
||||
ERROR: 0:141: 'binding' : cannot be greater-than-or-equal to gl_MaxAtomicCounterBindings
|
||||
ERROR: 0:143: 'binding' : cannot be greater-than-or-equal to gl_MaxAtomicCounterBindings
|
||||
ERROR: 0:141: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCounterBindings
|
||||
ERROR: 0:143: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCounterBindings
|
||||
ERROR: 0:149: '[]' : scalar integer expression required
|
||||
ERROR: 0:166: 'precision' : can only apply highp to atomic_uint
|
||||
ERROR: 0:168: 'precise' : Reserved word.
|
||||
@@ -56,7 +57,7 @@ ERROR: 0:173: '' : image variables not declared 'writeonly' must have a format l
|
||||
ERROR: 0:174: 'uimage2DMSArray' : Reserved word.
|
||||
ERROR: 0:174: 'sampler/image' : type requires declaration of default precision qualifier
|
||||
ERROR: 0:174: '' : image variables not declared 'writeonly' must have a format layout qualifier
|
||||
ERROR: 56 compilation errors. No code generated.
|
||||
ERROR: 57 compilation errors. No code generated.
|
||||
|
||||
|
||||
Shader version: 310
|
||||
@@ -174,10 +175,10 @@ ERROR: node is still EOpNull!
|
||||
0:128 'c' (out highp atomic_uint)
|
||||
0:130 Sequence
|
||||
0:130 Branch: Return with expression
|
||||
0:130 'counter' (layout(binding=0 ) uniform highp atomic_uint)
|
||||
0:130 'counter' (layout(binding=0 offset=0 ) uniform highp atomic_uint)
|
||||
0:131 Branch: Return with expression
|
||||
0:131 Function Call: atomicCounter(au1; (highp uint)
|
||||
0:131 'counter' (layout(binding=0 ) uniform highp atomic_uint)
|
||||
0:131 'counter' (layout(binding=0 offset=0 ) uniform highp atomic_uint)
|
||||
0:134 Function Definition: mainAC( (void)
|
||||
0:134 Function Parameters:
|
||||
0:? Sequence
|
||||
@@ -185,15 +186,15 @@ ERROR: node is still EOpNull!
|
||||
0:137 move second child to first child (highp uint)
|
||||
0:137 'val' (highp uint)
|
||||
0:137 Function Call: atomicCounter(au1; (highp uint)
|
||||
0:137 'counter' (layout(binding=0 ) uniform highp atomic_uint)
|
||||
0:137 'counter' (layout(binding=0 offset=0 ) uniform highp atomic_uint)
|
||||
0:138 Function Call: atomicCounterDecrement(au1; (highp uint)
|
||||
0:138 'counter' (layout(binding=0 ) uniform highp atomic_uint)
|
||||
0:138 'counter' (layout(binding=0 offset=0 ) uniform highp atomic_uint)
|
||||
0:146 Function Definition: opac( (void)
|
||||
0:146 Function Parameters:
|
||||
0:? Sequence
|
||||
0:149 indirect index (highp int)
|
||||
0:149 'a' (3-element array of highp int)
|
||||
0:149 'counter' (layout(binding=0 ) uniform highp atomic_uint)
|
||||
0:149 'counter' (layout(binding=0 offset=0 ) uniform highp atomic_uint)
|
||||
0:150 direct index (layout(binding=2 offset=4 ) highp atomic_uint)
|
||||
0:150 'countArr' (layout(binding=2 offset=4 ) uniform 4-element array of highp atomic_uint)
|
||||
0:150 Constant:
|
||||
@@ -270,7 +271,7 @@ ERROR: node is still EOpNull!
|
||||
0:? 'i4bad' (layout(r8_snorm ) uniform highp iimage2D)
|
||||
0:? 'i5bad' (layout(rgba32ui ) uniform highp iimage2D)
|
||||
0:? 'i6bad' (layout(r8ui ) uniform highp iimage2D)
|
||||
0:? 'counter' (layout(binding=0 ) uniform highp atomic_uint)
|
||||
0:? 'counter' (layout(binding=0 offset=0 ) uniform highp atomic_uint)
|
||||
0:? 'counterBad' (layout(binding=1 ) uniform mediump atomic_uint)
|
||||
0:? 'countArr' (layout(binding=2 offset=4 ) uniform 4-element array of highp atomic_uint)
|
||||
0:? 'i' (uniform highp int)
|
||||
@@ -402,10 +403,10 @@ ERROR: node is still EOpNull!
|
||||
0:128 'c' (out highp atomic_uint)
|
||||
0:130 Sequence
|
||||
0:130 Branch: Return with expression
|
||||
0:130 'counter' (layout(binding=0 ) uniform highp atomic_uint)
|
||||
0:130 'counter' (layout(binding=0 offset=0 ) uniform highp atomic_uint)
|
||||
0:131 Branch: Return with expression
|
||||
0:131 Function Call: atomicCounter(au1; (highp uint)
|
||||
0:131 'counter' (layout(binding=0 ) uniform highp atomic_uint)
|
||||
0:131 'counter' (layout(binding=0 offset=0 ) uniform highp atomic_uint)
|
||||
0:134 Function Definition: mainAC( (void)
|
||||
0:134 Function Parameters:
|
||||
0:? Sequence
|
||||
@@ -413,15 +414,15 @@ ERROR: node is still EOpNull!
|
||||
0:137 move second child to first child (highp uint)
|
||||
0:137 'val' (highp uint)
|
||||
0:137 Function Call: atomicCounter(au1; (highp uint)
|
||||
0:137 'counter' (layout(binding=0 ) uniform highp atomic_uint)
|
||||
0:137 'counter' (layout(binding=0 offset=0 ) uniform highp atomic_uint)
|
||||
0:138 Function Call: atomicCounterDecrement(au1; (highp uint)
|
||||
0:138 'counter' (layout(binding=0 ) uniform highp atomic_uint)
|
||||
0:138 'counter' (layout(binding=0 offset=0 ) uniform highp atomic_uint)
|
||||
0:146 Function Definition: opac( (void)
|
||||
0:146 Function Parameters:
|
||||
0:? Sequence
|
||||
0:149 indirect index (highp int)
|
||||
0:149 'a' (3-element array of highp int)
|
||||
0:149 'counter' (layout(binding=0 ) uniform highp atomic_uint)
|
||||
0:149 'counter' (layout(binding=0 offset=0 ) uniform highp atomic_uint)
|
||||
0:150 direct index (layout(binding=2 offset=4 ) highp atomic_uint)
|
||||
0:150 'countArr' (layout(binding=2 offset=4 ) uniform 4-element array of highp atomic_uint)
|
||||
0:150 Constant:
|
||||
@@ -498,7 +499,7 @@ ERROR: node is still EOpNull!
|
||||
0:? 'i4bad' (layout(r8_snorm ) uniform highp iimage2D)
|
||||
0:? 'i5bad' (layout(rgba32ui ) uniform highp iimage2D)
|
||||
0:? 'i6bad' (layout(r8ui ) uniform highp iimage2D)
|
||||
0:? 'counter' (layout(binding=0 ) uniform highp atomic_uint)
|
||||
0:? 'counter' (layout(binding=0 offset=0 ) uniform highp atomic_uint)
|
||||
0:? 'counterBad' (layout(binding=1 ) uniform mediump atomic_uint)
|
||||
0:? 'countArr' (layout(binding=2 offset=4 ) uniform 4-element array of highp atomic_uint)
|
||||
0:? 'i' (uniform highp int)
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -17,15 +17,15 @@ ERROR: 0:47: 'stream' : there is no such layout identifier for this stage taking
|
||||
ERROR: 0:50: 'stream' : there is no such layout identifier for this stage taking an assigned value
|
||||
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: 'binding' : cannot be greater-than-or-equal to gl_MaxAtomicCounterBindings
|
||||
ERROR: 0:87: 'binding' : cannot be greater-than-or-equal to gl_MaxAtomicCounterBindings
|
||||
WARNING: 0:89: 'layout' : useless application of layout qualifier
|
||||
ERROR: 0:85: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCounterBindings
|
||||
ERROR: 0:87: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCounterBindings
|
||||
ERROR: 0:89: 'binding' : atomic_uint binding is too large
|
||||
ERROR: 0:91: 'bar' : redefinition
|
||||
ERROR: 0:92: 'offset' : a binding is required
|
||||
ERROR: 0:92: 'atomic_uint' : layout(binding=X) is required
|
||||
ERROR: 0:94: 'a2' : redefinition
|
||||
ERROR: 0:95: 'binding' : cannot be greater-than-or-equal to gl_MaxAtomicCounterBindings
|
||||
ERROR: 0:96: 'binding' : cannot be greater-than-or-equal to gl_MaxAtomicCounterBindings
|
||||
ERROR: 0:97: 'binding' : cannot be greater-than-or-equal to gl_MaxAtomicCounterBindings
|
||||
ERROR: 0:95: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCounterBindings
|
||||
ERROR: 0:96: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCounterBindings
|
||||
ERROR: 0:97: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCounterBindings
|
||||
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
|
||||
@@ -38,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: 36 compilation errors. No code generated.
|
||||
ERROR: 37 compilation errors. No code generated.
|
||||
|
||||
|
||||
Shader version: 430
|
||||
|
||||
Reference in New Issue
Block a user