Add swizzles to scalars.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23580 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
8d8f4cc408
commit
8f13e1322d
8 changed files with 159 additions and 60 deletions
|
|
@ -44,6 +44,21 @@ void main()
|
|||
int kk = jj; // ERROR, jj is undeclared
|
||||
}
|
||||
|
||||
const float cx = 4.20;
|
||||
const float dx = 4.20;
|
||||
|
||||
void bar(in highp volatile vec4 v)
|
||||
{
|
||||
}
|
||||
int s;
|
||||
s.x; // okay
|
||||
s.y; // ERROR
|
||||
if (bad[0].x == cx.x)
|
||||
;
|
||||
if (cx.x == dx.x)
|
||||
badorder3 = bad[0];
|
||||
|
||||
float f;
|
||||
vec3 smeared = f.xxx;
|
||||
f.xxxxx; // ERROR
|
||||
f.xxy; // ERROR
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@ ERROR: 0:79: ':' : wrong operand types: no operation ':' exists that takes a le
|
|||
ERROR: 0:79: 'assign' : cannot convert from '4X4 matrix of float' to 'fragColor 4-component vector of float'
|
||||
ERROR: 0:82: 'xr' : illegal - vector component fields not from the same set
|
||||
ERROR: 0:83: 'xyxyx' : illegal vector field selection
|
||||
ERROR: 0:83: 'xy' : dot operator requires structure, array, vector, or matrix on left hand side
|
||||
ERROR: 0:83: 'scalar swizzle' : not supported with this profile: none
|
||||
ERROR: 0:83: 'xy' : vector field selection out of range
|
||||
ERROR: 0:84: 'z' : vector field selection out of range
|
||||
ERROR: 0:85: 'assign' : l-value required
|
||||
ERROR: 0:91: 'int' : overloaded functions must have the same return type
|
||||
|
|
@ -29,7 +30,7 @@ ERROR: 0:97: 'out' : overloaded functions must have the same parameter qualifier
|
|||
ERROR: 0:99: 'return' : function return is not matching type:
|
||||
ERROR: 0:115: 'return' : void function cannot return a value
|
||||
ERROR: 0:125: 'gl_TexCoord' : redeclaration of array with size
|
||||
ERROR: 30 compilation errors. No code generated.
|
||||
ERROR: 31 compilation errors. No code generated.
|
||||
|
||||
ERROR: node is still EOpNull!
|
||||
0:21 Function Definition: main( (void)
|
||||
|
|
|
|||
|
|
@ -17,7 +17,10 @@ ERROR: 0:40: 'j' : undeclared identifier
|
|||
ERROR: 0:40: '=' : cannot convert from 'float' to 'int'
|
||||
ERROR: 0:44: 'jj' : undeclared identifier
|
||||
ERROR: 0:44: '=' : cannot convert from 'float' to 'int'
|
||||
ERROR: 17 compilation errors. No code generated.
|
||||
ERROR: 0:54: 'y' : vector field selection out of range
|
||||
ERROR: 0:62: 'xxxxx' : illegal vector field selection
|
||||
ERROR: 0:63: 'xxy' : vector field selection out of range
|
||||
ERROR: 20 compilation errors. No code generated.
|
||||
|
||||
ERROR: node is still EOpNull!
|
||||
0:20 Function Definition: foo( (const int)
|
||||
|
|
@ -52,9 +55,43 @@ ERROR: node is still EOpNull!
|
|||
0:42 Constant:
|
||||
0:42 true (const bool)
|
||||
0:42 No loop body
|
||||
0:47 Function Definition: bar(vf4; (void)
|
||||
0:47 Function Parameters:
|
||||
0:47 'v' (in 4-component vector of float)
|
||||
0:50 Function Definition: bar(vf4; (void)
|
||||
0:50 Function Parameters:
|
||||
0:50 'v' (in 4-component vector of float)
|
||||
0:? Sequence
|
||||
0:53 's' (int)
|
||||
0:54 's' (int)
|
||||
0:55 Test condition and select (void)
|
||||
0:55 Condition
|
||||
0:55 Compare Equal (bool)
|
||||
0:55 direct index (float)
|
||||
0:55 direct index (in 4-component vector of float)
|
||||
0:55 'bad' (in 10-element array of 4-component vector of float)
|
||||
0:55 Constant:
|
||||
0:55 0 (const int)
|
||||
0:55 Constant:
|
||||
0:55 0 (const int)
|
||||
0:55 Constant:
|
||||
0:55 4.200000
|
||||
0:55 true case is null
|
||||
0:57 Test condition and select (void)
|
||||
0:57 Condition
|
||||
0:57 Constant:
|
||||
0:57 true (const bool)
|
||||
0:57 true case
|
||||
0:58 move second child to first child (4-component vector of float)
|
||||
0:58 'badorder3' (flat out 4-component vector of float)
|
||||
0:58 direct index (in 4-component vector of float)
|
||||
0:58 'bad' (in 10-element array of 4-component vector of float)
|
||||
0:58 Constant:
|
||||
0:58 0 (const int)
|
||||
0:61 Sequence
|
||||
0:61 move second child to first child (3-component vector of float)
|
||||
0:61 'smeared' (3-component vector of float)
|
||||
0:61 Construct vec3 (3-component vector of float)
|
||||
0:61 'f' (float)
|
||||
0:62 'f' (float)
|
||||
0:63 'f' (float)
|
||||
0:? Linker Objects
|
||||
0:? 'v2' (smooth out 2-component vector of float)
|
||||
0:? 'bad' (in 10-element array of 4-component vector of float)
|
||||
|
|
@ -71,6 +108,10 @@ ERROR: node is still EOpNull!
|
|||
0:? 'a' (const int)
|
||||
0:? 5 (const int)
|
||||
0:? 'b' (int)
|
||||
0:? 'cx' (const float)
|
||||
0:? 4.200000
|
||||
0:? 'dx' (const float)
|
||||
0:? 4.200000
|
||||
0:? 'gl_VertexID' (gl_VertexId int)
|
||||
0:? 'gl_InstanceID' (gl_InstanceId int)
|
||||
|
||||
|
|
|
|||
|
|
@ -32,15 +32,15 @@ ERROR: 0:172: '' : no matching overloaded function found
|
|||
ERROR: 0:175: 'x' : undeclared identifier
|
||||
ERROR: 0:175: '[]' : scalar integer expression required
|
||||
ERROR: 0:175: 'b' : left of '[' is not of type array, matrix, or vector
|
||||
ERROR: 0:175: 'a' : dot operator requires structure, array, vector, or matrix on left hand side
|
||||
ERROR: 0:175: 'length' : dot operator requires structure, array, vector, or matrix on left hand side
|
||||
ERROR: 0:175: 'a' : vector field selection out of range
|
||||
ERROR: 0:175: 'length' : illegal vector field selection
|
||||
ERROR: 0:175: '' : function call, method, or subroutine call expected
|
||||
ERROR: 0:175: '' : no matching overloaded function found
|
||||
ERROR: 0:178: '[]' : scalar integer expression required
|
||||
ERROR: 0:178: 's' : undeclared identifier
|
||||
ERROR: 0:178: 's' : left of '[' is not of type array, matrix, or vector
|
||||
ERROR: 0:178: 'a' : dot operator requires structure, array, vector, or matrix on left hand side
|
||||
ERROR: 0:178: 'length' : dot operator requires structure, array, vector, or matrix on left hand side
|
||||
ERROR: 0:178: 'a' : vector field selection out of range
|
||||
ERROR: 0:178: 'length' : illegal vector field selection
|
||||
ERROR: 0:178: '' : function call, method, or subroutine call expected
|
||||
ERROR: 0:178: '' : no matching overloaded function found
|
||||
ERROR: 0:198: 'e' : redefinition
|
||||
|
|
|
|||
|
|
@ -28,28 +28,22 @@ ERROR: 0:92: 'offset' : there is no such layout identifier taking an assigned va
|
|||
ERROR: 0:92: 'bar' : redefinition
|
||||
ERROR: 0:94: 'binding' : not supported
|
||||
ERROR: 0:94: 'offset' : there is no such layout identifier taking an assigned value
|
||||
ERROR: 0:94: 'a2' : redefinition
|
||||
ERROR: 0:95: 'binding' : not supported
|
||||
ERROR: 0:96: 'binding' : not supported
|
||||
ERROR: 0:97: 'binding' : not supported
|
||||
ERROR: 0:106: '' : vertex input cannot be further qualified
|
||||
ERROR: 0:112: 'ColorIvn' : identifier not previously declared
|
||||
ERROR: 0:119: 'a' : redefinition
|
||||
ERROR: 0:132: 'shared' : not supported in this stage: vertex
|
||||
ERROR: 0:134: '' : function does not return a value: funcA
|
||||
ERROR: 0:136: '' : function does not return a value: funcB
|
||||
ERROR: 0:137: 'rgba32f' : unrecognized layout identifier
|
||||
ERROR: 0:138: 'rgba32f' : unrecognized layout identifier
|
||||
ERROR: 0:153: '' : function does not return a value: func3
|
||||
ERROR: 0:163: 'w' : dot operator requires structure, array, vector, or matrix on left hand side
|
||||
ERROR: 0:164: 'x' : dot operator requires structure, array, vector, or matrix on left hand side
|
||||
ERROR: 0:164: 'func' : no matching overloaded function found
|
||||
ERROR: 0:166: 'x' : dot operator requires structure, array, vector, or matrix on left hand side
|
||||
ERROR: 0:166: 'func2' : no matching overloaded function found
|
||||
ERROR: 0:167: 'x' : dot operator requires structure, array, vector, or matrix on left hand side
|
||||
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: 50 compilation errors. No code generated.
|
||||
ERROR: 44 compilation errors. No code generated.
|
||||
|
||||
ERROR: node is still EOpNull!
|
||||
0:134 Function Definition: funcA(I21; (4-component vector of float)
|
||||
|
|
@ -112,9 +106,8 @@ ERROR: node is still EOpNull!
|
|||
0:160 move second child to first child (3-component vector of float)
|
||||
0:160 'r' (3-component vector of float)
|
||||
0:160 Construct vec3 (3-component vector of float)
|
||||
0:160 vector-scale (4-component vector of float)
|
||||
0:160 Convert int to float (float)
|
||||
0:160 'a' (uniform int)
|
||||
0:160 component-wise multiply (4-component vector of float)
|
||||
0:160 'a' (in 4-component vector of float)
|
||||
0:160 'b' (in 4-component vector of float)
|
||||
0:161 Sequence
|
||||
0:161 move second child to first child (3-component vector of float)
|
||||
|
|
@ -143,8 +136,10 @@ ERROR: node is still EOpNull!
|
|||
0:163 3 (const int)
|
||||
0:163 add (float)
|
||||
0:163 component-wise multiply (float)
|
||||
0:163 Convert int to float (float)
|
||||
0:163 'a' (uniform int)
|
||||
0:163 direct index (float)
|
||||
0:163 'a' (in 4-component vector of float)
|
||||
0:163 Constant:
|
||||
0:163 3 (const int)
|
||||
0:163 direct index (float)
|
||||
0:163 'b' (in 4-component vector of float)
|
||||
0:163 Constant:
|
||||
|
|
@ -163,19 +158,51 @@ ERROR: node is still EOpNull!
|
|||
0:164 'v' (smooth out 4-component vector of float)
|
||||
0:164 Constant:
|
||||
0:164 0 (const int)
|
||||
0:164 Constant:
|
||||
0:164 0.000000
|
||||
0:164 Function Call: func(f1;f1;f1;f1; (float)
|
||||
0:164 direct index (float)
|
||||
0:164 'a' (in 4-component vector of float)
|
||||
0:164 Constant:
|
||||
0:164 0 (const int)
|
||||
0:164 direct index (float)
|
||||
0:164 'b' (in 4-component vector of float)
|
||||
0:164 Constant:
|
||||
0:164 0 (const int)
|
||||
0:164 direct index (float)
|
||||
0:164 'c' (in 4-component vector of float)
|
||||
0:164 Constant:
|
||||
0:164 0 (const int)
|
||||
0:164 direct index (float)
|
||||
0:164 'd' (in 4-component vector of float)
|
||||
0:164 Constant:
|
||||
0:164 0 (const int)
|
||||
0:166 move second child to first child (float)
|
||||
0:166 direct index (float)
|
||||
0:166 'v' (smooth out 4-component vector of float)
|
||||
0:166 Constant:
|
||||
0:166 0 (const int)
|
||||
0:166 Constant:
|
||||
0:166 0.000000
|
||||
0:166 Function Call: func2(f1;f1;f1;f1; (float)
|
||||
0:166 direct index (float)
|
||||
0:166 'a' (in 4-component vector of float)
|
||||
0:166 Constant:
|
||||
0:166 0 (const int)
|
||||
0:166 direct index (float)
|
||||
0:166 'b' (in 4-component vector of float)
|
||||
0:166 Constant:
|
||||
0:166 0 (const int)
|
||||
0:166 direct index (float)
|
||||
0:166 'c' (in 4-component vector of float)
|
||||
0:166 Constant:
|
||||
0:166 0 (const int)
|
||||
0:166 direct index (float)
|
||||
0:166 'd' (in 4-component vector of float)
|
||||
0:166 Constant:
|
||||
0:166 0 (const int)
|
||||
0:167 Function Call: func3(f1;f1;f1; (float)
|
||||
0:167 component-wise multiply (float)
|
||||
0:167 Convert int to float (float)
|
||||
0:167 'a' (uniform int)
|
||||
0:167 direct index (float)
|
||||
0:167 'a' (in 4-component vector of float)
|
||||
0:167 Constant:
|
||||
0:167 0 (const int)
|
||||
0:167 direct index (float)
|
||||
0:167 'b' (in 4-component vector of float)
|
||||
0:167 Constant:
|
||||
|
|
@ -264,9 +291,8 @@ ERROR: node is still EOpNull!
|
|||
0:? '__anon__3' (layout(std140 ) uniform block)
|
||||
0:? '__anon__4' (layout(shared ) uniform block)
|
||||
0:? 's17' (uniform sampler2D)
|
||||
0:? 'a' (uniform int)
|
||||
0:? 'bar' (uniform int)
|
||||
0:? 'a2' (uniform int)
|
||||
0:? 'bar' (uniform int)
|
||||
0:? 'b2' (uniform int)
|
||||
0:? 'c2' (uniform int)
|
||||
0:? 'd2' (uniform int)
|
||||
|
|
@ -275,6 +301,7 @@ ERROR: node is still EOpNull!
|
|||
0:? 'Color4' (invariant centroid smooth out 3-component vector of float)
|
||||
0:? 'position' (smooth out 4-component vector of float)
|
||||
0:? 'Color5' (smooth out 3-component vector of float)
|
||||
0:? 'a' (in 4-component vector of float)
|
||||
0:? 'b' (in 4-component vector of float)
|
||||
0:? 'c' (in 4-component vector of float)
|
||||
0:? 'd' (in 4-component vector of float)
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ layout(location = 6) in vec4 colors[3];
|
|||
layout(location = 9) in mat4 transforms[2];
|
||||
|
||||
layout(location = 3) struct S {
|
||||
vec3 a;
|
||||
vec3 a1;
|
||||
mat2 b;
|
||||
vec4 c[2];
|
||||
} s;
|
||||
|
|
@ -82,7 +82,7 @@ uniform sampler2D s17; // okay, s still bound at 3
|
|||
// in another compilation unit...
|
||||
//layout(binding=4) uniform sampler2D s; // ERROR: contradictory bindings
|
||||
|
||||
layout (binding = 2, offset = 4) uniform atomic_uint a;
|
||||
layout (binding = 2, offset = 4) uniform atomic_uint a2;
|
||||
|
||||
layout (binding = 2) uniform atomic_uint bar;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue