Fix bug where bracket dereferences were incorrectly keeping the base's qualifier (for example constBase[i] would still be a const instead of EvqTemporary).

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23722 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich 2013-10-28 19:49:16 +00:00
parent ea869fb403
commit e17ef84753
31 changed files with 185 additions and 89 deletions

Binary file not shown.

View File

@ -1,4 +1,4 @@
#version 150 core
#version 420 core
// testing input arrays without a gl_in[] block redeclaration, see 400.geom for with
@ -21,3 +21,25 @@ void foo3()
gl_in[i].gl_Position;
color3.length();
}
uniform sampler2D s2D;
in vec2 coord;
uniform vec4 v4;
void foo4()
{
const ivec2 offsets[5] =
{
ivec2(0,1),
ivec2(1,-2),
ivec2(0,3),
ivec2(-3,0),
ivec2(2,1)
};
vec4 v = textureGatherOffset(s2D, coord, offsets[i].xy);
offsets[i].xy = ivec2(3); // ERROR
v4.x = 3.2; // ERROR
v4.xy; // should have non-uniform type
}

View File

@ -288,32 +288,32 @@
0:43 'a' (highp float)
0:43 Constant:
0:43 2.000000
0:47 indirect index (uniform lowp sampler2D)
0:47 indirect index (lowp sampler2D)
0:47 'fsa' (uniform 3-element array of lowp sampler2D)
0:47 'ga' (highp int)
0:48 indirect index (uniform highp float)
0:48 indirect index (highp float)
0:48 'fua' (uniform 10-element array of highp float)
0:48 'ga' (highp int)
0:49 indirect index (in highp 3-component vector of float)
0:49 indirect index (highp 3-component vector of float)
0:49 'am3' (in highp 3X3 matrix of float)
0:49 'ga' (highp int)
0:50 indirect index (in highp float)
0:50 indirect index (highp float)
0:50 'av2' (in highp 2-component vector of float)
0:50 'ga' (highp int)
0:51 indirect index (smooth out highp 4-component vector of float)
0:51 indirect index (smooth highp 4-component vector of float)
0:51 'va' (smooth out 4-element array of highp 4-component vector of float)
0:51 add (highp int)
0:51 Constant:
0:51 2 (const int)
0:51 'ga' (highp int)
0:52 indirect index (const highp 2-component vector of float)
0:52 indirect index (highp 2-component vector of float)
0:52 Constant:
0:52 1.000000
0:52 0.000000
0:52 0.000000
0:52 1.000000
0:52 'ga' (highp int)
0:53 indirect index (const highp float)
0:53 indirect index (highp float)
0:53 Constant:
0:53 2.000000
0:53 2.000000
@ -339,34 +339,34 @@
0:56 0 (const int)
0:56 Loop Body
0:57 Sequence
0:57 indirect index (uniform lowp sampler2D)
0:57 indirect index (lowp sampler2D)
0:57 'fsa' (uniform 3-element array of lowp sampler2D)
0:57 'a' (highp int)
0:58 indirect index (uniform highp float)
0:58 indirect index (highp float)
0:58 'fua' (uniform 10-element array of highp float)
0:58 add (highp int)
0:58 'a' (highp int)
0:58 Constant:
0:58 2 (const int)
0:59 indirect index (in highp 3-component vector of float)
0:59 indirect index (highp 3-component vector of float)
0:59 'am3' (in highp 3X3 matrix of float)
0:59 component-wise multiply (highp int)
0:59 Constant:
0:59 3 (const int)
0:59 'a' (highp int)
0:60 indirect index (in highp float)
0:60 indirect index (highp float)
0:60 'av2' (in highp 2-component vector of float)
0:60 component-wise multiply (highp int)
0:60 Constant:
0:60 3 (const int)
0:60 'a' (highp int)
0:61 indirect index (smooth out highp 4-component vector of float)
0:61 indirect index (smooth highp 4-component vector of float)
0:61 'va' (smooth out 4-element array of highp 4-component vector of float)
0:61 subtract (highp int)
0:61 'a' (highp int)
0:61 Constant:
0:61 1 (const int)
0:62 indirect index (const highp 2-component vector of float)
0:62 indirect index (highp 2-component vector of float)
0:62 Constant:
0:62 1.000000
0:62 0.000000
@ -376,7 +376,7 @@
0:62 'a' (highp int)
0:62 Constant:
0:62 2 (const int)
0:63 indirect index (const highp float)
0:63 indirect index (highp float)
0:63 Constant:
0:63 2.000000
0:63 2.000000
@ -391,23 +391,23 @@
0:56 Loop Terminal Expression
0:56 Post-Decrement (highp int)
0:56 'a' (highp int)
0:68 direct index (uniform lowp sampler2D)
0:68 direct index (lowp sampler2D)
0:68 'fsa' (uniform 3-element array of lowp sampler2D)
0:68 Constant:
0:68 2 (const int)
0:69 direct index (uniform highp float)
0:69 direct index (highp float)
0:69 'fua' (uniform 10-element array of highp float)
0:69 Constant:
0:69 3 (const int)
0:70 direct index (in highp 3-component vector of float)
0:70 direct index (highp 3-component vector of float)
0:70 'am3' (in highp 3X3 matrix of float)
0:70 Constant:
0:70 2 (const int)
0:71 direct index (in highp float)
0:71 direct index (highp float)
0:71 'av2' (in highp 2-component vector of float)
0:71 Constant:
0:71 1 (const int)
0:72 direct index (smooth out highp 4-component vector of float)
0:72 direct index (smooth highp 4-component vector of float)
0:72 'va' (smooth out 4-element array of highp 4-component vector of float)
0:72 Constant:
0:72 1 (const int)

View File

@ -262,7 +262,7 @@ ERROR: node is still EOpNull!
0:105 logical-and (bool)
0:105 Compare Less Than (bool)
0:105 Absolute value (float)
0:105 direct index (in float)
0:105 direct index (float)
0:105 'v' (in 3-component vector of float)
0:105 Constant:
0:105 0 (const int)
@ -270,7 +270,7 @@ ERROR: node is still EOpNull!
0:105 0.000100
0:105 Compare Less Than (bool)
0:105 Absolute value (float)
0:105 direct index (in float)
0:105 direct index (float)
0:105 'v' (in 3-component vector of float)
0:105 Constant:
0:105 1 (const int)
@ -293,13 +293,13 @@ ERROR: node is still EOpNull!
0:120 Sequence
0:120 move second child to first child (4-component vector of float)
0:120 'v' (4-component vector of float)
0:120 direct index (smooth in 4-component vector of float)
0:120 direct index (smooth 4-component vector of float)
0:120 'gl_TexCoord' (smooth in unsized array of 4-component vector of float)
0:120 Constant:
0:120 1 (const int)
0:121 add second child into first child (4-component vector of float)
0:121 'v' (4-component vector of float)
0:121 direct index (smooth in 4-component vector of float)
0:121 direct index (smooth 4-component vector of float)
0:121 'gl_TexCoord' (smooth in 6-element array of 4-component vector of float)
0:121 Constant:
0:121 3 (const int)

View File

@ -9,7 +9,7 @@ ERROR: node is still EOpNull!
0:18 Sequence
0:18 move second child to first child (float)
0:18 'clip' (float)
0:18 direct index (smooth in float)
0:18 direct index (smooth float)
0:18 'gl_ClipDistance' (smooth in unsized array of float)
0:18 Constant:
0:18 3 (const int)

View File

@ -10,7 +10,7 @@ ERROR: node is still EOpNull!
0:12 Sequence
0:12 move second child to first child (float)
0:12 'clip' (float)
0:12 direct index (smooth in float)
0:12 direct index (smooth float)
0:12 'gl_ClipDistance' (smooth in 5-element array of float)
0:12 Constant:
0:12 2 (const int)

View File

@ -62,7 +62,7 @@ ERROR: node is still EOpNull!
0:33 3 (const int)
0:33 direct index (float)
0:33 gl_ClipDistance: direct index for structure (unsized array of float)
0:33 direct index (in block{gl_Position,gl_PointSize,gl_ClipDistance})
0:33 direct index (block{gl_Position,gl_PointSize,gl_ClipDistance})
0:33 'gl_in' (in 4-element array of block{gl_Position,gl_PointSize,gl_ClipDistance})
0:33 Constant:
0:33 1 (const int)
@ -76,7 +76,7 @@ ERROR: node is still EOpNull!
0:34 Constant:
0:34 0 (const uint)
0:34 gl_Position: direct index for structure (4-component vector of float)
0:34 direct index (in block{gl_Position,gl_PointSize,gl_ClipDistance})
0:34 direct index (block{gl_Position,gl_PointSize,gl_ClipDistance})
0:34 'gl_in' (in 4-element array of block{gl_Position,gl_PointSize,gl_ClipDistance})
0:34 Constant:
0:34 0 (const int)
@ -88,7 +88,7 @@ ERROR: node is still EOpNull!
0:35 Constant:
0:35 1 (const uint)
0:35 gl_PointSize: direct index for structure (float)
0:35 direct index (in block{gl_Position,gl_PointSize,gl_ClipDistance})
0:35 direct index (block{gl_Position,gl_PointSize,gl_ClipDistance})
0:35 'gl_in' (in 4-element array of block{gl_Position,gl_PointSize,gl_ClipDistance})
0:35 Constant:
0:35 3 (const int)

View File

@ -58,7 +58,7 @@ ERROR: node is still EOpNull!
0:62 move second child to first child (lowp 4-component vector of float)
0:62 'v' (lowp 4-component vector of float)
0:62 Function Call: texelFetchOffset(s21;vi2;i1;vi2; (lowp 4-component vector of float)
0:62 direct index (uniform lowp sampler2D)
0:62 direct index (lowp sampler2D)
0:62 'arrayedSampler' (uniform 5-element array of lowp sampler2D)
0:62 Constant:
0:62 2 (const int)
@ -113,7 +113,7 @@ ERROR: node is still EOpNull!
0:69 move second child to first child (lowp 4-component vector of float)
0:69 'v' (lowp 4-component vector of float)
0:69 Function Call: texture(s21;vf2; (lowp 4-component vector of float)
0:69 indirect index (uniform lowp sampler2D)
0:69 indirect index (lowp sampler2D)
0:69 'arrayedSampler' (uniform 5-element array of lowp sampler2D)
0:69 'ic1D' (flat in mediump int)
0:69 'c2D' (smooth in lowp 2-component vector of float)

View File

@ -108,7 +108,7 @@ ERROR: node is still EOpNull!
0:47 'v3' (in highp 3-component vector of float)
0:49 move second child to first child (highp 4-component vector of float)
0:49 'gl_Position' (gl_Position highp 4-component vector of float)
0:49 direct index (uniform highp 4-component vector of float)
0:49 direct index (highp 4-component vector of float)
0:49 'm44' (uniform highp 4X4 matrix of float)
0:49 Constant:
0:49 2 (const int)

View File

@ -30,7 +30,7 @@ ERROR: node is still EOpNull!
0:44 Convert uint to float (float)
0:44 direct index (mediump uint)
0:44 nbv: direct index for structure (layout(column_major shared ) mediump 4-component vector of uint)
0:44 direct index (layout(column_major shared ) uniform block{nbv,ni})
0:44 direct index (layout(column_major shared ) block{nbv,ni})
0:44 'insts' (layout(column_major shared ) uniform 4-element array of block{nbv,ni})
0:44 Constant:
0:44 2 (const int)
@ -38,7 +38,7 @@ ERROR: node is still EOpNull!
0:44 0 (const int)
0:44 Constant:
0:44 2 (const int)
0:45 indirect index (layout(column_major shared ) uniform block{nbv,ni})
0:45 indirect index (layout(column_major shared ) block{nbv,ni})
0:45 'insts' (layout(column_major shared ) uniform 4-element array of block{nbv,ni})
0:45 direct index (mediump uint)
0:45 v: direct index for structure (mediump 4-component vector of uint)

View File

@ -12,7 +12,7 @@ ERROR: node is still EOpNull!
0:13 'p' (layout(location=3 ) out mediump 4-component vector of float)
0:13 'pos' (smooth in mediump 4-component vector of float)
0:14 move second child to first child (mediump 4-component vector of float)
0:14 direct index (layout(location=4 ) out mediump 4-component vector of float)
0:14 direct index (layout(location=4 ) mediump 4-component vector of float)
0:14 'q' (layout(location=4 ) out 2-element array of mediump 4-component vector of float)
0:14 Constant:
0:14 1 (const int)

View File

@ -7,7 +7,7 @@ Warning, version 330 is not yet complete; some version-specific features are pre
0:10 'gl_FragColor' (fragColor 4-component vector of float)
0:10 'varyingVar' (smooth in 4-component vector of float)
0:11 move second child to first child (4-component vector of float)
0:11 direct index (fragColor 4-component vector of float)
0:11 direct index (4-component vector of float)
0:11 'gl_FragData' (fragColor 32-element array of 4-component vector of float)
0:11 Constant:
0:11 1 (const int)

View File

@ -7,7 +7,7 @@ Warning, version 330 is not yet complete; some version-specific features are pre
0:10 'gl_FragColor' (fragColor 4-component vector of float)
0:10 'varyingVar' (smooth in 4-component vector of float)
0:11 move second child to first child (4-component vector of float)
0:11 direct index (fragColor 4-component vector of float)
0:11 direct index (4-component vector of float)
0:11 'gl_FragData' (fragColor 32-element array of 4-component vector of float)
0:11 Constant:
0:11 1 (const int)

View File

@ -12,7 +12,7 @@ ERROR: node is still EOpNull!
0:13 move second child to first child (4-component vector of float)
0:13 'v' (4-component vector of float)
0:13 Function Call: texture(s21;vf2; (4-component vector of float)
0:13 indirect index (uniform sampler2D)
0:13 indirect index (sampler2D)
0:13 'arrayedSampler' (uniform 5-element array of sampler2D)
0:13 'i' (flat in int)
0:13 'c2D' (smooth in 2-component vector of float)
@ -21,7 +21,7 @@ ERROR: node is still EOpNull!
0:14 'outp' (out 4-component vector of float)
0:14 Constant:
0:14 0 (const int)
0:14 direct index (smooth in float)
0:14 direct index (smooth float)
0:14 'gl_ClipDistance' (smooth in unsized array of float)
0:14 Constant:
0:14 1 (const int)
@ -38,7 +38,7 @@ ERROR: node is still EOpNull!
0:18 move second child to first child (4-component vector of float)
0:18 'v4' (4-component vector of float)
0:18 Function Call: textureGather(s21;vf2; (4-component vector of float)
0:18 direct index (uniform sampler2D)
0:18 direct index (sampler2D)
0:18 'arrayedSampler' (uniform 5-element array of sampler2D)
0:18 Constant:
0:18 0 (const int)

View File

@ -32,7 +32,7 @@ ERROR: node is still EOpNull!
0:24 Constant:
0:24 1 (const int)
0:25 gl_Position: direct index for structure (4-component vector of float)
0:25 direct index (in block{gl_Position})
0:25 direct index (block{gl_Position})
0:25 'gl_in' (in 3-element array of block{gl_Position})
0:25 Constant:
0:25 1 (const int)

View File

@ -25,7 +25,7 @@ ERROR: node is still EOpNull!
0:30 move second child to first child (float)
0:30 'p' (float)
0:30 gl_PointSize: direct index for structure (float)
0:30 direct index (in block{gl_PointSize})
0:30 direct index (block{gl_PointSize})
0:30 'gl_in' (in unsized array of block{gl_PointSize})
0:30 Constant:
0:30 1 (const int)

View File

@ -1,7 +1,9 @@
Warning, version 150 is not yet complete; some version-specific features are present, but many are missing.
Warning, version 420 is not yet complete; some version-specific features are present, but many are missing.
ERROR: 0:9: 'length' : array must be declared with a size before using this method
ERROR: 0:11: '[' : array must be redeclared with a size before being indexed with a variable
ERROR: 2 compilation errors. No code generated.
ERROR: 0:42: 'assign' : l-value required (can't modify a const)
ERROR: 0:43: 'assign' : l-value required "v4" (can't modify a uniform)
ERROR: 4 compilation errors. No code generated.
invocations = 0
max_vertices = 0
@ -14,14 +16,14 @@ ERROR: node is still EOpNull!
0:9 Constant:
0:9 1 (const int)
0:10 gl_Position: direct index for structure (4-component vector of float)
0:10 direct index (in block{gl_Position,gl_PointSize,gl_ClipDistance})
0:10 direct index (block{gl_Position,gl_PointSize,gl_ClipDistance})
0:10 'gl_in' (in 3-element array of block{gl_Position,gl_PointSize,gl_ClipDistance})
0:10 Constant:
0:10 1 (const int)
0:10 Constant:
0:10 0 (const int)
0:11 gl_Position: direct index for structure (4-component vector of float)
0:11 indirect index (in block{gl_Position,gl_PointSize,gl_ClipDistance})
0:11 indirect index (block{gl_Position,gl_PointSize,gl_ClipDistance})
0:11 'gl_in' (in 3-element array of block{gl_Position,gl_PointSize,gl_ClipDistance})
0:11 'i' (int)
0:11 Constant:
@ -32,15 +34,83 @@ ERROR: node is still EOpNull!
0:20 Constant:
0:20 3 (const int)
0:21 gl_Position: direct index for structure (4-component vector of float)
0:21 indirect index (in block{gl_Position,gl_PointSize,gl_ClipDistance})
0:21 indirect index (block{gl_Position,gl_PointSize,gl_ClipDistance})
0:21 'gl_in' (in 3-element array of block{gl_Position,gl_PointSize,gl_ClipDistance})
0:21 'i' (int)
0:21 Constant:
0:21 0 (const int)
0:22 Constant:
0:22 3 (const int)
0:29 Function Definition: foo4( (void)
0:29 Function Parameters:
0:? Sequence
0:40 Sequence
0:40 move second child to first child (4-component vector of float)
0:40 'v' (4-component vector of float)
0:40 Function Call: textureGatherOffset(s21;vf2;vi2; (4-component vector of float)
0:40 's2D' (uniform sampler2D)
0:40 'coord' (in 2-component vector of float)
0:40 vector swizzle (2-component vector of int)
0:40 indirect index (2-component vector of int)
0:40 Constant:
0:40 0 (const int)
0:40 1 (const int)
0:40 1 (const int)
0:40 -2 (const int)
0:40 0 (const int)
0:40 3 (const int)
0:40 -3 (const int)
0:40 0 (const int)
0:40 2 (const int)
0:40 1 (const int)
0:40 'i' (int)
0:40 Sequence
0:40 Constant:
0:40 0 (const int)
0:40 Constant:
0:40 1 (const int)
0:42 move second child to first child (2-component vector of int)
0:42 vector swizzle (2-component vector of int)
0:42 indirect index (2-component vector of int)
0:42 Constant:
0:42 0 (const int)
0:42 1 (const int)
0:42 1 (const int)
0:42 -2 (const int)
0:42 0 (const int)
0:42 3 (const int)
0:42 -3 (const int)
0:42 0 (const int)
0:42 2 (const int)
0:42 1 (const int)
0:42 'i' (int)
0:42 Sequence
0:42 Constant:
0:42 0 (const int)
0:42 Constant:
0:42 1 (const int)
0:42 Constant:
0:42 3 (const int)
0:42 3 (const int)
0:43 move second child to first child (float)
0:43 direct index (float)
0:43 'v4' (uniform 4-component vector of float)
0:43 Constant:
0:43 0 (const int)
0:43 Constant:
0:43 3.200000
0:44 vector swizzle (2-component vector of float)
0:44 'v4' (uniform 4-component vector of float)
0:44 Sequence
0:44 Constant:
0:44 0 (const int)
0:44 Constant:
0:44 1 (const int)
0:? Linker Objects
0:? 'i' (int)
0:? 'gl_in' (in 3-element array of block{gl_Position,gl_PointSize,gl_ClipDistance})
0:? 'color3' (in 3-element array of 4-component vector of float)
0:? 's2D' (uniform sampler2D)
0:? 'coord' (in 2-component vector of float)
0:? 'v4' (uniform 4-component vector of float)

View File

@ -69,7 +69,7 @@ ERROR: node is still EOpNull!
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 direct index (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)
@ -85,7 +85,7 @@ ERROR: node is still EOpNull!
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 direct index (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)

View File

@ -22,19 +22,19 @@ ERROR: node is still EOpNull!
0:11 Sequence
0:11 Branch: Return with expression
0:11 Construct float (4-element array of float)
0:11 direct index (in float)
0:11 direct index (float)
0:11 'a' (in 5-element array of float)
0:11 Constant:
0:11 0 (const int)
0:11 direct index (in float)
0:11 direct index (float)
0:11 'a' (in 5-element array of float)
0:11 Constant:
0:11 1 (const int)
0:11 direct index (in float)
0:11 direct index (float)
0:11 'a' (in 5-element array of float)
0:11 Constant:
0:11 2 (const int)
0:11 direct index (in float)
0:11 direct index (float)
0:11 'a' (in 5-element array of float)
0:11 Constant:
0:11 3 (const int)
@ -116,7 +116,7 @@ ERROR: node is still EOpNull!
0:43 Function Call: foo(f1[5]; (4-element array of float)
0:43 'u' (5-element array of float)
0:45 move second child to first child (4-component vector of float)
0:45 direct index (fragColor 4-component vector of float)
0:45 direct index (4-component vector of float)
0:45 'gl_FragData' (fragColor 32-element array of 4-component vector of float)
0:45 Constant:
0:45 1000 (const int)
@ -126,7 +126,7 @@ ERROR: node is still EOpNull!
0:45 1.000000
0:45 1.000000
0:46 move second child to first child (4-component vector of float)
0:46 direct index (fragColor 4-component vector of float)
0:46 direct index (4-component vector of float)
0:46 'gl_FragData' (fragColor 32-element array of 4-component vector of float)
0:46 Constant:
0:46 -1 (const int)
@ -136,7 +136,7 @@ ERROR: node is still EOpNull!
0:46 1.000000
0:46 1.000000
0:47 move second child to first child (4-component vector of float)
0:47 direct index (fragColor 4-component vector of float)
0:47 direct index (4-component vector of float)
0:47 'gl_FragData' (fragColor 32-element array of 4-component vector of float)
0:47 Constant:
0:47 3 (const int)

View File

@ -24,19 +24,19 @@ ERROR: node is still EOpNull!
0:11 Sequence
0:11 Branch: Return with expression
0:11 Construct float (4-element array of float)
0:11 direct index (in mediump float)
0:11 direct index (mediump float)
0:11 'a' (in 5-element array of mediump float)
0:11 Constant:
0:11 0 (const int)
0:11 direct index (in mediump float)
0:11 direct index (mediump float)
0:11 'a' (in 5-element array of mediump float)
0:11 Constant:
0:11 1 (const int)
0:11 direct index (in mediump float)
0:11 direct index (mediump float)
0:11 'a' (in 5-element array of mediump float)
0:11 Constant:
0:11 2 (const int)
0:11 direct index (in mediump float)
0:11 direct index (mediump float)
0:11 'a' (in 5-element array of mediump float)
0:11 Constant:
0:11 3 (const int)
@ -91,7 +91,7 @@ ERROR: node is still EOpNull!
0:36 Function Call: foo(f1[5]; (4-element array of mediump float)
0:36 'u' (5-element array of mediump float)
0:38 move second child to first child (mediump 4-component vector of float)
0:38 direct index (fragColor mediump 4-component vector of float)
0:38 direct index (mediump 4-component vector of float)
0:38 'gl_FragData' (fragColor 32-element array of mediump 4-component vector of float)
0:38 Constant:
0:38 1000 (const int)
@ -101,7 +101,7 @@ ERROR: node is still EOpNull!
0:38 1.000000
0:38 1.000000
0:39 move second child to first child (mediump 4-component vector of float)
0:39 direct index (fragColor mediump 4-component vector of float)
0:39 direct index (mediump 4-component vector of float)
0:39 'gl_FragData' (fragColor 32-element array of mediump 4-component vector of float)
0:39 Constant:
0:39 -1 (const int)
@ -111,7 +111,7 @@ ERROR: node is still EOpNull!
0:39 1.000000
0:39 1.000000
0:40 move second child to first child (mediump 4-component vector of float)
0:40 direct index (fragColor mediump 4-component vector of float)
0:40 direct index (mediump 4-component vector of float)
0:40 'gl_FragData' (fragColor 32-element array of mediump 4-component vector of float)
0:40 Constant:
0:40 3 (const int)

View File

@ -5,7 +5,7 @@ WARNING: 0:3: varying deprecated in version 130; may be removed in future releas
0:5 Function Parameters:
0:7 Sequence
0:7 move second child to first child (4-component vector of float)
0:7 direct index (fragColor 4-component vector of float)
0:7 direct index (4-component vector of float)
0:7 'gl_FragData' (fragColor 32-element array of 4-component vector of float)
0:7 Constant:
0:7 1 (const int)

View File

@ -5,7 +5,7 @@ WARNING: 0:3: varying deprecated in version 130; may be removed in future releas
0:7 Function Parameters:
0:9 Sequence
0:9 move second child to first child (4-component vector of float)
0:9 indirect index (fragColor 4-component vector of float)
0:9 indirect index (4-component vector of float)
0:9 'gl_FragData' (fragColor 32-element array of 4-component vector of float)
0:9 'i' (uniform int)
0:9 'Color' (smooth in 4-component vector of float)

View File

@ -7,11 +7,11 @@ Warning, version 120 is not yet complete; most features are present, but a few a
0:15 move second child to first child (2-component vector of float)
0:15 't' (2-component vector of float)
0:15 add (2-component vector of float)
0:15 direct index (smooth in 2-component vector of float)
0:15 direct index (smooth 2-component vector of float)
0:15 'v' (smooth in 2-element array of 2-component vector of float)
0:15 Constant:
0:15 0 (const int)
0:15 direct index (smooth in 2-component vector of float)
0:15 direct index (smooth 2-component vector of float)
0:15 'v' (smooth in 2-element array of 2-component vector of float)
0:15 Constant:
0:15 1 (const int)

View File

@ -24,7 +24,7 @@ Warning, version 130 is not yet complete; most features are present, but a few a
0:21 Sequence
0:21 Branch: Return with expression
0:21 Convert float to int (2-component vector of int)
0:21 direct index (in 2-component vector of float)
0:21 direct index (2-component vector of float)
0:21 'm' (in 2X2 matrix of float)
0:21 Constant:
0:21 0 (const int)
@ -197,7 +197,7 @@ ERROR: Linking fragment stage: Precision qualifiers must match:
0:21 Sequence
0:21 Branch: Return with expression
0:21 Convert float to int (2-component vector of int)
0:21 direct index (in 2-component vector of float)
0:21 direct index (2-component vector of float)
0:21 'm' (in 2X2 matrix of float)
0:21 Constant:
0:21 0 (const int)

View File

@ -9,7 +9,7 @@ WARNING: 0:22: varying deprecated in version 130; may be removed in future relea
0:27 move second child to first child (4-component vector of float)
0:27 'gl_FragColor' (fragColor 4-component vector of float)
0:27 Construct vec4 (4-component vector of float)
0:27 direct index (uniform 4-component vector of float)
0:27 direct index (4-component vector of float)
0:27 'un34' (uniform 4X4 matrix of float)
0:27 Constant:
0:27 1 (const int)

View File

@ -14,7 +14,7 @@ WARNING: 0:3: varying deprecated in version 130; may be removed in future releas
0:24 Compare Greater Than (bool)
0:24 direct index (int)
0:24 i: direct index for structure (5-element array of int)
0:24 direct index (uniform structure{i,f,s1_1})
0:24 direct index (structure{i,f,s1_1})
0:24 'foo2' (uniform 5-element array of structure{i,f,s1_1})
0:24 Constant:
0:24 3 (const int)
@ -32,7 +32,7 @@ WARNING: 0:3: varying deprecated in version 130; may be removed in future releas
0:25 color: direct index for structure (5-element array of 4-component vector of float)
0:25 direct index (structure{i,f,color})
0:25 s1_1: direct index for structure (7-element array of structure{i,f,color})
0:25 direct index (uniform structure{i,f,s1_1})
0:25 direct index (structure{i,f,s1_1})
0:25 'foo2' (uniform 5-element array of structure{i,f,s1_1})
0:25 Constant:
0:25 3 (const int)
@ -53,7 +53,7 @@ WARNING: 0:3: varying deprecated in version 130; may be removed in future releas
0:27 f: direct index for structure (4-element array of float)
0:27 direct index (structure{i,f,color})
0:27 s1_1: direct index for structure (7-element array of structure{i,f,color})
0:27 direct index (uniform structure{i,f,s1_1})
0:27 direct index (structure{i,f,s1_1})
0:27 'foo2' (uniform 5-element array of structure{i,f,s1_1})
0:27 Constant:
0:27 3 (const int)

View File

@ -7,11 +7,11 @@ Warning, version 130 is not yet complete; most features are present, but a few a
0:9 move second child to first child (4-component vector of float)
0:9 'texColor' (4-component vector of float)
0:9 add (4-component vector of float)
0:9 direct index (uniform 4-component vector of float)
0:9 direct index (4-component vector of float)
0:9 'color' (uniform 6-element array of 4-component vector of float)
0:9 Constant:
0:9 1 (const int)
0:9 direct index (uniform 4-component vector of float)
0:9 direct index (4-component vector of float)
0:9 'color' (uniform 6-element array of 4-component vector of float)
0:9 Constant:
0:9 1 (const int)
@ -31,7 +31,7 @@ Warning, version 130 is not yet complete; most features are present, but a few a
0:13 'texColor' (4-component vector of float)
0:13 Constant:
0:13 3 (const int)
0:13 direct index (uniform float)
0:13 direct index (float)
0:13 'alpha' (uniform 16-element array of float)
0:13 Constant:
0:13 12 (const int)

View File

@ -28,7 +28,7 @@ WARNING: 0:3: varying deprecated in version 130; may be removed in future releas
0:35 'scale' (float)
0:35 f: direct index for structure (float)
0:35 s1_1: direct index for structure (structure{i,f})
0:35 indirect index (uniform structure{i,f,s1_1})
0:35 indirect index (structure{i,f,s1_1})
0:35 'foo2' (uniform 5-element array of structure{i,f,s1_1})
0:35 add (int)
0:35 add (int)

View File

@ -14,11 +14,11 @@ WARNING: 0:8: varying deprecated in version 130; may be removed in future releas
0:12 'texSampler2D' (uniform sampler2D)
0:12 Construct vec2 (2-component vector of float)
0:12 add (4-component vector of float)
0:12 direct index (smooth in 4-component vector of float)
0:12 direct index (smooth 4-component vector of float)
0:12 'gl_TexCoord' (smooth in 6-element array of 4-component vector of float)
0:12 Constant:
0:12 4 (const int)
0:12 direct index (smooth in 4-component vector of float)
0:12 direct index (smooth 4-component vector of float)
0:12 'gl_TexCoord' (smooth in 6-element array of 4-component vector of float)
0:12 Constant:
0:12 5 (const int)
@ -36,15 +36,15 @@ WARNING: 0:8: varying deprecated in version 130; may be removed in future releas
0:18 add (4-component vector of float)
0:18 add (4-component vector of float)
0:18 add (4-component vector of float)
0:18 direct index (smooth in 4-component vector of float)
0:18 direct index (smooth 4-component vector of float)
0:18 'foo' (smooth in 3-element array of 4-component vector of float)
0:18 Constant:
0:18 1 (const int)
0:18 direct index (smooth in 4-component vector of float)
0:18 direct index (smooth 4-component vector of float)
0:18 'gl_TexCoord' (smooth in 6-element array of 4-component vector of float)
0:18 Constant:
0:18 0 (const int)
0:18 direct index (smooth in 4-component vector of float)
0:18 direct index (smooth 4-component vector of float)
0:18 'gl_TexCoord' (smooth in 6-element array of 4-component vector of float)
0:18 Constant:
0:18 4 (const int)

View File

@ -15,13 +15,13 @@ WARNING: 0:8: varying deprecated in version 130; may be removed in future releas
0:14 Construct vec2 (2-component vector of float)
0:14 add (4-component vector of float)
0:14 add (4-component vector of float)
0:14 indirect index (smooth in 4-component vector of float)
0:14 indirect index (smooth 4-component vector of float)
0:14 'userIn' (smooth in 2-element array of 4-component vector of float)
0:14 'b' (uniform int)
0:14 indirect index (smooth in 4-component vector of float)
0:14 indirect index (smooth 4-component vector of float)
0:14 'gl_TexCoord' (smooth in 6-element array of 4-component vector of float)
0:14 'a' (uniform int)
0:14 direct index (smooth in 4-component vector of float)
0:14 direct index (smooth 4-component vector of float)
0:14 'gl_TexCoord' (smooth in 6-element array of 4-component vector of float)
0:14 Constant:
0:14 5 (const int)
@ -39,15 +39,15 @@ WARNING: 0:8: varying deprecated in version 130; may be removed in future releas
0:20 add (4-component vector of float)
0:20 add (4-component vector of float)
0:20 add (4-component vector of float)
0:20 direct index (smooth in 4-component vector of float)
0:20 direct index (smooth 4-component vector of float)
0:20 'gl_TexCoord' (smooth in 6-element array of 4-component vector of float)
0:20 Constant:
0:20 0 (const int)
0:20 indirect index (smooth in 4-component vector of float)
0:20 indirect index (smooth 4-component vector of float)
0:20 'gl_TexCoord' (smooth in 6-element array of 4-component vector of float)
0:20 'b' (uniform int)
0:20 'texColor' (4-component vector of float)
0:20 indirect index (smooth in 4-component vector of float)
0:20 indirect index (smooth 4-component vector of float)
0:20 'userIn' (smooth in 2-element array of 4-component vector of float)
0:20 'a' (uniform int)
0:? Linker Objects

View File

@ -492,6 +492,8 @@ TIntermTyped* TParseContext::handleBracketDereference(TSourceLoc loc, TIntermTyp
newType.shallowCopy(base->getType());
if (base->getType().getQualifier().storage == EvqConst && index->getQualifier().storage == EvqConst)
newType.getQualifier().storage = EvqConst;
else
newType.getQualifier().storage = EvqTemporary;
newType.dereference();
result->setType(newType);
@ -3383,8 +3385,10 @@ TIntermNode* TParseContext::addSwitch(TSourceLoc loc, TIntermTyped* expression,
return switchNode;
}
// TODO: constant folding: these should use a follow a fully folded model now, and probably move to Constant.cpp scheme.
//
// This function returns the tree representation for the vector field(s) being accessed from contant vector.
// This function returns the tree representation for the vector field(s) being accessed from a constant vector.
// If only one component of vector is accessed (v.x or v[0] where v is a contant vector), then a contant node is
// returned, else an aggregate node is returned (for v.xy). The input to this function could either be the symbol
// node or it could be the intermediate tree representation of accessing fields in a constant structure or column of