Do qualifier-based checking independent of declaring a variable. Bug 11903.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@28502 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
@@ -46,7 +46,7 @@ float fa[]; // ERROR
|
||||
float f13;
|
||||
invariant f13; // ERROR
|
||||
struct S { int a; };
|
||||
invariant S;
|
||||
invariant S; // ERROR, not an input or output
|
||||
invariant float fi; // ERROR
|
||||
varying vec4 av;
|
||||
invariant av; // okay in v100
|
||||
@@ -194,4 +194,6 @@ void badswizzle()
|
||||
a.method(); // ERROR
|
||||
}
|
||||
|
||||
#pragma STDGL invariant(all)
|
||||
|
||||
uniform samplerExternalOES badExt; // syntax ERROR
|
||||
|
||||
@@ -153,5 +153,9 @@ layout(early_fragment_tests) in; // ERROR
|
||||
#error missing GL_FRAGMENT_PRECISION_HIGH
|
||||
#endif
|
||||
|
||||
invariant in; // ERROR
|
||||
invariant in vec4; // ERROR
|
||||
invariant in vec4 fooinv; // ERROR
|
||||
|
||||
float imageBuffer; // ERROR, reserved
|
||||
float uimage2DRect; // ERROR, reserved
|
||||
|
||||
@@ -23,26 +23,31 @@ ERROR: 0:38: 'array comparison' : not supported for this version or the enabled
|
||||
ERROR: 0:40: 'switch' : Reserved word.
|
||||
ERROR: 0:40: 'switch statements' : not supported for this version or the enabled extensions
|
||||
ERROR: 0:45: '' : array size required
|
||||
ERROR: 0:47: 'invariant' : can only apply to an output or an input in a non-vertex stage
|
||||
ERROR: 0:47: 'invariant' : can only apply to an output, or to an input in a non-vertex stage
|
||||
|
||||
ERROR: 0:50: 'invariant' : can only apply to an output or an input in a non-vertex stage
|
||||
ERROR: 0:49: 'invariant' : can only apply to an output, or to an input in a non-vertex stage
|
||||
|
||||
ERROR: 0:50: 'invariant' : can only apply to an output, or to an input in a non-vertex stage
|
||||
|
||||
ERROR: 0:56: 'invariant' : not allowed in nested scope
|
||||
ERROR: 0:56: 'invariant' : can only apply to an output or an input in a non-vertex stage
|
||||
ERROR: 0:56: 'invariant' : can only apply to an output, or to an input in a non-vertex stage
|
||||
|
||||
ERROR: 0:57: 'invariant' : not allowed in nested scope
|
||||
ERROR: 0:57: 'invariant' : can only apply to an output or an input in a non-vertex stage
|
||||
ERROR: 0:57: 'invariant' : can only apply to an output, or to an input in a non-vertex stage
|
||||
|
||||
ERROR: 0:59: 'invariant' : not allowed in nested scope
|
||||
ERROR: 0:59: 'invariant' : can only apply to an output or an input in a non-vertex stage
|
||||
ERROR: 0:59: 'invariant' : can only apply to an output, or to an input in a non-vertex stage
|
||||
|
||||
ERROR: 0:63: 'invariant' : can only apply to an output or an input in a non-vertex stage
|
||||
ERROR: 0:63: 'invariant' : can only apply to an output, or to an input in a non-vertex stage
|
||||
|
||||
ERROR: 0:64: 'invariant' : can only apply to an output or an input in a non-vertex stage
|
||||
ERROR: 0:64: 'invariant' : can only apply to an output, or to an input in a non-vertex stage
|
||||
|
||||
ERROR: 0:66: 'sampler2D' : sampler/image types can only be used in uniform variables or function parameters: glob2D
|
||||
ERROR: 0:69: 'sampler2D' : sampler/image types can only be used in uniform variables or function parameters: v2D
|
||||
ERROR: 0:71: 'sampler2D' : sampler/image types can only be used in uniform variables or function parameters: vary2D
|
||||
ERROR: 0:75: 'in for stage inputs' : not supported for this version or the enabled extensions
|
||||
ERROR: 0:77: 'invariant' : can only apply to an output, or to an input in a non-vertex stage
|
||||
|
||||
ERROR: 0:75: 'g' : cannot use storage or interpolation qualifiers on structure members
|
||||
ERROR: 0:76: 'h' : cannot use storage or interpolation qualifiers on structure members
|
||||
ERROR: 0:77: 'i' : cannot use invariant qualifier on structure members
|
||||
@@ -77,8 +82,8 @@ ERROR: 0:192: '.' : cannot apply to an array: nothing
|
||||
ERROR: 0:193: '.length' : not supported for this version or the enabled extensions
|
||||
ERROR: 0:194: '.' : cannot apply to an array: method
|
||||
ERROR: 0:194: 'a' : can't use function syntax on variable
|
||||
ERROR: 0:197: '' : syntax error
|
||||
ERROR: 72 compilation errors. No code generated.
|
||||
ERROR: 0:199: '' : syntax error
|
||||
ERROR: 75 compilation errors. No code generated.
|
||||
|
||||
|
||||
Shader version: 100
|
||||
|
||||
@@ -36,9 +36,12 @@ ERROR: 0:129: 'texel offset' : value is out of range: [gl_MinProgramTexelOffset,
|
||||
ERROR: 0:129: 'texel offset' : value is out of range: [gl_MinProgramTexelOffset, gl_MaxProgramTexelOffset]
|
||||
ERROR: 0:148: 'qualifier' : cannot use auxiliary, memory, interpolation, or precision qualifier in a default qualifier declaration (declaration with no type)
|
||||
ERROR: 0:150: 'early_fragment_tests' : not supported for this version or the enabled extensions
|
||||
ERROR: 0:156: 'imageBuffer' : Reserved word.
|
||||
ERROR: 0:156: '' : syntax error
|
||||
ERROR: 39 compilation errors. No code generated.
|
||||
ERROR: 0:156: 'invariant' : can only apply to an output
|
||||
ERROR: 0:157: 'invariant' : can only apply to an output
|
||||
ERROR: 0:158: 'invariant' : can only apply to an output
|
||||
ERROR: 0:160: 'imageBuffer' : Reserved word.
|
||||
ERROR: 0:160: '' : syntax error
|
||||
ERROR: 42 compilation errors. No code generated.
|
||||
|
||||
|
||||
Shader version: 300
|
||||
@@ -390,6 +393,7 @@ ERROR: node is still EOpNull!
|
||||
0:? 'colors' (out 4-element array of lowp 4-component vector of float)
|
||||
0:? 'st1' (uniform structure{mediump int i, lowp sampler2D s})
|
||||
0:? 'st2' (uniform structure{mediump int i, lowp sampler2D s})
|
||||
0:? 'fooinv' (invariant smooth in lowp 4-component vector of float)
|
||||
|
||||
|
||||
Linked fragment stage:
|
||||
@@ -745,4 +749,5 @@ ERROR: node is still EOpNull!
|
||||
0:? 'colors' (out 4-element array of lowp 4-component vector of float)
|
||||
0:? 'st1' (uniform structure{mediump int i, lowp sampler2D s})
|
||||
0:? 'st2' (uniform structure{mediump int i, lowp sampler2D s})
|
||||
0:? 'fooinv' (invariant smooth in lowp 4-component vector of float)
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ ERROR: 0:64: '' : array size required
|
||||
ERROR: 0:65: 'implicitly-sized array in a block' : not supported with this profile: es
|
||||
ERROR: 0:67: '' : array size required
|
||||
ERROR: 0:76: 'invariant' : cannot change qualification after use
|
||||
ERROR: 0:78: 'invariant' : can only apply to an output: invIn
|
||||
ERROR: 0:78: 'invariant' : can only apply to an output
|
||||
ERROR: 0:88: 'ub2' : Cannot reuse block name within the same interface: uniform
|
||||
ERROR: 0:92: 'ub2' : Cannot reuse block name within the same interface: uniform
|
||||
ERROR: 0:96: 'ub2' : Cannot reuse block name within the same interface: uniform
|
||||
|
||||
@@ -4,6 +4,7 @@ ERROR: 0:3: 'location' : can only appy to uniform, buffer, in, or out storage qu
|
||||
ERROR: 0:7: 'in' : cannot declare an input block in a vertex shader
|
||||
ERROR: 0:7: 'location qualifier on in/out block' : not supported for this version or the enabled extensions
|
||||
ERROR: 0:8: 'location qualifier on in/out block' : not supported for this version or the enabled extensions
|
||||
ERROR: 0:23: 'invariant' : can only apply to an output
|
||||
ERROR: 0:21: 'g' : cannot use storage or interpolation qualifiers on structure members
|
||||
ERROR: 0:22: 'h' : cannot use storage or interpolation qualifiers on structure members
|
||||
ERROR: 0:23: 'i' : cannot use invariant qualifier on structure members
|
||||
@@ -58,7 +59,7 @@ ERROR: 0:168: 'textureSamples and imageSamples' : not supported for this version
|
||||
ERROR: 0:169: 'textureSamples and imageSamples' : not supported for this version or the enabled extensions
|
||||
ERROR: 0:170: 'textureSamples and imageSamples' : not supported for this version or the enabled extensions
|
||||
ERROR: 0:171: 'textureSamples and imageSamples' : not supported for this version or the enabled extensions
|
||||
ERROR: 58 compilation errors. No code generated.
|
||||
ERROR: 59 compilation errors. No code generated.
|
||||
|
||||
|
||||
Shader version: 430
|
||||
|
||||
@@ -4,7 +4,7 @@ ERROR: 0:6: '=' : cannot convert from 'const uint' to 'int'
|
||||
ERROR: 0:20: '' : numeric literal too big
|
||||
ERROR: 0:21: '' : hexidecimal literal too big
|
||||
ERROR: 0:37: 'view' : redefinition
|
||||
ERROR: 0:63: 'invariant' : can only apply to an output: Color
|
||||
ERROR: 0:63: 'invariant' : can only apply to an output
|
||||
ERROR: 0:68: 'lightPosition' : redefinition
|
||||
ERROR: 0:75: 'Atten' : member storage qualifier cannot contradict block storage qualifier
|
||||
ERROR: 0:87: 'Color' : redefinition
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
switch.frag
|
||||
ERROR: 0:11: 'switch' : condition must be a scalar integer expression
|
||||
ERROR: 0:14: 'switch' : condition must be a scalar integer expression
|
||||
WARNING: 0:21: 'switch' : last case/default label not be followed by statements
|
||||
WARNING: 0:21: 'switch' : last case/default label not followed by statements
|
||||
ERROR: 0:28: 'switch' : cannot have statements before first case/default label
|
||||
ERROR: 0:43: 'default' : duplicate label
|
||||
ERROR: 0:63: 'case' : duplicated value
|
||||
@@ -15,7 +15,7 @@ ERROR: 0:115: 'default' : cannot be nested inside control flow
|
||||
ERROR: 0:119: 'case' : cannot appear outside switch statement
|
||||
ERROR: 0:120: 'default' : cannot appear outside switch statement
|
||||
ERROR: 0:126: 'onlyInSwitch' : undeclared identifier
|
||||
WARNING: 0:128: 'switch' : last case/default label not be followed by statements
|
||||
WARNING: 0:128: 'switch' : last case/default label not followed by statements
|
||||
ERROR: 0:140: 'nestedX' : undeclared identifier
|
||||
ERROR: 0:156: 'nestedZ' : undeclared identifier
|
||||
ERROR: 17 compilation errors. No code generated.
|
||||
|
||||
Reference in New Issue
Block a user