From f2ee3dd46a24f2203653cfd74136d0b07ace928c Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Sat, 28 Sep 2013 04:02:08 +0000 Subject: [PATCH] Add full support for uniforms with initializers, including intra-stage link validation of aggregate constant initializers. This included - encapsulating aggregate constants - removal of constant-aggregate comparison algorithms, instead using a flattened and direct std::vector comparison - adding structure type comparison for independently declared structures that still might match types git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23274 e7fa87d3-cd2b-0410-9028-fcbf551c1848 --- Test/baseResults/120.frag.out | 63 +++-- Test/baseResults/120.vert.out | 21 +- Test/baseResults/300.frag.out | 30 ++- Test/baseResults/300.vert.out | 50 ++-- Test/baseResults/300BuiltIns.frag.out | 3 +- Test/baseResults/300block.frag.out | 27 +- Test/baseResults/300layout.frag.out | 3 +- Test/baseResults/300layout.vert.out | 18 +- Test/baseResults/300operations.frag.out | 42 ++- Test/baseResults/300scope.vert.out | 36 ++- Test/baseResults/330.frag.out | 6 +- Test/baseResults/330comp.frag.out | 3 +- Test/baseResults/400.geom.out | 6 +- Test/baseResults/400.tese.out | 3 +- Test/baseResults/420.vert.out | 6 +- Test/baseResults/430scope.vert.out | 36 ++- Test/baseResults/Operations.frag.out | 39 ++- Test/baseResults/aggOps.frag.out | 58 +++-- Test/baseResults/always-discard.frag.out | 54 ++-- Test/baseResults/always-discard2.frag.out | 36 ++- Test/baseResults/array.frag.out | 125 +++++---- Test/baseResults/array100.frag.out | 78 +++--- Test/baseResults/conditionalDiscard.frag.out | 9 +- Test/baseResults/constErrors.frag.out | 1 + Test/baseResults/constFold.frag.out | 203 +++++++++------ Test/baseResults/conversion.frag.out | 111 +++++--- Test/baseResults/cppComplexExpr.vert.out | 12 +- Test/baseResults/cppIndent.vert.out | 18 +- Test/baseResults/cppNest.vert.out | 21 +- Test/baseResults/cppSimple.vert.out | 36 ++- Test/baseResults/dataOut.frag.out | 3 +- Test/baseResults/dce.frag.out | 40 ++- Test/baseResults/decls.frag.out | 241 ++++++++++------- Test/baseResults/deepRvalue.frag.out | 89 ++++--- Test/baseResults/discard-dce.frag.out | 54 ++-- Test/baseResults/doWhileLoop.frag.out | 3 +- Test/baseResults/earlyReturnDiscard.frag.out | 21 +- Test/baseResults/errors.frag.out | 3 +- Test/baseResults/forLoop.frag.out | 3 +- Test/baseResults/forwardRef.frag.out | 15 +- Test/baseResults/functionCall.frag.out | 24 +- Test/baseResults/functionSemantics.frag.out | 54 ++-- Test/baseResults/length.frag.out | 15 +- Test/baseResults/link1.frag.out | 147 ++++++++++- Test/baseResults/localAggregates.frag.out | 102 +++++--- Test/baseResults/loops.frag.out | 342 ++++++++++++++++--------- Test/baseResults/loopsArtificial.frag.out | 57 +++-- Test/baseResults/matrix.frag.out | 117 ++++++--- Test/baseResults/matrix2.frag.out | 63 +++-- Test/baseResults/matrixError.vert.out | 6 +- Test/baseResults/newTexture.frag.out | 27 +- Test/baseResults/nonSquare.vert.out | 81 +++--- Test/baseResults/numeral.frag.out | 213 ++++++++++----- Test/baseResults/pointCoord.frag.out | 12 +- Test/baseResults/precision.frag.out | 36 ++- Test/baseResults/precision.vert.out | 19 +- Test/baseResults/prepost.frag.out | 60 +++-- Test/baseResults/sample.frag.out | 3 +- Test/baseResults/sample.vert.out | 7 +- Test/baseResults/specExamples.frag.out | 136 +++++----- Test/baseResults/specExamples.vert.out | 66 +++-- Test/baseResults/structAssignment.frag.out | 14 +- Test/baseResults/structDeref.frag.out | 112 +++++--- Test/baseResults/structure.frag.out | 42 ++- Test/baseResults/switch.frag.out | 39 ++- Test/baseResults/swizzle.frag.out | 117 ++++++--- Test/baseResults/test.frag.out | 15 +- Test/baseResults/texture.frag.out | 53 ++-- Test/baseResults/tokenLength.vert.out | 36 ++- Test/baseResults/types.frag.out | 144 +++++++---- Test/baseResults/uint.frag.out | 125 ++++++--- Test/baseResults/uniformArray.frag.out | 21 +- Test/baseResults/variableArrayIndex.frag.out | 49 ++-- Test/baseResults/varyingArray.frag.out | 18 +- Test/baseResults/varyingArrayIndirect.frag.out | 9 +- Test/baseResults/versionsClean.frag.out | 3 +- Test/baseResults/versionsClean.vert.out | 3 +- Test/baseResults/versionsErrors.frag.out | 3 +- Test/baseResults/versionsErrors.vert.out | 3 +- Test/baseResults/voidFunction.frag.out | 6 +- Test/baseResults/whileLoop.frag.out | 3 +- Test/decls.frag | 10 + Test/link1.frag | 14 + Test/link2.frag | 13 + glslang/Include/Common.h | 3 +- glslang/Include/ConstantUnion.h | 61 ++++- glslang/Include/Types.h | 44 +++- glslang/Include/intermediate.h | 12 +- glslang/MachineIndependent/Constant.cpp | 194 ++++---------- glslang/MachineIndependent/Intermediate.cpp | 35 ++- glslang/MachineIndependent/ParseHelper.cpp | 136 +++++----- glslang/MachineIndependent/ParseHelper.h | 1 - glslang/MachineIndependent/SymbolTable.cpp | 10 +- glslang/MachineIndependent/SymbolTable.h | 21 +- glslang/MachineIndependent/glslang.y | 56 ++-- glslang/MachineIndependent/intermOut.cpp | 64 +++-- glslang/MachineIndependent/localintermediate.h | 4 +- glslang/MachineIndependent/parseConst.cpp | 14 +- 98 files changed, 3006 insertions(+), 1714 deletions(-) diff --git a/Test/baseResults/120.frag.out b/Test/baseResults/120.frag.out index 777a0e9..a396c84 100644 --- a/Test/baseResults/120.frag.out +++ b/Test/baseResults/120.frag.out @@ -49,14 +49,17 @@ ERROR: node is still EOpNull! 0:28 move second child to first child (2-element array of float) 0:28 'ia' (2-element array of float) 0:28 Construct float (2-element array of float) -0:28 3.000000 +0:28 Constant: +0:28 3.000000 0:28 direct index (float) 0:28 'i' (smooth in 4-component vector of float) -0:28 1 (const int) +0:28 Constant: +0:28 1 (const int) 0:29 Sequence 0:29 move second child to first child (float) 0:29 'f1' (float) -0:29 1.000000 +0:29 Constant: +0:29 1.000000 0:30 Sequence 0:30 move second child to first child (float) 0:30 'f' (float) @@ -102,23 +105,27 @@ ERROR: node is still EOpNull! 0:39 divide (3-component vector of float) 0:39 Convert int to float (3-component vector of float) 0:39 'iv3' (3-component vector of int) -0:39 2.000000 +0:39 Constant: +0:39 2.000000 0:40 move second child to first child (3-component vector of float) 0:40 'v3' (3-component vector of float) 0:40 vector-scale (3-component vector of float) -0:40 3.000000 +0:40 Constant: +0:40 3.000000 0:40 Convert int to float (3-component vector of float) 0:40 'iv3' (3-component vector of int) 0:41 move second child to first child (3-component vector of float) 0:41 'v3' (3-component vector of float) 0:41 vector-scale (3-component vector of float) -0:41 2.000000 +0:41 Constant: +0:41 2.000000 0:41 'v3' (3-component vector of float) 0:42 move second child to first child (3-component vector of float) 0:42 'v3' (3-component vector of float) 0:42 subtract (3-component vector of float) 0:42 'v3' (3-component vector of float) -0:42 2.000000 +0:42 Constant: +0:42 2.000000 0:43 Test condition and select (void) 0:43 Condition 0:47 logical-or (bool) @@ -188,8 +195,10 @@ ERROR: node is still EOpNull! 0:54 vector swizzle (2-component vector of float) 0:54 'i' (smooth in 4-component vector of float) 0:54 Sequence -0:54 0 (const int) -0:54 1 (const int) +0:54 Constant: +0:54 0 (const int) +0:54 Constant: +0:54 1 (const int) 0:55 'm' (uniform 4X2 matrix of float) 0:56 'm' (uniform 4X2 matrix of float) 0:58 'f' (float) @@ -212,18 +221,22 @@ ERROR: node is still EOpNull! 0:79 'gl_FragColor' (fragColor 4-component vector of float) 0:82 direct index (float) 0:82 'gl_FragColor' (fragColor 4-component vector of float) -0:82 0 (const int) +0:82 Constant: +0:82 0 (const int) 0:83 direct index (float) 0:83 'gl_FragColor' (fragColor 4-component vector of float) -0:83 0 (const int) +0:83 Constant: +0:83 0 (const int) 0:84 direct index (float) 0:84 'centTexCoord' (centroid smooth in 2-component vector of float) -0:84 0 (const int) +0:84 Constant: +0:84 0 (const int) 0:85 move second child to first child (bool) 0:85 Comma (bool) 0:85 'a' (int) 0:85 'b' (bool) -0:85 true (const bool) +0:85 Constant: +0:85 true (const bool) 0:91 Function Definition: main( (int) 0:91 Function Parameters: 0:92 Function Definition: main(i1; (void) @@ -234,7 +247,8 @@ ERROR: node is still EOpNull! 0:97 'a' (out float) 0:99 Sequence 0:99 Branch: Return with expression -0:99 3.200000 +0:99 Constant: +0:99 3.200000 0:100 Function Call: foo(f1; (int) 0:100 'a' (out float) 0:103 Function Definition: gen(vf3; (bool) @@ -248,17 +262,22 @@ ERROR: node is still EOpNull! 0:105 Absolute value (float) 0:105 direct index (in float) 0:105 'v' (in 3-component vector of float) -0:105 0 (const int) -0:105 0.000100 +0:105 Constant: +0:105 0 (const int) +0:105 Constant: +0:105 0.000100 0:105 Compare Less Than (bool) 0:105 Absolute value (float) 0:105 direct index (in float) 0:105 'v' (in 3-component vector of float) -0:105 1 (const int) -0:105 0.000100 +0:105 Constant: +0:105 1 (const int) +0:105 Constant: +0:105 0.000100 0:105 true case 0:106 Branch: Return with expression -0:106 true (const bool) +0:106 Constant: +0:106 true (const bool) 0:109 Function Definition: v1( (void) 0:109 Function Parameters: 0:113 Function Definition: v2( (void) @@ -274,12 +293,14 @@ ERROR: node is still EOpNull! 0:120 'v' (4-component vector of float) 0:120 direct index (smooth in 4-component vector of float) 0:120 'gl_TexCoord' (smooth in unsized array of 4-component vector of float) -0:120 1 (const int) +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 'gl_TexCoord' (smooth in unsized array of 4-component vector of float) -0:121 3 (const int) +0:121 Constant: +0:121 3 (const int) 0:? Linker Objects 0:? 'lowp' (float) 0:? 'mediump' (float) diff --git a/Test/baseResults/120.vert.out b/Test/baseResults/120.vert.out index 96a7fee..f0395f3 100644 --- a/Test/baseResults/120.vert.out +++ b/Test/baseResults/120.vert.out @@ -43,22 +43,26 @@ ERROR: node is still EOpNull! 0:22 'gl_Position' (invariant gl_Position 4-component vector of float) 0:22 direct index (4-component vector of float) 0:22 'b' (12-element array of 4-component vector of float) -0:22 11 (const int) +0:22 Constant: +0:22 11 (const int) 0:25 Sequence 0:25 move second child to first child (int) 0:25 'a1' (int) -0:25 1 (const int) +0:25 Constant: +0:25 1 (const int) 0:27 Sequence 0:27 move second child to first child (int) 0:27 'aa' (int) -0:27 7 (const int) +0:27 Constant: +0:27 7 (const int) 0:28 Sequence 0:28 move second child to first child (int) 0:28 'a2' (int) 0:29 Sequence 0:29 move second child to first child (int) 0:29 'a3' (int) -0:29 12 (const int) +0:29 Constant: +0:29 12 (const int) 0:37 Sequence 0:37 move second child to first child (2-element array of float) 0:37 'md9' (2-element array of float) @@ -69,11 +73,8 @@ ERROR: node is still EOpNull! 0:38 Construct float (const 2-element array of float) 0:40 move second child to first child (float) 0:40 'gl_PointSize' (invariant gl_PointSize float) -0:40 3.800000 -0:43 Sequence -0:43 move second child to first child (float) -0:43 'initted' (uniform float) -0:43 3.400000 +0:40 Constant: +0:40 3.800000 0:? Linker Objects 0:? 'i' (in 4-component vector of float) 0:? 'o' (smooth out 4-component vector of float) @@ -82,5 +83,7 @@ ERROR: node is still EOpNull! 0:? 's2D' (uniform sampler2D) 0:? 'centTexCoord' (invariant smooth out 2-component vector of float) 0:? 'initted' (uniform float) +0:? 3.400000 0:? 'concall' (const float) +0:? 0.295520 diff --git a/Test/baseResults/300.frag.out b/Test/baseResults/300.frag.out index 7f15f91..75f1a87 100644 --- a/Test/baseResults/300.frag.out +++ b/Test/baseResults/300.frag.out @@ -40,7 +40,8 @@ ERROR: node is still EOpNull! 0:59 Function Call: textureLod(sA21;vf3;f1; (lowp 4-component vector of float) 0:59 's2DArray' (uniform lowp sampler2DArray) 0:59 'c3D' (smooth in lowp 3-component vector of float) -0:59 1.200000 +0:59 Constant: +0:59 1.200000 0:60 move second child to first child (lowp float) 0:60 'f' (lowp float) 0:60 Function Call: textureOffset(sS21;vf3;vi2;f1; (lowp float) @@ -59,9 +60,11 @@ ERROR: node is still EOpNull! 0:62 Function Call: texelFetchOffset(s21;vi2;i1;vi2; (lowp 4-component vector of float) 0:62 direct index (uniform lowp sampler2D) 0:62 'arrayedSampler' (uniform 5-element array of lowp sampler2D) -0:62 2 (const int) +0:62 Constant: +0:62 2 (const int) 0:62 'ic2D' (flat in mediump 2-component vector of int) -0:62 4 (const int) +0:62 Constant: +0:62 4 (const int) 0:62 'ic2D' (flat in mediump 2-component vector of int) 0:63 move second child to first child (lowp float) 0:63 'f' (lowp float) @@ -143,7 +146,8 @@ ERROR: node is still EOpNull! 0:76 Function Call: texture(is31;vf3;f1; (mediump 4-component vector of int) 0:76 'is3D' (uniform lowp isampler3D) 0:76 'c3D' (smooth in lowp 3-component vector of float) -0:76 4.200000 +0:76 Constant: +0:76 4.200000 0:77 move second child to first child (mediump 4-component vector of int) 0:77 'iv' (mediump 4-component vector of int) 0:77 Function Call: textureLod(isC1;vf3;f1; (mediump 4-component vector of int) @@ -160,16 +164,20 @@ ERROR: node is still EOpNull! 0:80 vector swizzle (mediump 2-component vector of int) 0:80 'iv' (mediump 4-component vector of int) 0:80 Sequence -0:80 0 (const int) -0:80 1 (const int) +0:80 Constant: +0:80 0 (const int) +0:80 Constant: +0:80 1 (const int) 0:80 Function Call: textureSize(sSC1;i1; (highp 2-component vector of int) 0:80 'sCubeShadow' (uniform lowp samplerCubeShadow) -0:80 2 (const int) +0:80 Constant: +0:80 2 (const int) 0:88 add second child into first child (highp float) 0:88 'f' (lowp float) 0:88 direct index (highp float) 0:88 'gl_FragCoord' (gl_FragCoord highp 4-component vector of float) -0:88 1 (const int) +0:88 Constant: +0:88 1 (const int) 0:89 move second child to first child (highp float) 0:89 'gl_FragDepth' (gl_FragDepth highp float) 0:89 'f' (lowp float) @@ -177,12 +185,14 @@ ERROR: node is still EOpNull! 0:91 'sc' (out lowp 3-component vector of float) 0:91 c: direct index for structure (lowp 3-component vector of float) 0:91 's2' (smooth in structure) -0:91 0 (const int) +0:91 Constant: +0:91 0 (const int) 0:92 move second child to first child (lowp float) 0:92 'sf' (out lowp float) 0:92 f: direct index for structure (lowp float) 0:92 's2' (smooth in structure) -0:92 1 (const int) +0:92 Constant: +0:92 1 (const int) 0:94 add (lowp 2-component vector of float) 0:94 hyp. sine (lowp float) 0:94 'c1D' (smooth in lowp float) diff --git a/Test/baseResults/300.vert.out b/Test/baseResults/300.vert.out index 1388f66..aa5f8e3 100644 --- a/Test/baseResults/300.vert.out +++ b/Test/baseResults/300.vert.out @@ -33,47 +33,58 @@ ERROR: node is still EOpNull! 0:31 Sequence 0:31 move second child to first child (highp int) 0:31 'c0' (highp int) -0:31 64 (const int) +0:31 Constant: +0:31 64 (const int) 0:32 Sequence 0:32 move second child to first child (highp int) 0:32 'c1' (highp int) -0:32 128 (const int) +0:32 Constant: +0:32 128 (const int) 0:33 Sequence 0:33 move second child to first child (highp int) 0:33 'c2' (highp int) -0:33 16 (const int) +0:33 Constant: +0:33 16 (const int) 0:34 Sequence 0:34 move second child to first child (highp int) 0:34 'c3' (highp int) -0:34 15 (const int) +0:34 Constant: +0:34 15 (const int) 0:35 Sequence 0:35 move second child to first child (highp int) 0:35 'c4' (highp int) -0:35 32 (const int) +0:35 Constant: +0:35 32 (const int) 0:36 Sequence 0:36 move second child to first child (highp int) 0:36 'c5' (highp int) -0:36 32 (const int) +0:36 Constant: +0:36 32 (const int) 0:37 Sequence 0:37 move second child to first child (highp int) 0:37 'c6' (highp int) -0:37 32 (const int) +0:37 Constant: +0:37 32 (const int) 0:38 Sequence 0:38 move second child to first child (highp int) 0:38 'c7' (highp int) -0:38 16 (const int) +0:38 Constant: +0:38 16 (const int) 0:39 Sequence 0:39 move second child to first child (highp int) 0:39 'c8' (highp int) -0:39 32 (const int) +0:39 Constant: +0:39 32 (const int) 0:40 Sequence 0:40 move second child to first child (highp int) 0:40 'c9' (highp int) -0:40 -8 (const int) +0:40 Constant: +0:40 -8 (const int) 0:41 Sequence 0:41 move second child to first child (highp int) 0:41 'c10' (highp int) -0:41 7 (const int) +0:41 Constant: +0:41 7 (const int) 0:43 Sequence 0:43 move second child to first child (highp 3X4 matrix of float) 0:43 'tm' (highp 3X4 matrix of float) @@ -99,27 +110,32 @@ ERROR: node is still EOpNull! 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 'm44' (uniform highp 4X4 matrix of float) -0:49 2 (const int) +0:49 Constant: +0:49 2 (const int) 0:50 move second child to first child (highp float) 0:50 'gl_PointSize' (gl_PointSize highp float) 0:50 direct index (highp float) 0:50 'v2' (smooth out highp 2-component vector of float) -0:50 1 (const int) +0:50 Constant: +0:50 1 (const int) 0:52 move second child to first child (highp 3-component vector of float) 0:52 c: direct index for structure (highp 3-component vector of float) 0:52 's' (smooth out structure) -0:52 0 (const int) +0:52 Constant: +0:52 0 (const int) 0:52 'v3' (in highp 3-component vector of float) 0:53 move second child to first child (highp float) 0:53 f: direct index for structure (highp float) 0:53 's' (smooth out structure) -0:53 1 (const int) +0:53 Constant: +0:53 1 (const int) 0:53 'dm' (highp float) 0:68 Sequence 0:68 move second child to first child (2-element array of highp float) 0:68 'okayA' (2-element array of highp float) -0:68 3.000000 -0:68 4.000000 +0:68 Constant: +0:68 3.000000 +0:68 4.000000 0:? Linker Objects 0:? 'm43' (uniform highp 4X3 matrix of float) 0:? 'm33' (uniform highp 3X3 matrix of float) diff --git a/Test/baseResults/300BuiltIns.frag.out b/Test/baseResults/300BuiltIns.frag.out index 91b0218..bababaf 100644 --- a/Test/baseResults/300BuiltIns.frag.out +++ b/Test/baseResults/300BuiltIns.frag.out @@ -180,7 +180,8 @@ ERROR: node is still EOpNull! 0:67 'v18' (mediump 2-component vector of float) 0:67 unpackHalf2x16 (mediump 2-component vector of float) 0:67 'uy' (mediump uint) -0:70 0.000000 +0:70 Constant: +0:70 0.000000 0:? Linker Objects 0:? 'imax' (mediump int) 0:? 'imin' (mediump int) diff --git a/Test/baseResults/300block.frag.out b/Test/baseResults/300block.frag.out index ec460b4..adcc273 100644 --- a/Test/baseResults/300block.frag.out +++ b/Test/baseResults/300block.frag.out @@ -11,33 +11,42 @@ ERROR: node is still EOpNull! 0:44 Function Call: texture(is31;vf3; (mediump 4-component vector of int) 0:44 sampler: direct index for structure (lowp isampler3D) 0:44 's' (uniform structure) -0:44 2 (const int) +0:44 Constant: +0:44 2 (const int) 0:44 Construct vec3 (3-component vector of float) 0:44 Convert int to float (float) 0:44 ni: direct index for structure (layout(column_major shared ) mediump int) 0:44 'inst' (layout(shared ) uniform block) -0:44 1 (const int) +0:44 Constant: +0:44 1 (const int) 0:44 Convert uint to float (float) 0:44 direct index (mediump uint) 0:44 bv: direct index for structure (layout(column_major shared ) mediump 4-component vector of uint) 0:44 '__anon__0' (layout(shared ) uniform block) -0:44 0 (const uint) -0:44 1 (const int) +0:44 Constant: +0:44 0 (const uint) +0:44 Constant: +0:44 1 (const int) 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(shared ) uniform block) 0:44 'insts' (layout(shared ) uniform 4-element array of block) -0:44 2 (const int) -0:44 0 (const int) -0:44 2 (const int) +0:44 Constant: +0:44 2 (const int) +0:44 Constant: +0:44 0 (const int) +0:44 Constant: +0:44 2 (const int) 0:45 indirect index (layout(shared ) uniform block) 0:45 'insts' (layout(shared ) uniform 4-element array of block) 0:45 direct index (mediump uint) 0:45 v: direct index for structure (mediump 4-component vector of uint) 0:45 's' (uniform structure) -0:45 1 (const int) -0:45 0 (const int) +0:45 Constant: +0:45 1 (const int) +0:45 Constant: +0:45 0 (const int) 0:? Linker Objects 0:? 's' (uniform structure) 0:? '__anon__0' (layout(shared ) uniform block) diff --git a/Test/baseResults/300layout.frag.out b/Test/baseResults/300layout.frag.out index f2128e1..58d870d 100644 --- a/Test/baseResults/300layout.frag.out +++ b/Test/baseResults/300layout.frag.out @@ -14,7 +14,8 @@ ERROR: node is still EOpNull! 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 'q' (layout(location=4 ) out 2-element array of mediump 4-component vector of float) -0:14 1 (const int) +0:14 Constant: +0:14 1 (const int) 0:14 'pos' (smooth in mediump 4-component vector of float) 0:? Linker Objects 0:? 'pos' (smooth in mediump 4-component vector of float) diff --git a/Test/baseResults/300layout.vert.out b/Test/baseResults/300layout.vert.out index 77f487d..ae82733 100644 --- a/Test/baseResults/300layout.vert.out +++ b/Test/baseResults/300layout.vert.out @@ -26,26 +26,32 @@ ERROR: node is still EOpNull! 0:43 add (highp 4X4 matrix of float) 0:43 M1: direct index for structure (layout(row_major std140 ) highp 4X4 matrix of float) 0:43 'tblock' (layout(std140 ) uniform block) -0:43 0 (const int) +0:43 Constant: +0:43 0 (const int) 0:43 M2: direct index for structure (layout(column_major std140 ) highp 4X4 matrix of float) 0:43 'tblock' (layout(std140 ) uniform block) -0:43 1 (const int) +0:43 Constant: +0:43 1 (const int) 0:43 M4: direct index for structure (layout(row_major shared ) highp 4X4 matrix of float) 0:43 '__anon__1' (layout(shared ) uniform block) -0:43 1 (const uint) +0:43 Constant: +0:43 1 (const uint) 0:43 M3: direct index for structure (layout(column_major shared ) highp 4X4 matrix of float) 0:43 '__anon__1' (layout(shared ) uniform block) -0:43 0 (const uint) +0:43 Constant: +0:43 0 (const uint) 0:43 t2m: direct index for structure (layout(row_major shared ) highp 4X4 matrix of float) 0:43 '__anon__0' (layout(shared ) uniform block) -0:43 1 (const uint) +0:43 Constant: +0:43 1 (const uint) 0:44 move second child to first child (highp 3-component vector of float) 0:44 'color' (smooth out highp 3-component vector of float) 0:44 vector-times-matrix (highp 3-component vector of float) 0:44 'c' (layout(location=7 ) in highp 3-component vector of float) 0:44 N1: direct index for structure (layout(row_major std140 ) highp 3X3 matrix of float) 0:44 'tblock' (layout(std140 ) uniform block) -0:44 2 (const int) +0:44 Constant: +0:44 2 (const int) 0:? Linker Objects 0:? 'c' (layout(location=7 ) in highp 3-component vector of float) 0:? 'p' (layout(location=3 ) in highp 4-component vector of float) diff --git a/Test/baseResults/300operations.frag.out b/Test/baseResults/300operations.frag.out index a40b7f7..b480785 100644 --- a/Test/baseResults/300operations.frag.out +++ b/Test/baseResults/300operations.frag.out @@ -78,18 +78,30 @@ ERROR: node is still EOpNull! 0:46 's' (structure) 0:47 'a' (5-element array of mediump float) 0:48 'b3' (3-component vector of bool) -0:50 false (const bool) -0:51 false (const bool) -0:52 false (const bool) -0:53 false (const bool) -0:54 false (const bool) -0:55 false (const bool) -0:57 false (const bool) -0:58 false (const bool) -0:59 false (const bool) -0:60 false (const bool) -0:61 false (const bool) -0:62 false (const bool) +0:50 Constant: +0:50 false (const bool) +0:51 Constant: +0:51 false (const bool) +0:52 Constant: +0:52 false (const bool) +0:53 Constant: +0:53 false (const bool) +0:54 Constant: +0:54 false (const bool) +0:55 Constant: +0:55 false (const bool) +0:57 Constant: +0:57 false (const bool) +0:58 Constant: +0:58 false (const bool) +0:59 Constant: +0:59 false (const bool) +0:60 Constant: +0:60 false (const bool) +0:61 Constant: +0:61 false (const bool) +0:62 Constant: +0:62 false (const bool) 0:64 'u' (mediump uint) 0:65 'i' (mediump int) 0:66 'm2' (mediump 2X2 matrix of float) @@ -132,10 +144,12 @@ ERROR: node is still EOpNull! 0:96 'iv3' (mediump 3-component vector of int) 0:98 mod second child into first child (mediump int) 0:98 'i' (mediump int) -0:98 3 (const int) +0:98 Constant: +0:98 3 (const int) 0:99 mod (mediump 3-component vector of uint) 0:99 'uv3' (mediump 3-component vector of uint) -0:99 4 (const uint) +0:99 Constant: +0:99 4 (const uint) 0:100 Pre-Decrement (mediump 2X2 matrix of float) 0:100 'm2' (mediump 2X2 matrix of float) 0:101 Post-Increment (mediump 4-component vector of int) diff --git a/Test/baseResults/300scope.vert.out b/Test/baseResults/300scope.vert.out index ba95ec3..55699cb 100644 --- a/Test/baseResults/300scope.vert.out +++ b/Test/baseResults/300scope.vert.out @@ -23,7 +23,8 @@ ERROR: node is still EOpNull! 0:8 add (highp float) 0:8 Convert int to float (highp float) 0:8 'a' (in highp int) -0:8 1.000000 +0:8 Constant: +0:8 1.000000 0:11 Branch: Return with expression 0:11 'a' (in highp int) 0:22 Function Definition: cos(f1; (highp float) @@ -31,19 +32,24 @@ ERROR: node is still EOpNull! 0:22 'x' (in highp float) 0:24 Sequence 0:24 Branch: Return with expression -0:24 1.000000 +0:24 Constant: +0:24 1.000000 0:29 Function Definition: main( (void) 0:29 Function Parameters: 0:? Sequence 0:32 Function Call: g( (highp int) 0:35 'sin' (highp float) 0:37 Function Call: f(i1;i1;i1; (highp int) -0:37 1 (const int) -0:37 2 (const int) -0:37 3 (const int) +0:37 Constant: +0:37 1 (const int) +0:37 Constant: +0:37 2 (const int) +0:37 Constant: +0:37 3 (const int) 0:40 move second child to first child (highp float) 0:40 'f' (highp float) -0:40 3.000000 +0:40 Constant: +0:40 3.000000 0:42 move second child to first child (highp 4-component vector of float) 0:42 'gl_Position' (invariant gl_Position highp 4-component vector of float) 0:42 Construct vec4 (highp 4-component vector of float) @@ -52,12 +58,14 @@ ERROR: node is still EOpNull! 0:44 Sequence 0:44 move second child to first child (highp int) 0:44 'f' (highp int) -0:44 0 (const int) +0:44 Constant: +0:44 0 (const int) 0:44 Loop with condition tested first 0:44 Loop Condition 0:44 Compare Less Than (bool) 0:44 'f' (highp int) -0:44 10 (const int) +0:44 Constant: +0:44 10 (const int) 0:44 Loop Body 0:45 Pre-Increment (highp int) 0:45 'f' (highp int) @@ -67,12 +75,14 @@ ERROR: node is still EOpNull! 0:47 Sequence 0:47 move second child to first child (highp int) 0:47 'x' (highp int) -0:47 1 (const int) +0:47 Constant: +0:47 1 (const int) 0:49 Sequence 0:49 Sequence 0:49 move second child to first child (highp float) 0:49 'x' (highp float) -0:49 2.000000 +0:49 Constant: +0:49 2.000000 0:49 move second child to first child (highp float) 0:49 'y' (highp float) 0:49 'x' (highp float) @@ -85,10 +95,12 @@ ERROR: node is still EOpNull! 0:61 Sequence 0:61 move second child to first child (structure) 0:61 'S' (structure) -0:61 0 (const int) +0:61 Constant: +0:61 0 (const int) 0:62 x: direct index for structure (highp int) 0:62 'S' (structure) -0:62 0 (const int) +0:62 Constant: +0:62 0 (const int) 0:? Linker Objects 0:? 'b' (bool) 0:? 'gl_VertexID' (gl_VertexId highp int) diff --git a/Test/baseResults/330.frag.out b/Test/baseResults/330.frag.out index 61aa5bf..8e5906b 100644 --- a/Test/baseResults/330.frag.out +++ b/Test/baseResults/330.frag.out @@ -9,12 +9,14 @@ WARNING: 0:6: varying deprecated in version 130; may be removed in future releas 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 'gl_FragData' (fragColor 32-element array of 4-component vector of float) -0:11 1 (const int) +0:11 Constant: +0:11 1 (const int) 0:11 'inVar' (smooth in 4-component vector of float) 0:12 Sequence 0:12 move second child to first child (int) 0:12 'buffer' (int) -0:12 4 (const int) +0:12 Constant: +0:12 4 (const int) 0:? Linker Objects 0:? 'inVar' (smooth in 4-component vector of float) 0:? 'outVar' (out 4-component vector of float) diff --git a/Test/baseResults/330comp.frag.out b/Test/baseResults/330comp.frag.out index 993804c..1917bb4 100644 --- a/Test/baseResults/330comp.frag.out +++ b/Test/baseResults/330comp.frag.out @@ -8,7 +8,8 @@ 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 'gl_FragData' (fragColor 32-element array of 4-component vector of float) -0:11 1 (const int) +0:11 Constant: +0:11 1 (const int) 0:11 vector-times-matrix (4-component vector of float) 0:11 'inVar' (smooth in 4-component vector of float) 0:11 'gl_ModelViewMatrix' (uniform 4X4 matrix of float) diff --git a/Test/baseResults/400.geom.out b/Test/baseResults/400.geom.out index b32b57f..88769fd 100644 --- a/Test/baseResults/400.geom.out +++ b/Test/baseResults/400.geom.out @@ -3,9 +3,11 @@ 0:3 Function Parameters: 0:5 Sequence 0:5 EmitStreamVertex (void) -0:5 1 (const int) +0:5 Constant: +0:5 1 (const int) 0:6 EndStreamPrimitive (void) -0:6 0 (const int) +0:6 Constant: +0:6 0 (const int) 0:7 EmitVertex (void) 0:8 EndPrimitive (void) 0:? Linker Objects diff --git a/Test/baseResults/400.tese.out b/Test/baseResults/400.tese.out index 67821cf..033c642 100644 --- a/Test/baseResults/400.tese.out +++ b/Test/baseResults/400.tese.out @@ -5,6 +5,7 @@ ERROR: node is still EOpNull! 0:3 Function Definition: main( (void) 0:3 Function Parameters: 0:5 Sequence -0:5 0.000000 +0:5 Constant: +0:5 0.000000 0:? Linker Objects diff --git a/Test/baseResults/420.vert.out b/Test/baseResults/420.vert.out index 4150d4e..01bfda7 100644 --- a/Test/baseResults/420.vert.out +++ b/Test/baseResults/420.vert.out @@ -22,7 +22,8 @@ ERROR: node is still EOpNull! 0:18 Condition 0:18 Compare Equal (bool) 0:18 'i' (int) -0:18 3 (const int) +0:18 Constant: +0:18 3 (const int) 0:18 true case 0:19 Sequence 0:19 move second child to first child (int) @@ -30,7 +31,8 @@ ERROR: node is still EOpNull! 0:19 'i' (int) 0:25 Loop with condition tested first 0:25 Loop Condition -0:25 true (const bool) +0:25 Constant: +0:25 true (const bool) 0:25 No loop body 0:30 Function Definition: bar(vf4; (void) 0:30 Function Parameters: diff --git a/Test/baseResults/430scope.vert.out b/Test/baseResults/430scope.vert.out index 39d2556..7a42aa7 100644 --- a/Test/baseResults/430scope.vert.out +++ b/Test/baseResults/430scope.vert.out @@ -19,7 +19,8 @@ ERROR: node is still EOpNull! 0:8 add (float) 0:8 Convert int to float (float) 0:8 'a' (in int) -0:8 1.000000 +0:8 Constant: +0:8 1.000000 0:11 Branch: Return with expression 0:11 'a' (in int) 0:22 Function Definition: cos(f1; (float) @@ -27,19 +28,24 @@ ERROR: node is still EOpNull! 0:22 'x' (in float) 0:24 Sequence 0:24 Branch: Return with expression -0:24 1.000000 +0:24 Constant: +0:24 1.000000 0:29 Function Definition: main( (void) 0:29 Function Parameters: 0:? Sequence 0:32 Function Call: g( (int) 0:35 'sin' (float) 0:37 Function Call: f(i1;i1;i1; (int) -0:37 1 (const int) -0:37 2 (const int) -0:37 3 (const int) +0:37 Constant: +0:37 1 (const int) +0:37 Constant: +0:37 2 (const int) +0:37 Constant: +0:37 3 (const int) 0:40 move second child to first child (float) 0:40 'f' (float) -0:40 3.000000 +0:40 Constant: +0:40 3.000000 0:42 move second child to first child (4-component vector of float) 0:42 'gl_Position' (invariant gl_Position 4-component vector of float) 0:42 Construct vec4 (4-component vector of float) @@ -48,12 +54,14 @@ ERROR: node is still EOpNull! 0:44 Sequence 0:44 move second child to first child (int) 0:44 'f' (int) -0:44 0 (const int) +0:44 Constant: +0:44 0 (const int) 0:44 Loop with condition tested first 0:44 Loop Condition 0:44 Compare Less Than (bool) 0:44 'f' (int) -0:44 10 (const int) +0:44 Constant: +0:44 10 (const int) 0:44 Loop Body 0:45 Pre-Increment (int) 0:45 'f' (int) @@ -63,12 +71,14 @@ ERROR: node is still EOpNull! 0:47 Sequence 0:47 move second child to first child (int) 0:47 'x' (int) -0:47 1 (const int) +0:47 Constant: +0:47 1 (const int) 0:49 Sequence 0:49 Sequence 0:49 move second child to first child (float) 0:49 'x' (float) -0:49 2.000000 +0:49 Constant: +0:49 2.000000 0:49 move second child to first child (float) 0:49 'y' (float) 0:49 'x' (float) @@ -81,10 +91,12 @@ ERROR: node is still EOpNull! 0:61 Sequence 0:61 move second child to first child (structure) 0:61 'S' (structure) -0:61 0 (const int) +0:61 Constant: +0:61 0 (const int) 0:62 x: direct index for structure (int) 0:62 'S' (structure) -0:62 0 (const int) +0:62 Constant: +0:62 0 (const int) 0:? Linker Objects 0:? 'b' (bool) 0:? 'tan' (float) diff --git a/Test/baseResults/Operations.frag.out b/Test/baseResults/Operations.frag.out index ff98593..f882301 100644 --- a/Test/baseResults/Operations.frag.out +++ b/Test/baseResults/Operations.frag.out @@ -124,7 +124,8 @@ 0:63 'v' (4-component vector of float) 0:63 direct index (float) 0:63 'v' (4-component vector of float) -0:63 0 (const int) +0:63 Constant: +0:63 0 (const int) 0:69 add second child into first child (4-component vector of float) 0:69 'v' (4-component vector of float) 0:69 min (4-component vector of float) @@ -299,7 +300,8 @@ 0:142 'ui' (uniform int) 0:142 Compare Not Equal (bool) 0:142 'i' (int) -0:142 2 (const int) +0:142 Constant: +0:142 2 (const int) 0:142 true case 0:143 Pre-Increment (int) 0:143 'i' (int) @@ -340,16 +342,23 @@ 0:151 vector swizzle (3-component vector of float) 0:151 'v' (4-component vector of float) 0:151 Sequence -0:151 0 (const int) -0:151 1 (const int) -0:151 2 (const int) +0:151 Constant: +0:151 0 (const int) +0:151 Constant: +0:151 1 (const int) +0:151 Constant: +0:151 2 (const int) 0:151 vector swizzle (3-component vector of float) 0:151 'v' (4-component vector of float) 0:151 Sequence -0:151 0 (const int) -0:151 1 (const int) -0:151 2 (const int) -0:151 0 (const int) +0:151 Constant: +0:151 0 (const int) +0:151 Constant: +0:151 1 (const int) +0:151 Constant: +0:151 2 (const int) +0:151 Constant: +0:151 0 (const int) 0:153 Test condition and select (void) 0:153 Condition 0:153 logical-or (bool) @@ -362,7 +371,8 @@ 0:153 'uf' (uniform float) 0:153 Compare Not Equal (bool) 0:153 'f' (float) -0:153 2.000000 +0:153 Constant: +0:153 2.000000 0:153 true case 0:154 Pre-Increment (float) 0:154 'f' (float) @@ -371,16 +381,19 @@ 0:156 'ui' (uniform int) 0:157 or second child into first child (int) 0:157 'i' (int) -0:157 66 (const int) +0:157 Constant: +0:157 66 (const int) 0:158 exclusive or second child into first child (int) 0:158 'i' (int) 0:158 'ui' (uniform int) 0:159 mod second child into first child (int) 0:159 'i' (int) -0:159 17 (const int) +0:159 Constant: +0:159 17 (const int) 0:160 right shift second child into first child (int) 0:160 'i' (int) -0:160 2 (const int) +0:160 Constant: +0:160 2 (const int) 0:161 left shift second child into first child (int) 0:161 'i' (int) 0:161 'ui' (uniform int) diff --git a/Test/baseResults/aggOps.frag.out b/Test/baseResults/aggOps.frag.out index a8fc4b8..5ce7323 100644 --- a/Test/baseResults/aggOps.frag.out +++ b/Test/baseResults/aggOps.frag.out @@ -11,41 +11,51 @@ WARNING: 0:6: varying deprecated in version 130; may be removed in future releas 0:27 Convert float to int (int) 0:27 direct index (float) 0:27 'u' (smooth in 4-component vector of float) -0:27 0 (const int) +0:27 Constant: +0:27 0 (const int) 0:27 direct index (float) 0:27 'u' (smooth in 4-component vector of float) -0:27 1 (const int) +0:27 Constant: +0:27 1 (const int) 0:27 Construct structure (structure) 0:27 Convert float to int (int) 0:27 direct index (float) 0:27 'u' (smooth in 4-component vector of float) -0:27 2 (const int) +0:27 Constant: +0:27 2 (const int) 0:27 direct index (float) 0:27 'u' (smooth in 4-component vector of float) -0:27 3 (const int) -0:27 14 (const int) -0:27 14.000000 +0:27 Constant: +0:27 3 (const int) +0:27 Constant: +0:27 14 (const int) +0:27 14.000000 0:28 move second child to first child (3-element array of structure) 0:28 'b' (3-element array of structure) 0:28 Construct structure (3-element array of structure) -0:28 17 (const int) -0:28 17.000000 +0:28 Constant: +0:28 17 (const int) +0:28 17.000000 0:28 Construct structure (structure) 0:28 Convert float to int (int) 0:28 direct index (float) 0:28 'w' (smooth in 4-component vector of float) -0:28 0 (const int) +0:28 Constant: +0:28 0 (const int) 0:28 direct index (float) 0:28 'w' (smooth in 4-component vector of float) -0:28 1 (const int) +0:28 Constant: +0:28 1 (const int) 0:28 Construct structure (structure) 0:28 Convert float to int (int) 0:28 direct index (float) 0:28 'w' (smooth in 4-component vector of float) -0:28 2 (const int) +0:28 Constant: +0:28 2 (const int) 0:28 direct index (float) 0:28 'w' (smooth in 4-component vector of float) -0:28 3 (const int) +0:28 Constant: +0:28 3 (const int) 0:30 Test condition and select (void) 0:30 Condition 0:30 Compare Equal (bool) @@ -63,7 +73,8 @@ WARNING: 0:6: varying deprecated in version 130; may be removed in future releas 0:33 Function Call: texture2D(s21;vf2; (4-component vector of float) 0:33 'sampler' (uniform sampler2D) 0:33 vector-scale (2-component vector of float) -0:33 2.000000 +0:33 Constant: +0:33 2.000000 0:33 'coord' (smooth in 2-component vector of float) 0:35 Test condition and select (void) 0:35 Condition @@ -73,7 +84,8 @@ WARNING: 0:6: varying deprecated in version 130; may be removed in future releas 0:35 true case 0:36 vector scale second child into first child (4-component vector of float) 0:36 'v' (4-component vector of float) -0:36 3.000000 +0:36 Constant: +0:36 3.000000 0:38 Test condition and select (void) 0:38 Condition 0:38 Compare Not Equal (bool) @@ -82,7 +94,8 @@ WARNING: 0:6: varying deprecated in version 130; may be removed in future releas 0:38 true case 0:39 vector scale second child into first child (4-component vector of float) 0:39 'v' (4-component vector of float) -0:39 4.000000 +0:39 Constant: +0:39 4.000000 0:41 Test condition and select (void) 0:41 Condition 0:41 Compare Equal (bool) @@ -90,12 +103,15 @@ WARNING: 0:6: varying deprecated in version 130; may be removed in future releas 0:41 vector swizzle (2-component vector of float) 0:41 'v' (4-component vector of float) 0:41 Sequence -0:41 1 (const int) -0:41 3 (const int) +0:41 Constant: +0:41 1 (const int) +0:41 Constant: +0:41 3 (const int) 0:41 true case 0:42 vector scale second child into first child (4-component vector of float) 0:42 'v' (4-component vector of float) -0:42 5.000000 +0:42 Constant: +0:42 5.000000 0:44 Test condition and select (void) 0:44 Condition 0:44 Compare Equal (bool) @@ -104,7 +120,8 @@ WARNING: 0:6: varying deprecated in version 130; may be removed in future releas 0:44 true case 0:45 vector scale second child into first child (4-component vector of float) 0:45 'v' (4-component vector of float) -0:45 6.000000 +0:45 Constant: +0:45 6.000000 0:47 Test condition and select (void) 0:47 Condition 0:47 Compare Not Equal (bool) @@ -113,7 +130,8 @@ WARNING: 0:6: varying deprecated in version 130; may be removed in future releas 0:47 true case 0:48 vector scale second child into first child (4-component vector of float) 0:48 'v' (4-component vector of float) -0:48 7.000000 +0:48 Constant: +0:48 7.000000 0:50 move second child to first child (4-component vector of float) 0:50 'gl_FragColor' (fragColor 4-component vector of float) 0:50 'v' (4-component vector of float) diff --git a/Test/baseResults/always-discard.frag.out b/Test/baseResults/always-discard.frag.out index 9dedfb6..579e3ec 100644 --- a/Test/baseResults/always-discard.frag.out +++ b/Test/baseResults/always-discard.frag.out @@ -5,17 +5,19 @@ 0:6 Sequence 0:6 move second child to first child (4-component vector of float) 0:6 'white' (4-component vector of float) -0:6 1.000000 -0:6 1.000000 -0:6 1.000000 -0:6 1.000000 +0:6 Constant: +0:6 1.000000 +0:6 1.000000 +0:6 1.000000 +0:6 1.000000 0:7 Sequence 0:7 move second child to first child (4-component vector of float) 0:7 'black' (4-component vector of float) -0:7 0.200000 -0:7 0.200000 -0:7 0.200000 -0:7 0.200000 +0:7 Constant: +0:7 0.200000 +0:7 0.200000 +0:7 0.200000 +0:7 0.200000 0:8 Sequence 0:8 move second child to first child (4-component vector of float) 0:8 'color' (4-component vector of float) @@ -27,9 +29,12 @@ 0:11 component-wise multiply (float) 0:11 direct index (float) 0:11 'tex_coord' (smooth in 2-component vector of float) -0:11 0 (const int) -0:11 2.000000 -0:11 1.000000 +0:11 Constant: +0:11 0 (const int) +0:11 Constant: +0:11 2.000000 +0:11 Constant: +0:11 1.000000 0:12 Sequence 0:12 move second child to first child (float) 0:12 'y' (float) @@ -37,9 +42,12 @@ 0:12 component-wise multiply (float) 0:12 direct index (float) 0:12 'tex_coord' (smooth in 2-component vector of float) -0:12 1 (const int) -0:12 2.000000 -0:12 1.000000 +0:12 Constant: +0:12 1 (const int) +0:12 Constant: +0:12 2.000000 +0:12 Constant: +0:12 1.000000 0:14 Sequence 0:14 move second child to first child (float) 0:14 'radius' (float) @@ -55,14 +63,16 @@ 0:15 Condition 0:15 Compare Greater Than (bool) 0:15 'radius' (float) -0:15 1.000000 +0:15 Constant: +0:15 1.000000 0:15 true case 0:16 Sequence 0:16 Test condition and select (void) 0:16 Condition 0:16 Compare Greater Than (bool) 0:16 'radius' (float) -0:16 1.100000 +0:16 Constant: +0:16 1.100000 0:16 true case 0:17 Sequence 0:17 Pre-Increment (4-component vector of float) @@ -74,7 +84,8 @@ 0:22 Condition 0:22 Compare Greater Than (bool) 0:22 'radius' (float) -0:22 1.200000 +0:22 Constant: +0:22 1.200000 0:22 true case 0:23 Sequence 0:23 Pre-Increment (4-component vector of float) @@ -84,7 +95,8 @@ 0:31 Condition 0:31 Compare Greater Than or Equal (bool) 0:31 'radius' (float) -0:31 0.750000 +0:31 Constant: +0:31 0.750000 0:31 true case 0:32 subtract second child into first child (4-component vector of float) 0:32 'color' (4-component vector of float) @@ -92,8 +104,10 @@ 0:32 divide (float) 0:32 pow (float) 0:32 'radius' (float) -0:32 16.000000 -0:32 2.000000 +0:32 Constant: +0:32 16.000000 +0:32 Constant: +0:32 2.000000 0:34 move second child to first child (4-component vector of float) 0:34 'gl_FragColor' (fragColor 4-component vector of float) 0:34 'color' (4-component vector of float) diff --git a/Test/baseResults/always-discard2.frag.out b/Test/baseResults/always-discard2.frag.out index e45cdb8..401fab7 100644 --- a/Test/baseResults/always-discard2.frag.out +++ b/Test/baseResults/always-discard2.frag.out @@ -5,17 +5,19 @@ 0:6 Sequence 0:6 move second child to first child (4-component vector of float) 0:6 'white' (4-component vector of float) -0:6 1.000000 -0:6 1.000000 -0:6 1.000000 -0:6 1.000000 +0:6 Constant: +0:6 1.000000 +0:6 1.000000 +0:6 1.000000 +0:6 1.000000 0:7 Sequence 0:7 move second child to first child (4-component vector of float) 0:7 'black' (4-component vector of float) -0:7 0.200000 -0:7 0.200000 -0:7 0.200000 -0:7 0.200000 +0:7 Constant: +0:7 0.200000 +0:7 0.200000 +0:7 0.200000 +0:7 0.200000 0:8 Sequence 0:8 move second child to first child (4-component vector of float) 0:8 'color' (4-component vector of float) @@ -27,9 +29,12 @@ 0:11 component-wise multiply (float) 0:11 direct index (float) 0:11 'tex_coord' (smooth in 2-component vector of float) -0:11 0 (const int) -0:11 2.000000 -0:11 1.000000 +0:11 Constant: +0:11 0 (const int) +0:11 Constant: +0:11 2.000000 +0:11 Constant: +0:11 1.000000 0:12 Sequence 0:12 move second child to first child (float) 0:12 'y' (float) @@ -37,9 +42,12 @@ 0:12 component-wise multiply (float) 0:12 direct index (float) 0:12 'tex_coord' (smooth in 2-component vector of float) -0:12 1 (const int) -0:12 2.000000 -0:12 1.000000 +0:12 Constant: +0:12 1 (const int) +0:12 Constant: +0:12 2.000000 +0:12 Constant: +0:12 1.000000 0:14 Branch: Kill 0:17 move second child to first child (4-component vector of float) 0:17 'gl_FragColor' (fragColor 4-component vector of float) diff --git a/Test/baseResults/array.frag.out b/Test/baseResults/array.frag.out index fa745eb..eac0736 100644 --- a/Test/baseResults/array.frag.out +++ b/Test/baseResults/array.frag.out @@ -23,16 +23,20 @@ ERROR: node is still EOpNull! 0:11 Construct float (4-element array of float) 0:11 direct index (in float) 0:11 'a' (in 5-element array of float) -0:11 0 (const int) +0:11 Constant: +0:11 0 (const int) 0:11 direct index (in float) 0:11 'a' (in 5-element array of float) -0:11 1 (const int) +0:11 Constant: +0:11 1 (const int) 0:11 direct index (in float) 0:11 'a' (in 5-element array of float) -0:11 2 (const int) +0:11 Constant: +0:11 2 (const int) 0:11 direct index (in float) 0:11 'a' (in 5-element array of float) -0:11 3 (const int) +0:11 Constant: +0:11 3 (const int) 0:14 Function Definition: bar(f1[5]; (void) 0:14 Function Parameters: 0:14 '' (in 5-element array of float) @@ -43,109 +47,138 @@ ERROR: node is still EOpNull! 0:21 move second child to first child (float) 0:21 direct index (float) 0:21 'gu' (2-element array of float) -0:21 2 (const int) -0:21 4.000000 +0:21 Constant: +0:21 2 (const int) +0:21 Constant: +0:21 4.000000 0:24 move second child to first child (float) 0:24 direct index (float) 0:24 'gu' (unsized array of float) -0:24 2 (const int) -0:24 4.000000 +0:24 Constant: +0:24 2 (const int) +0:24 Constant: +0:24 4.000000 0:26 move second child to first child (float) 0:26 direct index (float) 0:26 'gu' (unsized array of float) -0:26 3 (const int) -0:26 3.000000 +0:26 Constant: +0:26 3 (const int) +0:26 Constant: +0:26 3.000000 0:27 move second child to first child (float) 0:27 indirect index (float) 0:27 'gu' (unsized array of float) 0:27 'a' (uniform int) -0:27 5.000000 +0:27 Constant: +0:27 5.000000 0:29 move second child to first child (4-element array of float) 0:29 'g4' (4-element array of float) 0:29 Function Call: foo(f1[5]; (4-element array of float) 0:29 'g5' (5-element array of float) 0:30 'g5' (5-element array of float) 0:31 'gu' (unsized array of float) -0:33 0.000000 +0:33 Constant: +0:33 0.000000 0:34 Function Call: bar(f1[5]; (void) 0:34 'g5' (5-element array of float) 0:36 Test condition and select (void) 0:36 Condition 0:36 Compare Equal (bool) -0:36 1.000000 -0:36 2.000000 -0:36 3.000000 -0:36 4.000000 +0:36 Constant: +0:36 1.000000 +0:36 2.000000 +0:36 3.000000 +0:36 4.000000 0:36 'g4' (4-element array of float) 0:36 true case 0:37 move second child to first child (float) 0:37 direct index (float) 0:37 'gu' (unsized array of float) -0:37 0 (const int) -0:37 2.000000 +0:37 Constant: +0:37 0 (const int) +0:37 Constant: +0:37 2.000000 0:40 move second child to first child (float) 0:40 direct index (float) 0:40 'u' (5-element array of float) -0:40 2 (const int) -0:40 3.000000 +0:40 Constant: +0:40 2 (const int) +0:40 Constant: +0:40 3.000000 0:42 move second child to first child (float) 0:42 direct index (float) 0:42 'u' (5-element array of float) -0:42 5 (const int) -0:42 5.000000 +0:42 Constant: +0:42 5 (const int) +0:42 Constant: +0:42 5.000000 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 'gl_FragData' (fragColor 32-element array of 4-component vector of float) -0:45 1000 (const int) -0:45 1.000000 -0:45 1.000000 -0:45 1.000000 -0:45 1.000000 +0:45 Constant: +0:45 1000 (const int) +0:45 Constant: +0:45 1.000000 +0:45 1.000000 +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 'gl_FragData' (fragColor 32-element array of 4-component vector of float) -0:46 -1 (const int) -0:46 1.000000 -0:46 1.000000 -0:46 1.000000 -0:46 1.000000 +0:46 Constant: +0:46 -1 (const int) +0:46 Constant: +0:46 1.000000 +0:46 1.000000 +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 'gl_FragData' (fragColor 32-element array of 4-component vector of float) -0:47 3 (const int) -0:47 1.000000 -0:47 1.000000 -0:47 1.000000 -0:47 1.000000 +0:47 Constant: +0:47 3 (const int) +0:47 Constant: +0:47 1.000000 +0:47 1.000000 +0:47 1.000000 +0:47 1.000000 0:50 Sequence 0:50 move second child to first child (int) 0:50 'sum' (int) -0:50 3 (const int) +0:50 Constant: +0:50 3 (const int) 0:51 add second child into first child (int) 0:51 'sum' (int) -0:51 2 (const int) +0:51 Constant: +0:51 2 (const int) 0:52 add second child into first child (int) 0:52 'sum' (int) -0:52 3 (const int) +0:52 Constant: +0:52 3 (const int) 0:55 Sequence 0:55 move second child to first child (2-element array of int) 0:55 'ica' (2-element array of int) -0:55 3 (const int) -0:55 2 (const int) +0:55 Constant: +0:55 3 (const int) +0:55 2 (const int) 0:57 move second child to first child (int) 0:57 direct index (int) 0:57 'ica' (2-element array of int) -0:57 3.100000 -0:57 3 (const int) +0:57 Constant: +0:57 3.100000 +0:57 Constant: +0:57 3 (const int) 0:58 move second child to first child (int) 0:58 indirect index (int) 0:58 'ica' (2-element array of int) 0:58 direct index (float) 0:58 'u' (5-element array of float) -0:58 1 (const int) -0:58 4 (const int) +0:58 Constant: +0:58 1 (const int) +0:58 Constant: +0:58 4 (const int) 0:? Linker Objects 0:? 'gu' (unsized array of float) 0:? 'g4' (4-element array of float) diff --git a/Test/baseResults/array100.frag.out b/Test/baseResults/array100.frag.out index d3eb529..05b5797 100644 --- a/Test/baseResults/array100.frag.out +++ b/Test/baseResults/array100.frag.out @@ -22,16 +22,20 @@ ERROR: node is still EOpNull! 0:11 Construct float (4-element array of float) 0:11 direct index (in mediump float) 0:11 'a' (in 5-element array of mediump float) -0:11 0 (const int) +0:11 Constant: +0:11 0 (const int) 0:11 direct index (in mediump float) 0:11 'a' (in 5-element array of mediump float) -0:11 1 (const int) +0:11 Constant: +0:11 1 (const int) 0:11 direct index (in mediump float) 0:11 'a' (in 5-element array of mediump float) -0:11 2 (const int) +0:11 Constant: +0:11 2 (const int) 0:11 direct index (in mediump float) 0:11 'a' (in 5-element array of mediump float) -0:11 3 (const int) +0:11 Constant: +0:11 3 (const int) 0:14 Function Definition: bar(f1[5]; (void) 0:14 Function Parameters: 0:14 '' (in 5-element array of mediump float) @@ -42,62 +46,76 @@ ERROR: node is still EOpNull! 0:21 move second child to first child (mediump float) 0:21 direct index (mediump float) 0:21 'gu' (2-element array of mediump float) -0:21 2 (const int) -0:21 4.000000 +0:21 Constant: +0:21 2 (const int) +0:21 Constant: +0:21 4.000000 0:24 move second child to first child (4-element array of mediump float) 0:24 'g4' (4-element array of mediump float) 0:24 Function Call: foo(f1[5]; (4-element array of mediump float) 0:24 'g5' (5-element array of mediump float) 0:25 'g5' (5-element array of mediump float) 0:26 'gu' (unsized array of mediump float) -0:28 0.000000 +0:28 Constant: +0:28 0.000000 0:29 Function Call: bar(f1[5]; (void) 0:29 'g5' (5-element array of mediump float) 0:31 Test condition and select (void) 0:31 Condition 0:31 Compare Equal (bool) -0:31 1.000000 -0:31 2.000000 -0:31 3.000000 -0:31 4.000000 +0:31 Constant: +0:31 1.000000 +0:31 2.000000 +0:31 3.000000 +0:31 4.000000 0:31 'g4' (4-element array of mediump float) 0:31 true case 0:32 move second child to first child (mediump float) 0:32 direct index (mediump float) 0:32 'gu' (unsized array of mediump float) -0:32 0 (const int) -0:32 2.000000 +0:32 Constant: +0:32 0 (const int) +0:32 Constant: +0:32 2.000000 0:35 move second child to first child (mediump float) 0:35 direct index (mediump float) 0:35 'u' (5-element array of mediump float) -0:35 5 (const int) -0:35 5.000000 +0:35 Constant: +0:35 5 (const int) +0:35 Constant: +0:35 5.000000 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 (4-component vector of float) 0:38 direct index (fragColor 4-component vector of float) 0:38 'gl_FragData' (fragColor 32-element array of 4-component vector of float) -0:38 1000 (const int) -0:38 1.000000 -0:38 1.000000 -0:38 1.000000 -0:38 1.000000 +0:38 Constant: +0:38 1000 (const int) +0:38 Constant: +0:38 1.000000 +0:38 1.000000 +0:38 1.000000 +0:38 1.000000 0:39 move second child to first child (4-component vector of float) 0:39 direct index (fragColor 4-component vector of float) 0:39 'gl_FragData' (fragColor 32-element array of 4-component vector of float) -0:39 -1 (const int) -0:39 1.000000 -0:39 1.000000 -0:39 1.000000 -0:39 1.000000 +0:39 Constant: +0:39 -1 (const int) +0:39 Constant: +0:39 1.000000 +0:39 1.000000 +0:39 1.000000 +0:39 1.000000 0:40 move second child to first child (4-component vector of float) 0:40 direct index (fragColor 4-component vector of float) 0:40 'gl_FragData' (fragColor 32-element array of 4-component vector of float) -0:40 3 (const int) -0:40 1.000000 -0:40 1.000000 -0:40 1.000000 -0:40 1.000000 +0:40 Constant: +0:40 3 (const int) +0:40 Constant: +0:40 1.000000 +0:40 1.000000 +0:40 1.000000 +0:40 1.000000 0:? Linker Objects 0:? 'gu' (unsized array of mediump float) 0:? 'g4' (4-element array of mediump float) diff --git a/Test/baseResults/conditionalDiscard.frag.out b/Test/baseResults/conditionalDiscard.frag.out index d96b5b6..a4c3e6c 100644 --- a/Test/baseResults/conditionalDiscard.frag.out +++ b/Test/baseResults/conditionalDiscard.frag.out @@ -12,10 +12,11 @@ 0:10 Condition 0:10 Compare Equal (bool) 0:10 'v' (4-component vector of float) -0:10 0.100000 -0:10 0.200000 -0:10 0.300000 -0:10 0.400000 +0:10 Constant: +0:10 0.100000 +0:10 0.200000 +0:10 0.300000 +0:10 0.400000 0:10 true case 0:11 Branch: Kill 0:13 move second child to first child (4-component vector of float) diff --git a/Test/baseResults/constErrors.frag.out b/Test/baseResults/constErrors.frag.out index 8291315..692529e 100644 --- a/Test/baseResults/constErrors.frag.out +++ b/Test/baseResults/constErrors.frag.out @@ -16,6 +16,7 @@ ERROR: node is still EOpNull! 0:? 'inVar' (smooth in 4-component vector of float) 0:? 'outVar' (out 4-component vector of float) 0:? 'constInt' (const int) +0:? 3 (const int) 0:? 'uniformInt' (uniform int) 0:? 's' (structure) 0:? 's2' (structure) diff --git a/Test/baseResults/constFold.frag.out b/Test/baseResults/constFold.frag.out index 8d7b120..539a331 100644 --- a/Test/baseResults/constFold.frag.out +++ b/Test/baseResults/constFold.frag.out @@ -9,143 +9,177 @@ 0:30 'inv' (smooth in 4-component vector of float) 0:37 move second child to first child (4-component vector of float) 0:37 'FragColor' (out 4-component vector of float) -0:37 2.000000 -0:37 6.000000 -0:37 3.000000 -0:37 171.887339 +0:37 Constant: +0:37 2.000000 +0:37 6.000000 +0:37 3.000000 +0:37 171.887339 0:42 move second child to first child (4-component vector of float) 0:42 'FragColor' (out 4-component vector of float) -0:42 3.000000 -0:42 2.000000 -0:42 0.001593 -0:42 -0.999999 +0:42 Constant: +0:42 3.000000 +0:42 2.000000 +0:42 0.001593 +0:42 -0.999999 0:43 move second child to first child (2-component vector of float) 0:43 'out2' (out 2-component vector of float) -0:43 5.600000 -0:43 5.800000 +0:43 Constant: +0:43 5.600000 +0:43 5.800000 0:44 move second child to first child (4-component vector of float) 0:44 'out3' (out 4-component vector of float) -0:44 20.085537 -0:44 2.302585 -0:44 16.000000 -0:44 8.000000 +0:44 Constant: +0:44 20.085537 +0:44 2.302585 +0:44 16.000000 +0:44 8.000000 0:45 move second child to first child (4-component vector of float) 0:45 'out4' (out 4-component vector of float) -0:45 10.000000 -0:45 0.100000 -0:45 4.700000 -0:45 10.900000 +0:45 Constant: +0:45 10.000000 +0:45 0.100000 +0:45 4.700000 +0:45 10.900000 0:46 move second child to first child (4-component vector of int) 0:46 'out5' (out 4-component vector of int) -0:46 8 (const int) -0:46 17 (const int) -0:46 -1 (const int) -0:46 1 (const int) +0:46 Constant: +0:46 8 (const int) +0:46 17 (const int) +0:46 -1 (const int) +0:46 1 (const int) 0:47 move second child to first child (3-component vector of float) 0:47 'out6' (out 3-component vector of float) -0:47 -1.000000 -0:47 1.000000 -0:47 0.000000 +0:47 Constant: +0:47 -1.000000 +0:47 1.000000 +0:47 0.000000 0:48 move second child to first child (4-component vector of float) 0:48 'out7' (out 4-component vector of float) -0:48 4.000000 -0:48 -4.000000 -0:48 5.000000 -0:48 -5.000000 +0:48 Constant: +0:48 4.000000 +0:48 -4.000000 +0:48 5.000000 +0:48 -5.000000 0:49 move second child to first child (4-component vector of float) 0:49 'out8' (out 4-component vector of float) -0:49 4.000000 -0:49 5.000000 -0:49 4.000000 -0:49 -6.000000 +0:49 Constant: +0:49 4.000000 +0:49 5.000000 +0:49 4.000000 +0:49 -6.000000 0:50 move second child to first child (4-component vector of float) 0:50 'out9' (out 4-component vector of float) -0:50 8.000000 -0:50 -4.000000 -0:50 0.345000 -0:50 0.400000 +0:50 Constant: +0:50 8.000000 +0:50 -4.000000 +0:50 0.345000 +0:50 0.400000 0:51 move second child to first child (4-component vector of float) 0:51 'out10' (out 4-component vector of float) -0:51 1.000000 -0:51 1.000000 -0:51 0.000000 -0:51 0.000000 +0:51 Constant: +0:51 1.000000 +0:51 1.000000 +0:51 0.000000 +0:51 0.000000 0:52 move second child to first child (4-component vector of float) 0:52 'out11' (out 4-component vector of float) -0:52 0.000000 -0:52 0.000000 -0:52 1.000000 -0:52 0.000000 +0:52 Constant: +0:52 0.000000 +0:52 0.000000 +0:52 1.000000 +0:52 0.000000 0:53 move second child to first child (4-component vector of float) 0:53 'out11' (out 4-component vector of float) -0:53 1.029639 -0:53 0.799690 -0:53 0.674741 -0:53 1.570696 +0:53 Constant: +0:53 1.029639 +0:53 0.799690 +0:53 0.674741 +0:53 1.570696 0:54 move second child to first child (4-component vector of float) 0:54 'out11' (out 4-component vector of float) -0:54 0.000000 -0:54 0.523599 -0:54 1.570796 -0:54 1.047198 +0:54 Constant: +0:54 0.000000 +0:54 0.523599 +0:54 1.570796 +0:54 1.047198 0:58 move second child to first child (4-component vector of float) 0:58 'out11' (out 4-component vector of float) -0:58 1.373401 -0:58 0.000000 -0:58 0.896055 -0:58 -0.380506 +0:58 Constant: +0:58 1.373401 +0:58 0.000000 +0:58 0.896055 +0:58 -0.380506 0:62 move second child to first child (2-component vector of int) 0:62 'out12' (out 2-component vector of int) -0:62 15 (const int) -0:62 16 (const int) +0:62 Constant: +0:62 15 (const int) +0:62 16 (const int) 0:63 move second child to first child (2-component vector of int) 0:63 'out12' (out 2-component vector of int) -0:63 17 (const int) -0:63 17 (const int) +0:63 Constant: +0:63 17 (const int) +0:63 17 (const int) 0:64 move second child to first child (2-component vector of float) 0:64 'out2' (out 2-component vector of float) -0:64 871.421253 -0:64 4913.000000 +0:64 Constant: +0:64 871.421253 +0:64 4913.000000 0:65 move second child to first child (3-component vector of uint) 0:65 'out13' (out 3-component vector of uint) -0:65 10 (const uint) -0:65 20 (const uint) -0:65 30 (const uint) +0:65 Constant: +0:65 10 (const uint) +0:65 20 (const uint) +0:65 30 (const uint) 0:66 move second child to first child (2-component vector of float) 0:66 'out2' (out 2-component vector of float) -0:66 3.000000 -0:66 6.000000 +0:66 Constant: +0:66 3.000000 +0:66 6.000000 0:67 move second child to first child (2-component vector of float) 0:67 'out2' (out 2-component vector of float) -0:67 3.500000 -0:67 4.500000 +0:67 Constant: +0:67 3.500000 +0:67 4.500000 0:68 move second child to first child (2-component vector of float) 0:68 'out2' (out 2-component vector of float) -0:68 0.000000 -0:68 1.000000 +0:68 Constant: +0:68 0.000000 +0:68 1.000000 0:69 move second child to first child (4-component vector of float) 0:69 'out11' (out 4-component vector of float) -0:69 0.000000 -0:69 0.028000 -0:69 0.500000 -0:69 1.000000 +0:69 Constant: +0:69 0.000000 +0:69 0.028000 +0:69 0.500000 +0:69 1.000000 0:78 Function Definition: foo( (void) 0:78 Function Parameters: 0:? Sequence 0:81 move second child to first child (float) 0:81 direct index (float) 0:81 'a' (3-element array of float) -0:81 0 (const int) -0:81 7.000000 +0:81 Constant: +0:81 0 (const int) +0:81 Constant: +0:81 7.000000 0:? Linker Objects 0:? 'a' (const int) +0:? 1 (const int) 0:? 'b' (const int) +0:? 2 (const int) 0:? 'c' (const int) +0:? 3 (const int) 0:? 'd' (const int) +0:? 2 (const int) 0:? 'e' (const float) +0:? 2.000000 0:? 'f' (const float) +0:? 6.000000 0:? 'g' (const float) +0:? 3.000000 0:? 'pytho' (const 2-component vector of float) +0:? 3.000000 +0:? 4.000000 0:? 'inv' (smooth in 4-component vector of float) 0:? 'FragColor' (out 4-component vector of float) 0:? 'out2' (out 2-component vector of float) @@ -161,4 +195,17 @@ 0:? 'out12' (out 2-component vector of int) 0:? 'out13' (out 3-component vector of uint) 0:? 's' (const structure) +0:? 3.000000 +0:? 3.000000 +0:? 3.000000 +0:? 3 (const int) +0:? 3 (const int) +0:? 1.000000 +0:? 2.000000 +0:? 3.000000 +0:? 4.000000 +0:? 5.000000 +0:? 6.000000 +0:? 7.000000 +0:? 8.000000 diff --git a/Test/baseResults/conversion.frag.out b/Test/baseResults/conversion.frag.out index 1ba0c4f..2379ea1 100644 --- a/Test/baseResults/conversion.frag.out +++ b/Test/baseResults/conversion.frag.out @@ -257,21 +257,25 @@ 0:74 false case 0:74 direct index (float) 0:74 'f2' (2-component vector of float) -0:74 0 (const int) +0:74 Constant: +0:74 0 (const int) 0:74 Test condition and select (float) 0:74 Condition 0:74 direct index (bool) 0:74 'b2' (2-component vector of bool) -0:74 0 (const int) +0:74 Constant: +0:74 0 (const int) 0:74 true case 0:74 direct index (float) 0:74 'f3' (3-component vector of float) -0:74 0 (const int) +0:74 Constant: +0:74 0 (const int) 0:74 false case 0:74 Convert int to float (float) 0:74 direct index (int) 0:74 'i2' (2-component vector of int) -0:74 1 (const int) +0:74 Constant: +0:74 1 (const int) 0:76 move second child to first child (4-component vector of float) 0:76 'gl_FragColor' (fragColor 4-component vector of float) 0:86 Test condition and select (4-component vector of float) @@ -288,31 +292,40 @@ 0:77 'b' (bool) 0:78 direct index (bool) 0:78 'b2' (2-component vector of bool) -0:78 0 (const int) +0:78 Constant: +0:78 0 (const int) 0:79 direct index (bool) 0:79 'b2' (2-component vector of bool) -0:79 1 (const int) +0:79 Constant: +0:79 1 (const int) 0:80 direct index (bool) 0:80 'b3' (3-component vector of bool) -0:80 0 (const int) +0:80 Constant: +0:80 0 (const int) 0:81 direct index (bool) 0:81 'b3' (3-component vector of bool) -0:81 1 (const int) +0:81 Constant: +0:81 1 (const int) 0:82 direct index (bool) 0:82 'b3' (3-component vector of bool) -0:82 2 (const int) +0:82 Constant: +0:82 2 (const int) 0:83 direct index (bool) 0:83 'b4' (4-component vector of bool) -0:83 0 (const int) +0:83 Constant: +0:83 0 (const int) 0:84 direct index (bool) 0:84 'b4' (4-component vector of bool) -0:84 1 (const int) +0:84 Constant: +0:84 1 (const int) 0:85 direct index (bool) 0:85 'b4' (4-component vector of bool) -0:85 2 (const int) +0:85 Constant: +0:85 2 (const int) 0:86 direct index (bool) 0:86 'b4' (4-component vector of bool) -0:86 3 (const int) +0:86 Constant: +0:86 3 (const int) 0:86 true case 0:105 Construct vec4 (4-component vector of float) 0:105 add (float) @@ -338,71 +351,91 @@ 0:87 'i' (int) 0:88 direct index (int) 0:88 'i2' (2-component vector of int) -0:88 0 (const int) +0:88 Constant: +0:88 0 (const int) 0:89 direct index (int) 0:89 'i2' (2-component vector of int) -0:89 1 (const int) +0:89 Constant: +0:89 1 (const int) 0:90 direct index (int) 0:90 'i3' (3-component vector of int) -0:90 0 (const int) +0:90 Constant: +0:90 0 (const int) 0:91 direct index (int) 0:91 'i3' (3-component vector of int) -0:91 1 (const int) +0:91 Constant: +0:91 1 (const int) 0:92 direct index (int) 0:92 'i3' (3-component vector of int) -0:92 2 (const int) +0:92 Constant: +0:92 2 (const int) 0:93 direct index (int) 0:93 'i4' (4-component vector of int) -0:93 0 (const int) +0:93 Constant: +0:93 0 (const int) 0:94 direct index (int) 0:94 'i4' (4-component vector of int) -0:94 1 (const int) +0:94 Constant: +0:94 1 (const int) 0:95 direct index (int) 0:95 'i4' (4-component vector of int) -0:95 2 (const int) +0:95 Constant: +0:95 2 (const int) 0:96 direct index (int) 0:96 'i4' (4-component vector of int) -0:96 3 (const int) +0:96 Constant: +0:96 3 (const int) 0:97 'f' (float) 0:98 direct index (float) 0:98 'f2' (2-component vector of float) -0:98 0 (const int) +0:98 Constant: +0:98 0 (const int) 0:99 direct index (float) 0:99 'f2' (2-component vector of float) -0:99 1 (const int) +0:99 Constant: +0:99 1 (const int) 0:100 direct index (float) 0:100 'f3' (3-component vector of float) -0:100 0 (const int) +0:100 Constant: +0:100 0 (const int) 0:101 direct index (float) 0:101 'f3' (3-component vector of float) -0:101 1 (const int) +0:101 Constant: +0:101 1 (const int) 0:102 direct index (float) 0:102 'f3' (3-component vector of float) -0:102 2 (const int) +0:102 Constant: +0:102 2 (const int) 0:103 direct index (float) 0:103 'f4' (4-component vector of float) -0:103 0 (const int) +0:103 Constant: +0:103 0 (const int) 0:104 direct index (float) 0:104 'f4' (4-component vector of float) -0:104 1 (const int) +0:104 Constant: +0:104 1 (const int) 0:105 direct index (float) 0:105 'f4' (4-component vector of float) -0:105 2 (const int) +0:105 Constant: +0:105 2 (const int) 0:106 direct index (float) 0:106 'f4' (4-component vector of float) -0:106 3 (const int) +0:106 Constant: +0:106 3 (const int) 0:86 false case -0:106 1.000000 -0:106 1.000000 -0:106 1.000000 -0:106 1.000000 +0:106 Constant: +0:106 1.000000 +0:106 1.000000 +0:106 1.000000 +0:106 1.000000 0:109 Sequence 0:109 move second child to first child (4-component vector of int) 0:109 'cv2' (4-component vector of int) -0:109 1 (const int) -0:109 1 (const int) -0:109 1 (const int) -0:109 1 (const int) +0:109 Constant: +0:109 1 (const int) +0:109 1 (const int) +0:109 1 (const int) +0:109 1 (const int) 0:110 Sequence 0:110 move second child to first child (4-component vector of bool) 0:110 'cv5' (4-component vector of bool) diff --git a/Test/baseResults/cppComplexExpr.vert.out b/Test/baseResults/cppComplexExpr.vert.out index 6069fc0..a214cd8 100644 --- a/Test/baseResults/cppComplexExpr.vert.out +++ b/Test/baseResults/cppComplexExpr.vert.out @@ -3,19 +3,23 @@ WARNING: #version: statement missing; use #version on first line of shader 0:4 Sequence 0:4 move second child to first child (highp float) 0:4 'sum' (highp float) -0:4 0.000000 +0:4 Constant: +0:4 0.000000 0:6 Function Definition: main( (void) 0:6 Function Parameters: 0:10 Sequence 0:10 add second child into first child (highp float) 0:10 'sum' (highp float) -0:10 1.000000 +0:10 Constant: +0:10 1.000000 0:15 add second child into first child (highp float) 0:15 'sum' (highp float) -0:15 20.000000 +0:15 Constant: +0:15 20.000000 0:30 add second child into first child (highp float) 0:30 'sum' (highp float) -0:30 300.000000 +0:30 Constant: +0:30 300.000000 0:39 move second child to first child (highp 4-component vector of float) 0:39 'gl_Position' (gl_Position highp 4-component vector of float) 0:39 Construct vec4 (highp 4-component vector of float) diff --git a/Test/baseResults/cppIndent.vert.out b/Test/baseResults/cppIndent.vert.out index 2ef0dcd..221640e 100644 --- a/Test/baseResults/cppIndent.vert.out +++ b/Test/baseResults/cppIndent.vert.out @@ -2,25 +2,31 @@ 0:5 Sequence 0:5 move second child to first child (float) 0:5 'sum' (float) -0:5 0.000000 +0:5 Constant: +0:5 0.000000 0:7 Function Definition: main( (void) 0:7 Function Parameters: 0:12 Sequence 0:12 add second child into first child (float) 0:12 'sum' (float) -0:12 1.000000 +0:12 Constant: +0:12 1.000000 0:22 add second child into first child (float) 0:22 'sum' (float) -0:22 300.000000 +0:22 Constant: +0:22 300.000000 0:37 add second child into first child (float) 0:37 'sum' (float) -0:37 600000.000000 +0:37 Constant: +0:37 600000.000000 0:47 add second child into first child (float) 0:47 'sum' (float) -0:47 80000000.000000 +0:47 Constant: +0:47 80000000.000000 0:52 add second child into first child (float) 0:52 'sum' (float) -0:52 900000000.000000 +0:52 Constant: +0:52 900000000.000000 0:56 move second child to first child (4-component vector of float) 0:56 'gl_Position' (gl_Position 4-component vector of float) 0:56 Construct vec4 (4-component vector of float) diff --git a/Test/baseResults/cppNest.vert.out b/Test/baseResults/cppNest.vert.out index 38894d8..918f832 100644 --- a/Test/baseResults/cppNest.vert.out +++ b/Test/baseResults/cppNest.vert.out @@ -2,28 +2,35 @@ 0:5 Sequence 0:5 move second child to first child (float) 0:5 'sum' (float) -0:5 0.000000 +0:5 Constant: +0:5 0.000000 0:7 Function Definition: main( (void) 0:7 Function Parameters: 0:12 Sequence 0:12 add second child into first child (float) 0:12 'sum' (float) -0:12 1.000000 +0:12 Constant: +0:12 1.000000 0:21 add second child into first child (float) 0:21 'sum' (float) -0:21 300.000000 +0:21 Constant: +0:21 300.000000 0:61 add second child into first child (float) 0:61 'sum' (float) -0:61 600000.000000 +0:61 Constant: +0:61 600000.000000 0:65 add second child into first child (float) 0:65 'sum' (float) -0:65 80000000.000000 +0:65 Constant: +0:65 80000000.000000 0:69 add second child into first child (float) 0:69 'sum' (float) -0:69 900000000.000000 +0:69 Constant: +0:69 900000000.000000 0:76 add second child into first child (float) 0:76 'sum' (float) -0:76 7000000.000000 +0:76 Constant: +0:76 7000000.000000 0:86 move second child to first child (4-component vector of float) 0:86 'gl_Position' (gl_Position 4-component vector of float) 0:86 Construct vec4 (4-component vector of float) diff --git a/Test/baseResults/cppSimple.vert.out b/Test/baseResults/cppSimple.vert.out index 76415b2..89201f1 100644 --- a/Test/baseResults/cppSimple.vert.out +++ b/Test/baseResults/cppSimple.vert.out @@ -25,31 +25,39 @@ ERROR: node is still EOpNull! 0:5 Sequence 0:5 move second child to first child (float) 0:5 'sum' (float) -0:5 0.000000 +0:5 Constant: +0:5 0.000000 0:7 Function Definition: main( (void) 0:7 Function Parameters: 0:12 Sequence 0:12 add second child into first child (float) 0:12 'sum' (float) -0:12 1.000000 +0:12 Constant: +0:12 1.000000 0:22 add second child into first child (float) 0:22 'sum' (float) -0:22 300.000000 +0:22 Constant: +0:22 300.000000 0:37 add second child into first child (float) 0:37 'sum' (float) -0:37 600000.000000 +0:37 Constant: +0:37 600000.000000 0:48 add second child into first child (float) 0:48 'sum' (float) -0:48 7000000.000000 +0:48 Constant: +0:48 7000000.000000 0:53 add second child into first child (float) 0:53 'sum' (float) -0:53 80000000.000000 +0:53 Constant: +0:53 80000000.000000 0:58 add second child into first child (float) 0:58 'sum' (float) -0:58 900000000.000000 +0:58 Constant: +0:58 900000000.000000 0:65 add second child into first child (float) 0:65 'sum' (float) -0:65 0.050000 +0:65 Constant: +0:65 0.050000 0:69 move second child to first child (4-component vector of float) 0:69 'gl_Position' (gl_Position 4-component vector of float) 0:69 Construct vec4 (4-component vector of float) @@ -57,19 +65,23 @@ ERROR: node is still EOpNull! 0:124 Sequence 0:124 move second child to first child (int) 0:124 'linenumber' (int) -0:124 124 (const int) +0:124 Constant: +0:124 124 (const int) 0:125 Sequence 0:125 move second child to first child (int) 0:125 'filenumber' (int) -0:125 0 (const int) +0:125 Constant: +0:125 0 (const int) 0:126 Sequence 0:126 move second child to first child (int) 0:126 'version' (int) -0:126 110 (const int) +0:126 Constant: +0:126 110 (const int) 0:130 Sequence 0:130 move second child to first child (float) 0:130 'twoPi' (float) -0:130 6.280000 +0:130 Constant: +0:130 6.280000 0:? Linker Objects 0:? 'sum' (float) 0:? 'linenumber' (int) diff --git a/Test/baseResults/dataOut.frag.out b/Test/baseResults/dataOut.frag.out index bbaf345..f23cfc3 100644 --- a/Test/baseResults/dataOut.frag.out +++ b/Test/baseResults/dataOut.frag.out @@ -6,7 +6,8 @@ WARNING: 0:3: varying deprecated in version 130; may be removed in future releas 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 'gl_FragData' (fragColor 32-element array of 4-component vector of float) -0:7 1 (const int) +0:7 Constant: +0:7 1 (const int) 0:7 'Color' (smooth in 4-component vector of float) 0:? Linker Objects 0:? 'Color' (smooth in 4-component vector of float) diff --git a/Test/baseResults/dce.frag.out b/Test/baseResults/dce.frag.out index d2d7ac5..06ffada 100644 --- a/Test/baseResults/dce.frag.out +++ b/Test/baseResults/dce.frag.out @@ -2,13 +2,15 @@ 0:5 Sequence 0:5 move second child to first child (int) 0:5 'c' (int) -0:5 0 (const int) +0:5 Constant: +0:5 0 (const int) 0:7 Function Definition: bar( (void) 0:7 Function Parameters: 0:9 Sequence 0:9 Test condition and select (void) 0:9 Condition -0:9 false (const bool) +0:9 Constant: +0:9 false (const bool) 0:9 true case 0:10 Pre-Increment (int) 0:10 'c' (int) @@ -17,7 +19,8 @@ 0:12 'c' (int) 0:14 Test condition and select (int) 0:14 Condition -0:14 false (const bool) +0:14 Constant: +0:14 false (const bool) 0:14 true case 0:14 Pre-Increment (int) 0:14 'c' (int) @@ -30,7 +33,8 @@ 0:16 body 0:16 Sequence 0:17 case: with expression -0:17 1 (const int) +0:17 Constant: +0:17 1 (const int) 0:? Sequence 0:18 Pre-Increment (int) 0:18 'c' (int) @@ -38,7 +42,8 @@ 0:20 Pre-Increment (int) 0:20 'c' (int) 0:21 case: with expression -0:21 2 (const int) +0:21 Constant: +0:21 2 (const int) 0:? Sequence 0:22 Branch: Break 0:23 Pre-Increment (int) @@ -50,12 +55,14 @@ 0:28 Sequence 0:28 move second child to first child (int) 0:28 'i' (int) -0:28 0 (const int) +0:28 Constant: +0:28 0 (const int) 0:28 Loop with condition tested first 0:28 Loop Condition 0:28 Compare Less Than (bool) 0:28 'i' (int) -0:28 0 (const int) +0:28 Constant: +0:28 0 (const int) 0:28 Loop Body 0:29 Pre-Increment (int) 0:29 'c' (int) @@ -66,19 +73,22 @@ 0:31 Sequence 0:31 move second child to first child (int) 0:31 'i' (int) -0:31 0 (const int) +0:31 Constant: +0:31 0 (const int) 0:31 Loop with condition tested first 0:31 Loop Condition 0:31 Compare Less Than (bool) 0:31 'i' (int) -0:31 10 (const int) +0:31 Constant: +0:31 10 (const int) 0:31 Loop Body 0:32 Sequence 0:32 Test condition and select (void) 0:32 Condition 0:32 Compare Less Than (bool) 0:32 'c' (int) -0:32 3 (const int) +0:32 Constant: +0:32 3 (const int) 0:32 true case 0:33 Sequence 0:33 Branch: Break @@ -102,18 +112,22 @@ 0:48 Condition 0:48 Compare Greater Than (bool) 0:48 'c' (int) -0:48 4 (const int) +0:48 Constant: +0:48 4 (const int) 0:48 true case 0:49 Sequence 0:49 Branch: Return with expression -0:49 4 (const int) +0:49 Constant: +0:49 4 (const int) 0:50 Pre-Increment (int) 0:50 'c' (int) 0:53 Branch: Return with expression -0:53 5 (const int) +0:53 Constant: +0:53 5 (const int) 0:55 Pre-Increment (int) 0:55 'c' (int) 0:? Linker Objects 0:? 'flag' (const bool) +0:? false (const bool) 0:? 'c' (int) diff --git a/Test/baseResults/decls.frag.out b/Test/baseResults/decls.frag.out index ad0ac0a..f965ed9 100644 --- a/Test/baseResults/decls.frag.out +++ b/Test/baseResults/decls.frag.out @@ -5,119 +5,134 @@ ERROR: 0:21: 'vm2' : illegal use of type 'void' ERROR: 0:21: 'vm3' : illegal use of type 'void' ERROR: 0:22: 'vn8' : illegal use of type 'void' ERROR: 0:22: 'vp' : illegal use of type 'void' -ERROR: 0:24: 'gl_' : reserved built-in name -ERROR: 0:25: 'gl_' : reserved built-in name -ERROR: 0:25: 'gl_' : reserved built-in name -ERROR: 0:26: 'gl_' : reserved built-in name -ERROR: 0:26: 'gl_' : reserved built-in name -ERROR: 0:27: 'gl_' : reserved built-in name -ERROR: 0:27: 'gl_' : reserved built-in name -ERROR: 0:32: '' : boolean expression expected -ERROR: 0:33: 'gl_' : reserved built-in name -ERROR: 16 compilation errors. No code generated. +ERROR: 0:25: 'cij' : variables with qualifier 'const' must be initialized +ERROR: 0:27: 'cip' : variables with qualifier 'const' must be initialized +ERROR: 0:34: 'gl_' : reserved built-in name +ERROR: 0:35: 'gl_' : reserved built-in name +ERROR: 0:35: 'gl_' : reserved built-in name +ERROR: 0:36: 'gl_' : reserved built-in name +ERROR: 0:36: 'gl_' : reserved built-in name +ERROR: 0:37: 'gl_' : reserved built-in name +ERROR: 0:37: 'gl_' : reserved built-in name +ERROR: 0:42: '' : boolean expression expected +ERROR: 0:43: 'gl_' : reserved built-in name +ERROR: 18 compilation errors. No code generated. ERROR: node is still EOpNull! 0:5 Sequence 0:5 move second child to first child (int) 0:5 'd1' (int) -0:5 1 (const int) +0:5 Constant: +0:5 1 (const int) 0:6 Sequence 0:6 move second child to first child (int) 0:6 'e2' (int) -0:6 2 (const int) +0:6 Constant: +0:6 2 (const int) 0:7 Sequence 0:7 move second child to first child (int) 0:7 'h3' (int) -0:7 3 (const int) +0:7 Constant: +0:7 3 (const int) 0:14 Sequence 0:14 move second child to first child (4-element array of int) 0:14 'ii4' (4-element array of int) -0:14 1 (const int) -0:14 2 (const int) -0:14 3 (const int) -0:14 4 (const int) +0:14 Constant: +0:14 1 (const int) +0:14 2 (const int) +0:14 3 (const int) +0:14 4 (const int) 0:15 Sequence 0:15 move second child to first child (5-element array of int) 0:15 'ik5' (5-element array of int) -0:15 5 (const int) -0:15 6 (const int) -0:15 7 (const int) -0:15 8 (const int) -0:15 9 (const int) +0:15 Constant: +0:15 5 (const int) +0:15 6 (const int) +0:15 7 (const int) +0:15 8 (const int) +0:15 9 (const int) 0:16 Sequence 0:16 move second child to first child (2-element array of int) 0:16 'im2' (2-element array of int) -0:16 10 (const int) -0:16 11 (const int) +0:16 Constant: +0:16 10 (const int) +0:16 11 (const int) 0:16 move second child to first child (3-element array of int) 0:16 'im3' (3-element array of int) -0:16 12 (const int) -0:16 13 (const int) -0:16 14 (const int) +0:16 Constant: +0:16 12 (const int) +0:16 13 (const int) +0:16 14 (const int) 0:17 Sequence 0:17 move second child to first child (4-element array of int) 0:17 'in8' (4-element array of int) -0:17 21 (const int) -0:17 22 (const int) -0:17 23 (const int) -0:17 24 (const int) -0:24 Sequence -0:24 move second child to first child (4-element array of int) -0:24 'gl_vi4' (4-element array of int) -0:24 1 (const int) -0:24 2 (const int) -0:24 3 (const int) -0:24 4 (const int) -0:25 Sequence -0:25 move second child to first child (5-element array of int) -0:25 'gl_vk5' (5-element array of int) -0:25 5 (const int) -0:25 6 (const int) -0:25 7 (const int) -0:25 8 (const int) -0:25 9 (const int) -0:26 Sequence -0:26 move second child to first child (2-element array of int) -0:26 'gl_vm2' (2-element array of int) -0:26 10 (const int) -0:26 11 (const int) -0:26 move second child to first child (3-element array of int) -0:26 'gl_vm3' (3-element array of int) -0:26 12 (const int) -0:26 13 (const int) -0:26 14 (const int) -0:27 Sequence -0:27 move second child to first child (4-element array of int) -0:27 'gl_vn8' (4-element array of int) -0:27 21 (const int) -0:27 22 (const int) -0:27 23 (const int) -0:27 24 (const int) -0:29 Function Definition: main( (void) -0:29 Function Parameters: -0:31 Sequence -0:31 Loop with condition tested first -0:31 Loop Condition -0:31 move second child to first child (bool) -0:31 'cond' (bool) -0:31 Compare Less Than (bool) -0:31 'b' (int) -0:31 'c' (int) -0:31 No loop body -0:32 Loop with condition tested first -0:32 Loop Condition -0:32 move second child to first child (int) -0:32 'icond' (int) -0:32 'b' (int) -0:32 No loop body -0:33 Loop with condition tested first -0:33 Loop Condition -0:33 move second child to first child (bool) -0:33 'gl_cond' (bool) -0:33 Compare Less Than (bool) -0:33 'b' (int) -0:33 'c' (int) -0:33 No loop body +0:17 Constant: +0:17 21 (const int) +0:17 22 (const int) +0:17 23 (const int) +0:17 24 (const int) +0:34 Sequence +0:34 move second child to first child (4-element array of int) +0:34 'gl_vi4' (4-element array of int) +0:34 Constant: +0:34 1 (const int) +0:34 2 (const int) +0:34 3 (const int) +0:34 4 (const int) +0:35 Sequence +0:35 move second child to first child (5-element array of int) +0:35 'gl_vk5' (5-element array of int) +0:35 Constant: +0:35 5 (const int) +0:35 6 (const int) +0:35 7 (const int) +0:35 8 (const int) +0:35 9 (const int) +0:36 Sequence +0:36 move second child to first child (2-element array of int) +0:36 'gl_vm2' (2-element array of int) +0:36 Constant: +0:36 10 (const int) +0:36 11 (const int) +0:36 move second child to first child (3-element array of int) +0:36 'gl_vm3' (3-element array of int) +0:36 Constant: +0:36 12 (const int) +0:36 13 (const int) +0:36 14 (const int) +0:37 Sequence +0:37 move second child to first child (4-element array of int) +0:37 'gl_vn8' (4-element array of int) +0:37 Constant: +0:37 21 (const int) +0:37 22 (const int) +0:37 23 (const int) +0:37 24 (const int) +0:39 Function Definition: main( (void) +0:39 Function Parameters: +0:41 Sequence +0:41 Loop with condition tested first +0:41 Loop Condition +0:41 move second child to first child (bool) +0:41 'cond' (bool) +0:41 Compare Less Than (bool) +0:41 'b' (int) +0:41 'c' (int) +0:41 No loop body +0:42 Loop with condition tested first +0:42 Loop Condition +0:42 move second child to first child (int) +0:42 'icond' (int) +0:42 'b' (int) +0:42 No loop body +0:43 Loop with condition tested first +0:43 Loop Condition +0:43 move second child to first child (bool) +0:43 'gl_cond' (bool) +0:43 Compare Less Than (bool) +0:43 'b' (int) +0:43 'c' (int) +0:43 No loop body 0:? Linker Objects 0:? 'a' (int) 0:? 'b' (int) @@ -141,6 +156,56 @@ ERROR: node is still EOpNull! 0:? 'im3' (3-element array of int) 0:? 'in8' (4-element array of int) 0:? 'ip' (int) +0:? 'cii4' (const 4-element array of int) +0:? 1 (const int) +0:? 2 (const int) +0:? 3 (const int) +0:? 4 (const int) +0:? 'cij' (int) +0:? 'cik5' (const 5-element array of int) +0:? 5 (const int) +0:? 6 (const int) +0:? 7 (const int) +0:? 8 (const int) +0:? 9 (const int) +0:? 'cim2' (const 2-element array of int) +0:? 10 (const int) +0:? 11 (const int) +0:? 'cim3' (const 3-element array of int) +0:? 12 (const int) +0:? 13 (const int) +0:? 14 (const int) +0:? 'cin8' (const 4-element array of int) +0:? 21 (const int) +0:? 22 (const int) +0:? 23 (const int) +0:? 24 (const int) +0:? 'cip' (int) +0:? 'uii4' (uniform 4-element array of int) +0:? 1 (const int) +0:? 2 (const int) +0:? 3 (const int) +0:? 4 (const int) +0:? 'uij' (uniform int) +0:? 'uik5' (uniform 5-element array of int) +0:? 5 (const int) +0:? 6 (const int) +0:? 7 (const int) +0:? 8 (const int) +0:? 9 (const int) +0:? 'uim2' (uniform 2-element array of int) +0:? 10 (const int) +0:? 11 (const int) +0:? 'uim3' (uniform 3-element array of int) +0:? 12 (const int) +0:? 13 (const int) +0:? 14 (const int) +0:? 'uin8' (uniform 4-element array of int) +0:? 21 (const int) +0:? 22 (const int) +0:? 23 (const int) +0:? 24 (const int) +0:? 'uip' (uniform int) 0:? 'gl_vi4' (4-element array of int) 0:? 'gl_vj' (int) 0:? 'gl_vk5' (5-element array of int) diff --git a/Test/baseResults/deepRvalue.frag.out b/Test/baseResults/deepRvalue.frag.out index 1cda2df..2591dec 100644 --- a/Test/baseResults/deepRvalue.frag.out +++ b/Test/baseResults/deepRvalue.frag.out @@ -2,31 +2,35 @@ 0:5 Sequence 0:5 move second child to first child (4-component vector of float) 0:5 'v1' (4-component vector of float) -0:5 2.000000 -0:5 3.000000 -0:5 5.000000 -0:5 7.000000 +0:5 Constant: +0:5 2.000000 +0:5 3.000000 +0:5 5.000000 +0:5 7.000000 0:6 Sequence 0:6 move second child to first child (4-component vector of float) 0:6 'v2' (4-component vector of float) -0:6 11.000000 -0:6 13.000000 -0:6 17.000000 -0:6 19.000000 +0:6 Constant: +0:6 11.000000 +0:6 13.000000 +0:6 17.000000 +0:6 19.000000 0:7 Sequence 0:7 move second child to first child (4-component vector of float) 0:7 'v3' (4-component vector of float) -0:7 23.000000 -0:7 29.000000 -0:7 31.000000 -0:7 37.000000 +0:7 Constant: +0:7 23.000000 +0:7 29.000000 +0:7 31.000000 +0:7 37.000000 0:8 Sequence 0:8 move second child to first child (4-component vector of float) 0:8 'v4' (4-component vector of float) -0:8 41.000000 -0:8 43.000000 -0:8 47.000000 -0:8 53.000000 +0:8 Constant: +0:8 41.000000 +0:8 43.000000 +0:8 47.000000 +0:8 53.000000 0:16 Function Definition: main( (void) 0:16 Function Parameters: 0:18 Sequence @@ -50,8 +54,10 @@ 0:21 direct index (float) 0:21 direct index (4-component vector of float) 0:21 'mm' (4X4 matrix of float) -0:21 1 (const int) -0:21 3 (const int) +0:21 Constant: +0:21 1 (const int) +0:21 Constant: +0:21 3 (const int) 0:24 Sequence 0:24 move second child to first child (float) 0:24 'g' (float) @@ -60,21 +66,26 @@ 0:24 component-wise multiply (4X4 matrix of float) 0:24 'm' (4X4 matrix of float) 0:24 'm' (4X4 matrix of float) -0:24 2 (const int) -0:24 1 (const int) +0:24 Constant: +0:24 2 (const int) +0:24 Constant: +0:24 1 (const int) 0:26 Sequence 0:26 move second child to first child (float) 0:26 'h' (float) -0:26 5.000000 +0:26 Constant: +0:26 5.000000 0:28 Sequence 0:28 move second child to first child (float) 0:28 'i' (float) 0:28 direct index (float) 0:28 Function Call: texture2D(s21;vf2; (4-component vector of float) 0:28 'sampler' (uniform sampler2D) -0:28 0.500000 -0:28 0.500000 -0:28 1 (const int) +0:28 Constant: +0:28 0.500000 +0:28 0.500000 +0:28 Constant: +0:28 1 (const int) 0:30 add second child into first child (float) 0:30 'i' (float) 0:30 direct index (float) @@ -82,12 +93,14 @@ 0:30 Condition 0:30 Compare Greater Than (bool) 0:30 'i' (float) -0:30 0.100000 +0:30 Constant: +0:30 0.100000 0:30 true case 0:30 'v1' (4-component vector of float) 0:30 false case 0:30 'v2' (4-component vector of float) -0:30 3 (const int) +0:30 Constant: +0:30 3 (const int) 0:33 add second child into first child (float) 0:33 'i' (float) 0:33 direct index (float) @@ -95,17 +108,21 @@ 0:33 b: direct index for structure (3-element array of 2-component vector of float) 0:33 move second child to first child (structure) 0:33 't' (structure) +0:33 Constant: +0:33 1 (const int) +0:33 2.000000 +0:33 3.000000 +0:33 4.000000 +0:33 5.000000 +0:33 6.000000 +0:33 7.000000 +0:33 true (const bool) +0:33 Constant: 0:33 1 (const int) -0:33 2.000000 -0:33 3.000000 -0:33 4.000000 -0:33 5.000000 -0:33 6.000000 -0:33 7.000000 -0:33 true (const bool) -0:33 1 (const int) -0:33 2 (const int) -0:33 1 (const int) +0:33 Constant: +0:33 2 (const int) +0:33 Constant: +0:33 1 (const int) 0:35 move second child to first child (4-component vector of float) 0:35 'gl_FragColor' (fragColor 4-component vector of float) 0:35 Construct vec4 (4-component vector of float) diff --git a/Test/baseResults/discard-dce.frag.out b/Test/baseResults/discard-dce.frag.out index 6cc221f..97f012b 100644 --- a/Test/baseResults/discard-dce.frag.out +++ b/Test/baseResults/discard-dce.frag.out @@ -5,17 +5,19 @@ 0:6 Sequence 0:6 move second child to first child (4-component vector of float) 0:6 'white' (4-component vector of float) -0:6 1.000000 -0:6 1.000000 -0:6 1.000000 -0:6 1.000000 +0:6 Constant: +0:6 1.000000 +0:6 1.000000 +0:6 1.000000 +0:6 1.000000 0:7 Sequence 0:7 move second child to first child (4-component vector of float) 0:7 'black' (4-component vector of float) -0:7 0.200000 -0:7 0.200000 -0:7 0.200000 -0:7 0.200000 +0:7 Constant: +0:7 0.200000 +0:7 0.200000 +0:7 0.200000 +0:7 0.200000 0:8 Sequence 0:8 move second child to first child (4-component vector of float) 0:8 'color' (4-component vector of float) @@ -27,9 +29,12 @@ 0:11 component-wise multiply (float) 0:11 direct index (float) 0:11 'tex_coord' (smooth in 2-component vector of float) -0:11 0 (const int) -0:11 2.000000 -0:11 1.000000 +0:11 Constant: +0:11 0 (const int) +0:11 Constant: +0:11 2.000000 +0:11 Constant: +0:11 1.000000 0:12 Sequence 0:12 move second child to first child (float) 0:12 'y' (float) @@ -37,9 +42,12 @@ 0:12 component-wise multiply (float) 0:12 direct index (float) 0:12 'tex_coord' (smooth in 2-component vector of float) -0:12 1 (const int) -0:12 2.000000 -0:12 1.000000 +0:12 Constant: +0:12 1 (const int) +0:12 Constant: +0:12 2.000000 +0:12 Constant: +0:12 1.000000 0:14 Sequence 0:14 move second child to first child (float) 0:14 'radius' (float) @@ -55,14 +63,16 @@ 0:15 Condition 0:15 Compare Greater Than (bool) 0:15 'radius' (float) -0:15 1.000000 +0:15 Constant: +0:15 1.000000 0:15 true case 0:16 Sequence 0:16 Test condition and select (void) 0:16 Condition 0:16 Compare Greater Than (bool) 0:16 'radius' (float) -0:16 1.100000 +0:16 Constant: +0:16 1.100000 0:16 true case 0:17 Sequence 0:17 Pre-Increment (4-component vector of float) @@ -74,7 +84,8 @@ 0:22 Condition 0:22 Compare Greater Than (bool) 0:22 'radius' (float) -0:22 1.200000 +0:22 Constant: +0:22 1.200000 0:22 true case 0:23 Sequence 0:23 Pre-Increment (4-component vector of float) @@ -84,7 +95,8 @@ 0:30 Condition 0:30 Compare Greater Than or Equal (bool) 0:30 'radius' (float) -0:30 0.750000 +0:30 Constant: +0:30 0.750000 0:30 true case 0:31 subtract second child into first child (4-component vector of float) 0:31 'color' (4-component vector of float) @@ -92,8 +104,10 @@ 0:31 divide (float) 0:31 pow (float) 0:31 'radius' (float) -0:31 16.000000 -0:31 2.000000 +0:31 Constant: +0:31 16.000000 +0:31 Constant: +0:31 2.000000 0:33 move second child to first child (4-component vector of float) 0:33 'gl_FragColor' (fragColor 4-component vector of float) 0:33 'color' (4-component vector of float) diff --git a/Test/baseResults/doWhileLoop.frag.out b/Test/baseResults/doWhileLoop.frag.out index ead28f9..32956c4 100644 --- a/Test/baseResults/doWhileLoop.frag.out +++ b/Test/baseResults/doWhileLoop.frag.out @@ -11,7 +11,8 @@ 0:13 Compare Less Than (bool) 0:13 direct index (float) 0:13 'color' (4-component vector of float) -0:13 0 (const int) +0:13 Constant: +0:13 0 (const int) 0:13 'd' (uniform float) 0:13 Loop Body 0:12 Sequence diff --git a/Test/baseResults/earlyReturnDiscard.frag.out b/Test/baseResults/earlyReturnDiscard.frag.out index f82ff3c..288f55e 100644 --- a/Test/baseResults/earlyReturnDiscard.frag.out +++ b/Test/baseResults/earlyReturnDiscard.frag.out @@ -27,20 +27,23 @@ 0:31 Compare Less Than (bool) 0:31 direct index (float) 0:31 'color' (4-component vector of float) -0:31 2 (const int) +0:31 Constant: +0:31 2 (const int) 0:31 'minimum' (uniform float) 0:31 true case 0:32 Branch: Return 0:34 Post-Increment (float) 0:34 direct index (float) 0:34 'color' (4-component vector of float) -0:34 2 (const int) +0:34 Constant: +0:34 2 (const int) 0:36 Test condition and select (void) 0:36 Condition 0:36 Compare Greater Than (bool) 0:36 direct index (float) 0:36 'color' (4-component vector of float) -0:36 2 (const int) +0:36 Constant: +0:36 2 (const int) 0:36 'threshhold' (uniform float) 0:36 true case 0:37 Branch: Kill @@ -51,7 +54,8 @@ 0:42 Compare Greater Than (bool) 0:42 direct index (float) 0:42 'color' (4-component vector of float) -0:42 3 (const int) +0:42 Constant: +0:42 3 (const int) 0:42 'threshhold2' (uniform float) 0:42 true case 0:43 Sequence @@ -60,7 +64,8 @@ 0:43 Compare Greater Than (bool) 0:43 direct index (float) 0:43 'color' (4-component vector of float) -0:43 2 (const int) +0:43 Constant: +0:43 2 (const int) 0:43 'threshhold2' (uniform float) 0:43 true case 0:44 Branch: Return @@ -72,7 +77,8 @@ 0:46 Post-Increment (float) 0:46 direct index (float) 0:46 'color' (4-component vector of float) -0:46 2 (const int) +0:46 Constant: +0:46 2 (const int) 0:45 false case 0:48 Sequence 0:48 Test condition and select (void) @@ -80,7 +86,8 @@ 0:48 Compare Less Than (bool) 0:48 direct index (float) 0:48 'color' (4-component vector of float) -0:48 0 (const int) +0:48 Constant: +0:48 0 (const int) 0:48 'minimum' (uniform float) 0:48 true case 0:49 Sequence diff --git a/Test/baseResults/errors.frag.out b/Test/baseResults/errors.frag.out index b555dd3..37304d8 100644 --- a/Test/baseResults/errors.frag.out +++ b/Test/baseResults/errors.frag.out @@ -9,6 +9,7 @@ ERROR: node is still EOpNull! 0:1 'foo' (in mediump int) 0:3 Sequence 0:3 Branch: Return with expression -0:3 1 (const int) +0:3 Constant: +0:3 1 (const int) 0:? Linker Objects diff --git a/Test/baseResults/forLoop.frag.out b/Test/baseResults/forLoop.frag.out index 40e267c..5db7911 100644 --- a/Test/baseResults/forLoop.frag.out +++ b/Test/baseResults/forLoop.frag.out @@ -10,7 +10,8 @@ 0:12 Sequence 0:12 move second child to first child (int) 0:12 'i' (int) -0:12 0 (const int) +0:12 Constant: +0:12 0 (const int) 0:12 Loop with condition tested first 0:12 Loop Condition 0:12 Compare Less Than (bool) diff --git a/Test/baseResults/forwardRef.frag.out b/Test/baseResults/forwardRef.frag.out index 46170da..d63454a 100644 --- a/Test/baseResults/forwardRef.frag.out +++ b/Test/baseResults/forwardRef.frag.out @@ -28,13 +28,16 @@ 0:28 Condition 0:28 Compare Less Than (bool) 0:28 'd' (uniform float) -0:28 4.200000 +0:28 Constant: +0:28 4.200000 0:28 true case 0:29 Branch: Return with expression -0:29 1.200000 +0:29 Constant: +0:29 1.200000 0:28 false case 0:31 Branch: Return with expression -0:31 4.500000 +0:31 Constant: +0:31 4.500000 0:34 Function Definition: foo(vf4; (float) 0:34 Function Parameters: 0:34 'bar' (in 4-component vector of float) @@ -43,10 +46,12 @@ 0:36 add (float) 0:36 direct index (float) 0:36 'bar' (in 4-component vector of float) -0:36 0 (const int) +0:36 Constant: +0:36 0 (const int) 0:36 direct index (float) 0:36 'bar' (in 4-component vector of float) -0:36 1 (const int) +0:36 Constant: +0:36 1 (const int) 0:? Linker Objects 0:? 'bigColor' (uniform 4-component vector of float) 0:? 'BaseColor' (smooth in 4-component vector of float) diff --git a/Test/baseResults/functionCall.frag.out b/Test/baseResults/functionCall.frag.out index 3327c4c..2257197 100644 --- a/Test/baseResults/functionCall.frag.out +++ b/Test/baseResults/functionCall.frag.out @@ -3,7 +3,8 @@ WARNING: 0:4: varying deprecated in version 130; may be removed in future releas 0:7 Sequence 0:7 move second child to first child (float) 0:7 'h' (float) -0:7 0.000000 +0:7 Constant: +0:7 0.000000 0:9 Function Definition: foo(vf4; (float) 0:9 Function Parameters: 0:9 'bar' (in 4-component vector of float) @@ -12,10 +13,12 @@ WARNING: 0:4: varying deprecated in version 130; may be removed in future releas 0:11 add (float) 0:11 direct index (float) 0:11 'bar' (in 4-component vector of float) -0:11 0 (const int) +0:11 Constant: +0:11 0 (const int) 0:11 direct index (float) 0:11 'bar' (in 4-component vector of float) -0:11 1 (const int) +0:11 Constant: +0:11 1 (const int) 0:14 Function Definition: bar( (void) 0:14 Function Parameters: 0:18 Function Definition: unreachableReturn( (float) @@ -25,13 +28,16 @@ WARNING: 0:4: varying deprecated in version 130; may be removed in future releas 0:20 Condition 0:20 Compare Less Than (bool) 0:20 'd' (uniform float) -0:20 4.200000 +0:20 Constant: +0:20 4.200000 0:20 true case 0:21 Branch: Return with expression -0:21 1.200000 +0:21 Constant: +0:21 1.200000 0:20 false case 0:23 Branch: Return with expression -0:23 4.500000 +0:23 Constant: +0:23 4.500000 0:27 Function Definition: missingReturn( (float) 0:27 Function Parameters: 0:29 Sequence @@ -39,14 +45,16 @@ WARNING: 0:4: varying deprecated in version 130; may be removed in future releas 0:29 Condition 0:29 Compare Less Than (bool) 0:29 'd' (uniform float) -0:29 4.500000 +0:29 Constant: +0:29 4.500000 0:29 true case 0:30 Sequence 0:30 move second child to first child (float) 0:30 'h' (float) 0:30 'd' (uniform float) 0:31 Branch: Return with expression -0:31 3.900000 +0:31 Constant: +0:31 3.900000 0:35 Function Definition: main( (void) 0:35 Function Parameters: 0:37 Sequence diff --git a/Test/baseResults/functionSemantics.frag.out b/Test/baseResults/functionSemantics.frag.out index 79c9b36..dd431a6 100644 --- a/Test/baseResults/functionSemantics.frag.out +++ b/Test/baseResults/functionSemantics.frag.out @@ -22,16 +22,20 @@ 0:5 'f' (inout mediump int) 0:8 multiply second child into first child (mediump int) 0:8 'a' (in mediump int) -0:8 64 (const int) +0:8 Constant: +0:8 64 (const int) 0:10 multiply second child into first child (mediump int) 0:10 'c' (in mediump int) -0:10 64 (const int) +0:10 Constant: +0:10 64 (const int) 0:12 move second child to first child (mediump int) 0:12 'e' (out mediump int) -0:12 1024 (const int) +0:12 Constant: +0:12 1024 (const int) 0:13 multiply second child into first child (mediump int) 0:13 'f' (inout mediump int) -0:13 64 (const int) +0:13 Constant: +0:13 64 (const int) 0:15 add second child into first child (mediump int) 0:15 'sum' (mediump int) 0:15 add (mediump int) @@ -41,11 +45,13 @@ 0:15 add (mediump int) 0:15 'a' (in mediump int) 0:15 component-wise multiply (mediump int) -0:15 64 (const int) +0:15 Constant: +0:15 64 (const int) 0:15 'b' (const (read only) mediump int) 0:15 'c' (in mediump int) 0:15 component-wise multiply (mediump int) -0:15 64 (const int) +0:15 Constant: +0:15 64 (const int) 0:15 'd' (const (read only) mediump int) 0:15 'e' (out mediump int) 0:15 'f' (inout mediump int) @@ -57,41 +63,53 @@ 0:24 Sequence 0:24 move second child to first child (mediump int) 0:24 't' (mediump int) -0:24 2 (const int) +0:24 Constant: +0:24 2 (const int) 0:28 move second child to first child (mediump int) 0:28 direct index (mediump int) 0:28 t: direct index for structure (mediump 4-component vector of int) 0:28 'f' (structure) -0:28 0 (const int) -0:28 1 (const int) -0:28 32 (const int) +0:28 Constant: +0:28 0 (const int) +0:28 Constant: +0:28 1 (const int) +0:28 Constant: +0:28 32 (const int) 0:30 Sequence 0:30 move second child to first child (mediump int) 0:30 'color' (mediump int) 0:30 Function Call: foo(i1;i1;i1;i1;i1;i1; (mediump int) -0:30 1 (const int) -0:30 2 (const int) +0:30 Constant: +0:30 1 (const int) +0:30 Constant: +0:30 2 (const int) 0:30 add (mediump int) 0:30 't' (mediump int) 0:30 't' (mediump int) -0:30 8 (const int) +0:30 Constant: +0:30 8 (const int) 0:30 'e' (mediump int) 0:30 direct index (mediump int) 0:30 t: direct index for structure (mediump 4-component vector of int) 0:30 'f' (structure) -0:30 0 (const int) -0:30 1 (const int) +0:30 Constant: +0:30 0 (const int) +0:30 Constant: +0:30 1 (const int) 0:32 add second child into first child (mediump int) 0:32 'color' (mediump int) 0:32 component-wise multiply (mediump int) -0:32 128 (const int) +0:32 Constant: +0:32 128 (const int) 0:32 add (mediump int) 0:32 'e' (mediump int) 0:32 direct index (mediump int) 0:32 t: direct index for structure (mediump 4-component vector of int) 0:32 'f' (structure) -0:32 0 (const int) -0:32 1 (const int) +0:32 Constant: +0:32 0 (const int) +0:32 Constant: +0:32 1 (const int) 0:35 move second child to first child (mediump 4-component vector of float) 0:35 'gl_FragColor' (fragColor mediump 4-component vector of float) 0:35 Construct vec4 (mediump 4-component vector of float) diff --git a/Test/baseResults/length.frag.out b/Test/baseResults/length.frag.out index 4a354ae..f7f53ac 100644 --- a/Test/baseResults/length.frag.out +++ b/Test/baseResults/length.frag.out @@ -8,16 +8,19 @@ 0:15 add (2-component vector of float) 0:15 direct index (smooth in 2-component vector of float) 0:15 'v' (smooth in 2-element array of 2-component vector of float) -0:15 0 (const int) +0:15 Constant: +0:15 0 (const int) 0:15 direct index (smooth in 2-component vector of float) 0:15 'v' (smooth in 2-element array of 2-component vector of float) -0:15 1 (const int) +0:15 Constant: +0:15 1 (const int) 0:17 move second child to first child (4-component vector of float) 0:17 'gl_FragColor' (fragColor 4-component vector of float) -0:17 30.000000 -0:17 30.000000 -0:17 30.000000 -0:17 30.000000 +0:17 Constant: +0:17 30.000000 +0:17 30.000000 +0:17 30.000000 +0:17 30.000000 0:? Linker Objects 0:? 'u' (uniform 3-element array of 4-component vector of float) 0:? 'v' (smooth in 2-element array of 2-component vector of float) diff --git a/Test/baseResults/link1.frag.out b/Test/baseResults/link1.frag.out index 47cfec2..06d1d4a 100644 --- a/Test/baseResults/link1.frag.out +++ b/Test/baseResults/link1.frag.out @@ -5,7 +5,8 @@ link1.frag 0:8 move second child to first child (4-component vector of float) 0:8 'a' (4-component vector of float) 0:8 vector-scale (4-component vector of float) -0:8 8.000000 +0:8 Constant: +0:8 8.000000 0:8 'uv4' (uniform 4-component vector of float) 0:13 Function Definition: main( (void) 0:13 Function Parameters: @@ -13,7 +14,8 @@ link1.frag 0:17 move second child to first child (4-component vector of float) 0:17 'b' (4-component vector of float) 0:17 vector-scale (4-component vector of float) -0:17 8.000000 +0:17 Constant: +0:17 8.000000 0:17 'a' (4-component vector of float) 0:19 Function Definition: foo(mf22; (2-component vector of int) 0:19 Function Parameters: @@ -23,7 +25,8 @@ link1.frag 0:21 Convert float to int (2-component vector of int) 0:21 direct index (in 2-component vector of float) 0:21 'm' (in 2X2 matrix of float) -0:21 0 (const int) +0:21 Constant: +0:21 0 (const int) 0:24 Sequence 0:24 move second child to first child (4-component vector of float) 0:24 'c' (4-component vector of float) @@ -34,11 +37,46 @@ link1.frag 0:? 'uv4' (uniform 4-component vector of float) 0:? 'glass' (uniform 3-component vector of float) 0:? 'ci' (const int) +0:? 8 (const int) 0:? 'a' (4-component vector of float) 0:? 'iv3' (smooth in 3-component vector of float) 0:? 'cup' (smooth in 4-component vector of float) 0:? 'b' (4-component vector of float) 0:? 'c' (4-component vector of float) +0:? 'cv3' (const 3-component vector of float) +0:? 43.000000 +0:? 0.340000 +0:? 9.900000 +0:? 'cv3n' (const 3-component vector of float) +0:? 43.000000 +0:? 0.340000 +0:? 9.900000 +0:? 'cv3e' (const 3-component vector of float) +0:? 43.000000 +0:? 0.340000 +0:? 9.900000 +0:? 'um2' (uniform 2X2 matrix of float) +0:? 4.000000 +0:? 0.000000 +0:? 0.000000 +0:? 4.000000 +0:? 'um2n' (uniform 2X2 matrix of float) +0:? 4.000000 +0:? 0.000000 +0:? 0.000000 +0:? 4.000000 +0:? 'um2e' (uniform 2X2 matrix of float) +0:? 4.000000 +0:? 0.000000 +0:? 0.000000 +0:? 4.000000 +0:? 's' (uniform structure) +0:? 82 (const int) +0:? 3.900000 +0:? 'sn' (uniform structure) +0:? 'se' (uniform structure) +0:? 82 (const int) +0:? 3.900000 link2.frag @@ -47,20 +85,23 @@ link2.frag 0:8 move second child to first child (4-component vector of float) 0:8 'd' (4-component vector of float) 0:8 vector-scale (4-component vector of float) -0:8 8.000000 +0:8 Constant: +0:8 8.000000 0:8 'uv4' (uniform 4-component vector of float) 0:13 Sequence 0:13 move second child to first child (4-component vector of float) 0:13 'e' (4-component vector of float) 0:13 vector-scale (4-component vector of float) -0:13 8.000000 +0:13 Constant: +0:13 8.000000 0:13 'd' (4-component vector of float) 0:15 Function Definition: foo( (2-component vector of int) 0:15 Function Parameters: 0:17 Sequence 0:17 Branch: Return with expression -0:17 2 (const int) -0:17 2 (const int) +0:17 Constant: +0:17 2 (const int) +0:17 2 (const int) 0:20 Sequence 0:20 move second child to first child (4-component vector of float) 0:20 'f' (4-component vector of float) @@ -71,11 +112,40 @@ link2.frag 0:? 'uv4' (uniform 4-component vector of float) 0:? 'glass' (uniform 2-component vector of float) 0:? 'ci' (const int) +0:? 8 (const int) 0:? 'd' (4-component vector of float) 0:? 'iv3' (smooth in 3-component vector of float) 0:? 'cup' (flat in 4-component vector of float) 0:? 'e' (4-component vector of float) 0:? 'f' (4-component vector of float) +0:? 'cv3' (const 3-component vector of float) +0:? 43.000000 +0:? 0.340000 +0:? 9.900000 +0:? 'cv3e' (const 3-component vector of float) +0:? 43.000000 +0:? 0.340000 +0:? 2.900000 +0:? 'um2' (uniform 2X2 matrix of float) +0:? 4.000000 +0:? 0.000000 +0:? 0.000000 +0:? 4.000000 +0:? 'um2n' (uniform 2X2 matrix of float) +0:? 'um2e' (uniform 2X2 matrix of float) +0:? 3.000000 +0:? 0.000000 +0:? 0.000000 +0:? 3.000000 +0:? 's' (uniform structure) +0:? 82 (const int) +0:? 3.900000 +0:? 'sn' (uniform structure) +0:? 82 (const int) +0:? 3.900000 +0:? 'se' (uniform structure) +0:? 81 (const int) +0:? 3.900000 link3.frag @@ -90,6 +160,12 @@ ERROR: Linking fragment stage: Types must match: glass: "uniform 3-component vector of float" versus "uniform 2-component vector of float" ERROR: Linking fragment stage: Interpolation and auxiliary storage qualifiers must match: cup: "smooth in 4-component vector of float" versus "flat in 4-component vector of float" +ERROR: Linking fragment stage: Initializers must match: + cv3e +ERROR: Linking fragment stage: Initializers must match: + um2e +ERROR: Linking fragment stage: Initializers must match: + se ERROR: Linking fragment stage: Cannot mix ES profile with non-ES profile shaders ERROR: Linking fragment stage: Types must match: @@ -101,7 +177,8 @@ ERROR: Linking fragment stage: Precision qualifiers must match: 0:8 move second child to first child (4-component vector of float) 0:8 'a' (4-component vector of float) 0:8 vector-scale (4-component vector of float) -0:8 8.000000 +0:8 Constant: +0:8 8.000000 0:8 'uv4' (uniform 4-component vector of float) 0:13 Function Definition: main( (void) 0:13 Function Parameters: @@ -109,7 +186,8 @@ ERROR: Linking fragment stage: Precision qualifiers must match: 0:17 move second child to first child (4-component vector of float) 0:17 'b' (4-component vector of float) 0:17 vector-scale (4-component vector of float) -0:17 8.000000 +0:17 Constant: +0:17 8.000000 0:17 'a' (4-component vector of float) 0:19 Function Definition: foo(mf22; (2-component vector of int) 0:19 Function Parameters: @@ -119,7 +197,8 @@ ERROR: Linking fragment stage: Precision qualifiers must match: 0:21 Convert float to int (2-component vector of int) 0:21 direct index (in 2-component vector of float) 0:21 'm' (in 2X2 matrix of float) -0:21 0 (const int) +0:21 Constant: +0:21 0 (const int) 0:24 Sequence 0:24 move second child to first child (4-component vector of float) 0:24 'c' (4-component vector of float) @@ -130,20 +209,23 @@ ERROR: Linking fragment stage: Precision qualifiers must match: 0:8 move second child to first child (4-component vector of float) 0:8 'd' (4-component vector of float) 0:8 vector-scale (4-component vector of float) -0:8 8.000000 +0:8 Constant: +0:8 8.000000 0:8 'uv4' (uniform 4-component vector of float) 0:13 Sequence 0:13 move second child to first child (4-component vector of float) 0:13 'e' (4-component vector of float) 0:13 vector-scale (4-component vector of float) -0:13 8.000000 +0:13 Constant: +0:13 8.000000 0:13 'd' (4-component vector of float) 0:15 Function Definition: foo( (2-component vector of int) 0:15 Function Parameters: 0:17 Sequence 0:17 Branch: Return with expression -0:17 2 (const int) -0:17 2 (const int) +0:17 Constant: +0:17 2 (const int) +0:17 2 (const int) 0:20 Sequence 0:20 move second child to first child (4-component vector of float) 0:20 'f' (4-component vector of float) @@ -154,11 +236,48 @@ ERROR: Linking fragment stage: Precision qualifiers must match: 0:? 'uv4' (uniform 4-component vector of float) 0:? 'glass' (uniform 3-component vector of float) 0:? 'ci' (const int) +0:? 8 (const int) 0:? 'a' (4-component vector of float) 0:? 'iv3' (smooth in 3-component vector of float) 0:? 'cup' (smooth in 4-component vector of float) 0:? 'b' (4-component vector of float) 0:? 'c' (4-component vector of float) +0:? 'cv3' (const 3-component vector of float) +0:? 43.000000 +0:? 0.340000 +0:? 9.900000 +0:? 'cv3n' (const 3-component vector of float) +0:? 43.000000 +0:? 0.340000 +0:? 9.900000 +0:? 'cv3e' (const 3-component vector of float) +0:? 43.000000 +0:? 0.340000 +0:? 9.900000 +0:? 'um2' (uniform 2X2 matrix of float) +0:? 4.000000 +0:? 0.000000 +0:? 0.000000 +0:? 4.000000 +0:? 'um2n' (uniform 2X2 matrix of float) +0:? 4.000000 +0:? 0.000000 +0:? 0.000000 +0:? 4.000000 +0:? 'um2e' (uniform 2X2 matrix of float) +0:? 4.000000 +0:? 0.000000 +0:? 0.000000 +0:? 4.000000 +0:? 's' (uniform structure) +0:? 82 (const int) +0:? 3.900000 +0:? 'sn' (uniform structure) +0:? 82 (const int) +0:? 3.900000 +0:? 'se' (uniform structure) +0:? 82 (const int) +0:? 3.900000 0:? 'd' (4-component vector of float) 0:? 'e' (4-component vector of float) 0:? 'f' (4-component vector of float) diff --git a/Test/baseResults/localAggregates.frag.out b/Test/baseResults/localAggregates.frag.out index 3e839fb..4ee071d 100644 --- a/Test/baseResults/localAggregates.frag.out +++ b/Test/baseResults/localAggregates.frag.out @@ -8,101 +8,128 @@ WARNING: 0:5: varying deprecated in version 130; may be removed in future releas 0:41 'locals2' (structure) 0:41 s2_1: direct index for structure (structure) 0:41 'foo3' (uniform structure) -0:41 0 (const int) +0:41 Constant: +0:41 0 (const int) 0:43 Test condition and select (void) 0:43 Condition 0:43 Compare Greater Than (bool) 0:43 i: direct index for structure (int) 0:43 s2_1: direct index for structure (structure) 0:43 'foo3' (uniform structure) +0:43 Constant: +0:43 0 (const int) +0:43 Constant: 0:43 0 (const int) +0:43 Constant: 0:43 0 (const int) -0:43 0 (const int) 0:43 true case 0:44 Sequence 0:44 move second child to first child (float) 0:44 f: direct index for structure (float) 0:44 s1_1: direct index for structure (structure) 0:44 'locals2' (structure) -0:44 2 (const int) -0:44 1 (const int) -0:44 1.000000 +0:44 Constant: +0:44 2 (const int) +0:44 Constant: +0:44 1 (const int) +0:44 Constant: +0:44 1.000000 0:45 move second child to first child (float) 0:45 direct index (float) 0:45 'localFArray' (16-element array of float) -0:45 4 (const int) +0:45 Constant: +0:45 4 (const int) 0:45 direct index (float) 0:45 'coord' (smooth in 2-component vector of float) -0:45 0 (const int) +0:45 Constant: +0:45 0 (const int) 0:46 move second child to first child (int) 0:46 direct index (int) 0:46 'localIArray' (8-element array of int) -0:46 2 (const int) +0:46 Constant: +0:46 2 (const int) 0:46 i: direct index for structure (int) 0:46 s2_1: direct index for structure (structure) 0:46 'foo3' (uniform structure) +0:46 Constant: +0:46 0 (const int) +0:46 Constant: 0:46 0 (const int) -0:46 0 (const int) 0:43 false case 0:48 Sequence 0:48 move second child to first child (float) 0:48 f: direct index for structure (float) 0:48 s1_1: direct index for structure (structure) 0:48 'locals2' (structure) -0:48 2 (const int) -0:48 1 (const int) +0:48 Constant: +0:48 2 (const int) +0:48 Constant: +0:48 1 (const int) 0:48 direct index (float) 0:48 'coord' (smooth in 2-component vector of float) -0:48 0 (const int) +0:48 Constant: +0:48 0 (const int) 0:49 move second child to first child (float) 0:49 direct index (float) 0:49 'localFArray' (16-element array of float) -0:49 4 (const int) -0:49 1.000000 +0:49 Constant: +0:49 4 (const int) +0:49 Constant: +0:49 1.000000 0:50 move second child to first child (int) 0:50 direct index (int) 0:50 'localIArray' (8-element array of int) -0:50 2 (const int) -0:50 0 (const int) +0:50 Constant: +0:50 2 (const int) +0:50 Constant: +0:50 0 (const int) 0:53 Test condition and select (void) 0:53 Condition 0:53 Compare Equal (bool) 0:53 direct index (int) 0:53 'localIArray' (8-element array of int) -0:53 2 (const int) -0:53 0 (const int) +0:53 Constant: +0:53 2 (const int) +0:53 Constant: +0:53 0 (const int) 0:53 true case 0:54 Pre-Increment (float) 0:54 direct index (float) 0:54 'localFArray' (16-element array of float) -0:54 4 (const int) +0:54 Constant: +0:54 4 (const int) 0:57 Sequence 0:57 move second child to first child (int) 0:57 'x' (int) -0:57 5 (const int) +0:57 Constant: +0:57 5 (const int) 0:58 move second child to first child (float) 0:58 indirect index (float) 0:58 'localArray' (16-element array of float) 0:58 'x' (int) 0:58 direct index (float) 0:58 'coord' (smooth in 2-component vector of float) -0:58 0 (const int) +0:58 Constant: +0:58 0 (const int) 0:62 Sequence 0:62 Sequence 0:62 move second child to first child (int) 0:62 'i' (int) -0:62 0 (const int) +0:62 Constant: +0:62 0 (const int) 0:62 Loop with condition tested first 0:62 Loop Condition 0:62 Compare Less Than (bool) 0:62 'i' (int) -0:62 16 (const int) +0:62 Constant: +0:62 16 (const int) 0:62 Loop Body 0:63 move second child to first child (float) 0:63 indirect index (float) 0:63 'a' (16-element array of float) 0:63 'i' (int) -0:63 0.000000 +0:63 Constant: +0:63 0.000000 0:62 Loop Terminal Expression 0:62 Post-Increment (int) 0:62 'i' (int) @@ -110,7 +137,8 @@ WARNING: 0:5: varying deprecated in version 130; may be removed in future releas 0:65 Condition 0:65 Compare Equal (bool) 0:65 'condition' (uniform int) -0:65 1 (const int) +0:65 Constant: +0:65 1 (const int) 0:65 true case 0:66 move second child to first child (16-element array of float) 0:66 'a' (16-element array of float) @@ -118,35 +146,43 @@ WARNING: 0:5: varying deprecated in version 130; may be removed in future releas 0:68 move second child to first child (4-component vector of float) 0:68 bleh: direct index for structure (4-component vector of float) 0:68 'locals2' (structure) -0:68 3 (const int) +0:68 Constant: +0:68 3 (const int) 0:68 'color' (smooth in 4-component vector of float) 0:69 move second child to first child (float) 0:69 direct index (float) 0:69 bleh: direct index for structure (4-component vector of float) 0:69 'locals2' (structure) -0:69 3 (const int) -0:69 2 (const int) +0:69 Constant: +0:69 3 (const int) +0:69 Constant: +0:69 2 (const int) 0:69 direct index (float) 0:69 'coord' (smooth in 2-component vector of float) -0:69 1 (const int) +0:69 Constant: +0:69 1 (const int) 0:71 move second child to first child (4-component vector of float) 0:71 'gl_FragColor' (fragColor 4-component vector of float) 0:71 component-wise multiply (4-component vector of float) 0:71 vector-scale (4-component vector of float) 0:71 bleh: direct index for structure (4-component vector of float) 0:71 'locals2' (structure) -0:71 3 (const int) +0:71 Constant: +0:71 3 (const int) 0:71 add (float) 0:71 add (float) 0:71 add (float) 0:71 direct index (float) 0:71 'localFArray' (16-element array of float) -0:71 4 (const int) +0:71 Constant: +0:71 4 (const int) 0:71 f: direct index for structure (float) 0:71 s1_1: direct index for structure (structure) 0:71 'locals2' (structure) -0:71 2 (const int) -0:71 1 (const int) +0:71 Constant: +0:71 2 (const int) +0:71 Constant: +0:71 1 (const int) 0:71 indirect index (float) 0:71 'localArray' (16-element array of float) 0:71 'x' (int) diff --git a/Test/baseResults/loops.frag.out b/Test/baseResults/loops.frag.out index 0cc1c9a..3937067 100644 --- a/Test/baseResults/loops.frag.out +++ b/Test/baseResults/loops.frag.out @@ -9,7 +9,8 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:55 'BaseColor' (smooth in 4-component vector of float) 0:58 Loop with condition tested first 0:58 Loop Condition -0:58 true (const bool) +0:58 Constant: +0:58 true (const bool) 0:58 Loop Body 0:59 Sequence 0:59 Test condition and select (void) @@ -17,46 +18,54 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:59 Compare Less Than (bool) 0:59 direct index (float) 0:59 'color' (4-component vector of float) -0:59 0 (const int) -0:59 0.330000 +0:59 Constant: +0:59 0 (const int) +0:59 Constant: +0:59 0.330000 0:59 true case 0:60 Sequence 0:60 add second child into first child (4-component vector of float) 0:60 'color' (4-component vector of float) -0:60 0.330000 -0:60 0.330000 -0:60 0.330000 -0:60 0.330000 +0:60 Constant: +0:60 0.330000 +0:60 0.330000 +0:60 0.330000 +0:60 0.330000 0:61 Branch: Break 0:63 Test condition and select (void) 0:63 Condition 0:63 Compare Less Than (bool) 0:63 direct index (float) 0:63 'color' (4-component vector of float) -0:63 0 (const int) -0:63 0.660000 +0:63 Constant: +0:63 0 (const int) +0:63 Constant: +0:63 0.660000 0:63 true case 0:64 Sequence 0:64 add second child into first child (4-component vector of float) 0:64 'color' (4-component vector of float) -0:64 0.660000 -0:64 0.660000 -0:64 0.660000 -0:64 0.660000 +0:64 Constant: +0:64 0.660000 +0:64 0.660000 +0:64 0.660000 +0:64 0.660000 0:65 Branch: Break 0:68 add second child into first child (4-component vector of float) 0:68 'color' (4-component vector of float) -0:68 0.330000 -0:68 0.330000 -0:68 0.330000 -0:68 0.330000 +0:68 Constant: +0:68 0.330000 +0:68 0.330000 +0:68 0.330000 +0:68 0.330000 0:69 Branch: Break 0:73 Loop with condition tested first 0:73 Loop Condition 0:73 Compare Less Than (bool) 0:73 direct index (float) 0:73 'color' (4-component vector of float) -0:73 0 (const int) +0:73 Constant: +0:73 0 (const int) 0:73 'd' (uniform float) 0:73 Loop Body 0:74 Sequence @@ -68,7 +77,8 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:78 Compare Less Than (bool) 0:78 direct index (float) 0:78 'color' (4-component vector of float) -0:78 2 (const int) +0:78 Constant: +0:78 2 (const int) 0:78 'd' (uniform float) 0:78 Loop Body 0:79 Sequence @@ -80,7 +90,8 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:80 Compare Less Than (bool) 0:80 direct index (float) 0:80 'color' (4-component vector of float) -0:80 3 (const int) +0:80 Constant: +0:80 3 (const int) 0:80 'd' (uniform float) 0:80 true case 0:81 Branch: Continue @@ -92,8 +103,10 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:87 Compare Less Than (bool) 0:87 direct index (float) 0:87 'color' (4-component vector of float) -0:87 0 (const int) -0:87 42.000000 +0:87 Constant: +0:87 0 (const int) +0:87 Constant: +0:87 42.000000 0:87 Loop Body 0:88 Sequence 0:88 Pre-Increment (4-component vector of float) @@ -104,12 +117,14 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:92 Compare Less Than (bool) 0:92 direct index (float) 0:92 'color' (4-component vector of float) -0:92 3 (const int) +0:92 Constant: +0:92 3 (const int) 0:92 'd2' (uniform float) 0:92 Compare Less Than (bool) 0:92 direct index (float) 0:92 'color' (4-component vector of float) -0:92 1 (const int) +0:92 Constant: +0:92 1 (const int) 0:92 'd3' (uniform float) 0:92 Loop Body 0:93 Sequence @@ -121,7 +136,8 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:97 Compare Less Than (bool) 0:97 direct index (float) 0:97 'color' (4-component vector of float) -0:97 2 (const int) +0:97 Constant: +0:97 2 (const int) 0:97 'd3' (uniform float) 0:97 Loop Body 0:98 Sequence @@ -133,7 +149,8 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:99 Compare Less Than (bool) 0:99 direct index (float) 0:99 'color' (4-component vector of float) -0:99 1 (const int) +0:99 Constant: +0:99 1 (const int) 0:99 'd4' (uniform float) 0:99 true case 0:100 Branch: Break @@ -144,7 +161,8 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:105 Sequence 0:105 move second child to first child (int) 0:105 'i' (int) -0:105 0 (const int) +0:105 Constant: +0:105 0 (const int) 0:105 Loop with condition tested first 0:105 Loop Condition 0:105 Compare Less Than (bool) @@ -163,7 +181,8 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:112 Compare Less Than (bool) 0:112 direct index (float) 0:112 'color' (4-component vector of float) -0:112 0 (const int) +0:112 Constant: +0:112 0 (const int) 0:112 'd2' (uniform float) 0:112 Loop Body 0:111 Sequence @@ -174,18 +193,21 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:115 Sequence 0:115 move second child to first child (int) 0:115 'i' (int) -0:115 0 (const int) +0:115 Constant: +0:115 0 (const int) 0:115 Loop with condition tested first 0:115 Loop Condition 0:115 Compare Less Than (bool) 0:115 'i' (int) -0:115 42 (const int) +0:115 Constant: +0:115 42 (const int) 0:115 Loop Body 0:116 Sequence 0:116 add second child into first child (float) 0:116 direct index (float) 0:116 'color' (4-component vector of float) -0:116 2 (const int) +0:116 Constant: +0:116 2 (const int) 0:116 'd3' (uniform float) 0:115 Loop Terminal Expression 0:115 Pre-Increment (int) @@ -194,12 +216,14 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:120 Sequence 0:120 move second child to first child (int) 0:120 'i' (int) -0:120 0 (const int) +0:120 Constant: +0:120 0 (const int) 0:120 Loop with condition tested first 0:120 Loop Condition 0:120 Compare Less Than (bool) 0:120 'i' (int) -0:120 100 (const int) +0:120 Constant: +0:120 100 (const int) 0:120 Loop Body 0:121 Sequence 0:121 Test condition and select (void) @@ -207,37 +231,46 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:121 Compare Less Than (bool) 0:121 direct index (float) 0:121 'color' (4-component vector of float) -0:121 2 (const int) -0:121 20.000000 +0:121 Constant: +0:121 2 (const int) +0:121 Constant: +0:121 20.000000 0:121 true case 0:122 Post-Increment (float) 0:122 direct index (float) 0:122 'color' (4-component vector of float) -0:122 0 (const int) +0:122 Constant: +0:122 0 (const int) 0:121 false case 0:124 Post-Increment (float) 0:124 direct index (float) 0:124 'color' (4-component vector of float) -0:124 1 (const int) +0:124 Constant: +0:124 1 (const int) 0:125 Test condition and select (void) 0:125 Condition 0:125 Compare Less Than (bool) 0:125 direct index (float) 0:125 'color' (4-component vector of float) -0:125 3 (const int) -0:125 20.000000 +0:125 Constant: +0:125 3 (const int) +0:125 Constant: +0:125 20.000000 0:125 true case 0:126 Test condition and select (void) 0:126 Condition 0:126 Compare Greater Than (bool) 0:126 direct index (float) 0:126 'color' (4-component vector of float) -0:126 2 (const int) +0:126 Constant: +0:126 2 (const int) 0:126 direct index (float) 0:126 'color' (4-component vector of float) -0:126 1 (const int) +0:126 Constant: +0:126 1 (const int) 0:126 true case -0:127 0 (const int) +0:127 Constant: +0:127 0 (const int) 0:120 Loop Terminal Expression 0:120 Pre-Increment (int) 0:120 'i' (int) @@ -245,12 +278,14 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:131 Sequence 0:131 move second child to first child (int) 0:131 'i' (int) -0:131 0 (const int) +0:131 Constant: +0:131 0 (const int) 0:131 Loop with condition tested first 0:131 Loop Condition 0:131 Compare Less Than (bool) 0:131 'i' (int) -0:131 120 (const int) +0:131 Constant: +0:131 120 (const int) 0:131 Loop Body 0:132 Sequence 0:132 Test condition and select (void) @@ -258,18 +293,22 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:132 Compare Less Than (bool) 0:132 direct index (float) 0:132 'color' (4-component vector of float) -0:132 2 (const int) -0:132 20.000000 +0:132 Constant: +0:132 2 (const int) +0:132 Constant: +0:132 20.000000 0:132 true case 0:133 Post-Increment (float) 0:133 direct index (float) 0:133 'color' (4-component vector of float) -0:133 0 (const int) +0:133 Constant: +0:133 0 (const int) 0:132 false case 0:135 Post-Increment (float) 0:135 direct index (float) 0:135 'color' (4-component vector of float) -0:135 1 (const int) +0:135 Constant: +0:135 1 (const int) 0:131 Loop Terminal Expression 0:131 Pre-Increment (int) 0:131 'i' (int) @@ -277,32 +316,37 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:139 Sequence 0:139 move second child to first child (int) 0:139 'i' (int) -0:139 0 (const int) +0:139 Constant: +0:139 0 (const int) 0:139 Loop with condition tested first 0:139 Loop Condition 0:139 Compare Less Than (bool) 0:139 'i' (int) -0:139 42 (const int) +0:139 Constant: +0:139 42 (const int) 0:139 Loop Body 0:140 Sequence 0:140 add second child into first child (float) 0:140 direct index (float) 0:140 'color' (4-component vector of float) -0:140 2 (const int) +0:140 Constant: +0:140 2 (const int) 0:140 'd3' (uniform float) 0:141 Test condition and select (void) 0:141 Condition 0:141 Compare Less Than (bool) 0:141 direct index (float) 0:141 'color' (4-component vector of float) -0:141 0 (const int) +0:141 Constant: +0:141 0 (const int) 0:141 'd4' (uniform float) 0:141 true case 0:142 Branch: Continue 0:143 Pre-Increment (float) 0:143 direct index (float) 0:143 'color' (4-component vector of float) -0:143 3 (const int) +0:143 Constant: +0:143 3 (const int) 0:139 Loop Terminal Expression 0:139 Pre-Increment (int) 0:139 'i' (int) @@ -310,32 +354,37 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:147 Sequence 0:147 move second child to first child (int) 0:147 'i' (int) -0:147 0 (const int) +0:147 Constant: +0:147 0 (const int) 0:147 Loop with condition tested first 0:147 Loop Condition 0:147 Compare Less Than (bool) 0:147 'i' (int) -0:147 42 (const int) +0:147 Constant: +0:147 42 (const int) 0:147 Loop Body 0:148 Sequence 0:148 add second child into first child (float) 0:148 direct index (float) 0:148 'color' (4-component vector of float) -0:148 2 (const int) +0:148 Constant: +0:148 2 (const int) 0:148 'd3' (uniform float) 0:149 Test condition and select (void) 0:149 Condition 0:149 Compare Less Than (bool) 0:149 direct index (float) 0:149 'color' (4-component vector of float) -0:149 0 (const int) +0:149 Constant: +0:149 0 (const int) 0:149 'd4' (uniform float) 0:149 true case 0:150 Branch: Break 0:151 Pre-Increment (float) 0:151 direct index (float) 0:151 'color' (4-component vector of float) -0:151 3 (const int) +0:151 Constant: +0:151 3 (const int) 0:147 Loop Terminal Expression 0:147 Pre-Increment (int) 0:147 'i' (int) @@ -344,7 +393,8 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:163 Compare Less Than (bool) 0:163 direct index (float) 0:163 'color' (4-component vector of float) -0:163 2 (const int) +0:163 Constant: +0:163 2 (const int) 0:163 'd4' (uniform float) 0:163 Loop Body 0:156 Sequence @@ -356,7 +406,8 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:157 Compare Less Than (bool) 0:157 direct index (float) 0:157 'color' (4-component vector of float) -0:157 0 (const int) +0:157 Constant: +0:157 0 (const int) 0:157 'd4' (uniform float) 0:157 true case 0:158 Branch: Continue @@ -365,26 +416,30 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:159 Compare Less Than (bool) 0:159 direct index (float) 0:159 'color' (4-component vector of float) -0:159 1 (const int) +0:159 Constant: +0:159 1 (const int) 0:159 'd4' (uniform float) 0:159 true case 0:160 add second child into first child (float) 0:160 direct index (float) 0:160 'color' (4-component vector of float) -0:160 1 (const int) +0:160 Constant: +0:160 1 (const int) 0:160 'd4' (uniform float) 0:159 false case 0:162 add second child into first child (float) 0:162 direct index (float) 0:162 'color' (4-component vector of float) -0:162 0 (const int) +0:162 Constant: +0:162 0 (const int) 0:162 'd4' (uniform float) 0:170 Loop with condition not tested first 0:170 Loop Condition 0:170 Compare Less Than (bool) 0:170 direct index (float) 0:170 'color' (4-component vector of float) -0:170 0 (const int) +0:170 Constant: +0:170 0 (const int) 0:170 'd5' (uniform float) 0:170 Loop Body 0:167 Sequence @@ -396,20 +451,23 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:168 Compare Less Than (bool) 0:168 direct index (float) 0:168 'color' (4-component vector of float) -0:168 1 (const int) +0:168 Constant: +0:168 1 (const int) 0:168 'd5' (uniform float) 0:168 true case 0:169 add second child into first child (float) 0:169 direct index (float) 0:169 'color' (4-component vector of float) -0:169 1 (const int) +0:169 Constant: +0:169 1 (const int) 0:169 'd5' (uniform float) 0:173 Test condition and select (void) 0:173 Condition 0:173 Compare Less Than (bool) 0:173 direct index (float) 0:173 'color' (4-component vector of float) -0:173 0 (const int) +0:173 Constant: +0:173 0 (const int) 0:173 'd6' (uniform float) 0:173 true case 0:174 Sequence @@ -418,7 +476,8 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:174 Compare Less Than (bool) 0:174 direct index (float) 0:174 'color' (4-component vector of float) -0:174 1 (const int) +0:174 Constant: +0:174 1 (const int) 0:174 'd6' (uniform float) 0:174 Loop Body 0:175 add second child into first child (4-component vector of float) @@ -431,22 +490,26 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:177 Compare Less Than (bool) 0:177 direct index (float) 0:177 'color' (4-component vector of float) -0:177 2 (const int) +0:177 Constant: +0:177 2 (const int) 0:177 'd6' (uniform float) 0:177 Loop Body 0:178 add second child into first child (float) 0:178 direct index (float) 0:178 'color' (4-component vector of float) -0:178 2 (const int) +0:178 Constant: +0:178 2 (const int) 0:178 direct index (float) 0:178 'bigColor6' (uniform 4-component vector of float) -0:178 2 (const int) +0:178 Constant: +0:178 2 (const int) 0:182 Test condition and select (void) 0:182 Condition 0:182 Compare Less Than (bool) 0:182 direct index (float) 0:182 'color' (4-component vector of float) -0:182 0 (const int) +0:182 Constant: +0:182 0 (const int) 0:182 'd6' (uniform float) 0:182 true case 0:183 Sequence @@ -455,7 +518,8 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:183 Compare Less Than (bool) 0:183 direct index (float) 0:183 'color' (4-component vector of float) -0:183 1 (const int) +0:183 Constant: +0:183 1 (const int) 0:183 'd6' (uniform float) 0:183 Loop Body 0:184 Sequence @@ -466,7 +530,8 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:185 Condition 0:185 Compare Less Than (bool) 0:185 'd7' (uniform float) -0:185 1.000000 +0:185 Constant: +0:185 1.000000 0:185 true case 0:186 Branch: Break 0:182 false case @@ -476,26 +541,31 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:190 Compare Less Than (bool) 0:190 direct index (float) 0:190 'color' (4-component vector of float) -0:190 2 (const int) +0:190 Constant: +0:190 2 (const int) 0:190 'd6' (uniform float) 0:190 Loop Body 0:191 add second child into first child (float) 0:191 direct index (float) 0:191 'color' (4-component vector of float) -0:191 2 (const int) +0:191 Constant: +0:191 2 (const int) 0:191 direct index (float) 0:191 'bigColor6' (uniform 4-component vector of float) -0:191 2 (const int) +0:191 Constant: +0:191 2 (const int) 0:209 Loop with condition not tested first 0:209 Loop Condition -0:209 true (const bool) +0:209 Constant: +0:209 true (const bool) 0:209 Loop Body 0:197 Sequence 0:197 Test condition and select (void) 0:197 Condition 0:197 Compare Less Than (bool) 0:197 'd7' (uniform float) -0:197 0.000000 +0:197 Constant: +0:197 0.000000 0:197 true case 0:198 Branch: Break 0:200 add second child into first child (4-component vector of float) @@ -505,13 +575,15 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:202 Condition 0:202 Compare Less Than (bool) 0:202 'd7' (uniform float) -0:202 1.000000 +0:202 Constant: +0:202 1.000000 0:202 true case 0:203 Sequence 0:203 Post-Increment (float) 0:203 direct index (float) 0:203 'color' (4-component vector of float) -0:203 2 (const int) +0:203 Constant: +0:203 2 (const int) 0:204 Branch: Break 0:207 add second child into first child (4-component vector of float) 0:207 'color' (4-component vector of float) @@ -521,7 +593,8 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:234 Compare Less Than (bool) 0:234 direct index (float) 0:234 'color' (4-component vector of float) -0:234 2 (const int) +0:234 Constant: +0:234 2 (const int) 0:234 'd8' (uniform float) 0:234 Loop Body 0:217 Sequence @@ -529,7 +602,8 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:217 Condition 0:217 Compare Less Than (bool) 0:217 'd8' (uniform float) -0:217 0.000000 +0:217 Constant: +0:217 0.000000 0:217 true case 0:218 Branch: Break 0:220 add second child into first child (4-component vector of float) @@ -539,30 +613,35 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:222 Condition 0:222 Compare Less Than (bool) 0:222 'd8' (uniform float) -0:222 1.000000 +0:222 Constant: +0:222 1.000000 0:222 true case 0:223 Sequence 0:223 Post-Increment (float) 0:223 direct index (float) 0:223 'color' (4-component vector of float) -0:223 2 (const int) +0:223 Constant: +0:223 2 (const int) 0:224 Test condition and select (void) 0:224 Condition 0:224 Compare Less Than (bool) 0:224 'd8' (uniform float) -0:224 2.000000 +0:224 Constant: +0:224 2.000000 0:224 true case 0:225 Sequence 0:225 Post-Increment (float) 0:225 direct index (float) 0:225 'color' (4-component vector of float) -0:225 1 (const int) +0:225 Constant: +0:225 1 (const int) 0:224 false case 0:227 Sequence 0:227 Post-Increment (float) 0:227 direct index (float) 0:227 'color' (4-component vector of float) -0:227 0 (const int) +0:227 Constant: +0:227 0 (const int) 0:229 Branch: Break 0:232 add second child into first child (4-component vector of float) 0:232 'color' (4-component vector of float) @@ -572,7 +651,8 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:237 Compare Less Than (bool) 0:237 direct index (float) 0:237 'color' (4-component vector of float) -0:237 3 (const int) +0:237 Constant: +0:237 3 (const int) 0:237 'd9' (uniform float) 0:237 Loop Body 0:238 Sequence @@ -588,7 +668,8 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:239 Compare Less Than or Equal (bool) 0:239 direct index (float) 0:239 'color' (4-component vector of float) -0:239 0 (const int) +0:239 Constant: +0:239 0 (const int) 0:239 'd7' (uniform float) 0:239 true case 0:240 Sequence @@ -597,13 +678,16 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:240 Compare Equal (bool) 0:240 direct index (float) 0:240 'color' (4-component vector of float) -0:240 2 (const int) -0:240 5.000000 +0:240 Constant: +0:240 2 (const int) +0:240 Constant: +0:240 5.000000 0:240 true case 0:241 Post-Increment (float) 0:241 direct index (float) 0:241 'color' (4-component vector of float) -0:241 3 (const int) +0:241 Constant: +0:241 3 (const int) 0:240 false case 0:243 Branch: Break 0:250 Loop with condition tested first @@ -611,44 +695,51 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:250 Compare Less Than (bool) 0:250 direct index (float) 0:250 'color' (4-component vector of float) -0:250 2 (const int) +0:250 Constant: +0:250 2 (const int) 0:250 'd10' (uniform float) 0:250 Loop Body 0:251 Sequence 0:251 Post-Increment (float) 0:251 direct index (float) 0:251 'color' (4-component vector of float) -0:251 1 (const int) +0:251 Constant: +0:251 1 (const int) 0:252 Test condition and select (void) 0:252 Condition 0:252 Compare Less Than (bool) 0:252 direct index (float) 0:252 'color' (4-component vector of float) -0:252 1 (const int) +0:252 Constant: +0:252 1 (const int) 0:252 'd11' (uniform float) 0:252 true case 0:253 Sequence 0:253 Post-Increment (float) 0:253 direct index (float) 0:253 'color' (4-component vector of float) -0:253 2 (const int) +0:253 Constant: +0:253 2 (const int) 0:254 Test condition and select (void) 0:254 Condition 0:254 Compare Less Than (bool) 0:254 direct index (float) 0:254 'color' (4-component vector of float) -0:254 3 (const int) +0:254 Constant: +0:254 3 (const int) 0:254 'd12' (uniform float) 0:254 true case 0:255 Post-Increment (float) 0:255 direct index (float) 0:255 'color' (4-component vector of float) -0:255 3 (const int) +0:255 Constant: +0:255 3 (const int) 0:254 false case 0:257 Post-Increment (float) 0:257 direct index (float) 0:257 'color' (4-component vector of float) -0:257 0 (const int) +0:257 Constant: +0:257 0 (const int) 0:258 Branch: Continue 0:261 Post-Increment (4-component vector of float) 0:261 'color' (4-component vector of float) @@ -658,8 +749,10 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:266 Compare Less Than (bool) 0:266 direct index (float) 0:266 'color' (4-component vector of float) -0:266 0 (const int) -0:266 10.000000 +0:266 Constant: +0:266 0 (const int) +0:266 Constant: +0:266 10.000000 0:266 Loop Body 0:267 Sequence 0:267 add second child into first child (4-component vector of float) @@ -670,7 +763,8 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:269 Compare Less Than (bool) 0:269 direct index (float) 0:269 'color' (4-component vector of float) -0:269 2 (const int) +0:269 Constant: +0:269 2 (const int) 0:269 'd8' (uniform float) 0:269 true case 0:270 Test condition and select (void) @@ -678,17 +772,20 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:270 Compare Less Than (bool) 0:270 direct index (float) 0:270 'color' (4-component vector of float) -0:270 3 (const int) +0:270 Constant: +0:270 3 (const int) 0:270 'd6' (uniform float) 0:270 true case 0:271 Branch: Continue 0:273 add second child into first child (float) 0:273 direct index (float) 0:273 'color' (4-component vector of float) -0:273 1 (const int) +0:273 Constant: +0:273 1 (const int) 0:273 direct index (float) 0:273 'bigColor8' (uniform 4-component vector of float) -0:273 0 (const int) +0:273 Constant: +0:273 0 (const int) 0:276 Post-Increment (4-component vector of float) 0:276 'color' (4-component vector of float) 0:277 move second child to first child (4-component vector of float) @@ -699,7 +796,8 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:280 Compare Less Than (bool) 0:280 direct index (float) 0:280 'color' (4-component vector of float) -0:280 0 (const int) +0:280 Constant: +0:280 0 (const int) 0:280 'd14' (uniform float) 0:280 Loop Body 0:281 Sequence @@ -708,7 +806,8 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:281 Compare Less Than (bool) 0:281 direct index (float) 0:281 'color' (4-component vector of float) -0:281 1 (const int) +0:281 Constant: +0:281 1 (const int) 0:281 'd15' (uniform float) 0:281 true case 0:282 Sequence @@ -723,26 +822,30 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:290 Compare Less Than (bool) 0:290 direct index (float) 0:290 'color' (4-component vector of float) -0:290 3 (const int) +0:290 Constant: +0:290 3 (const int) 0:290 'd16' (uniform float) 0:290 Loop Body 0:291 Sequence 0:291 Post-Increment (float) 0:291 direct index (float) 0:291 'color' (4-component vector of float) -0:291 3 (const int) +0:291 Constant: +0:291 3 (const int) 0:296 Loop with condition tested first 0:296 Loop Condition 0:296 logical-and (bool) 0:296 Compare Less Than (bool) 0:296 direct index (float) 0:296 'color' (4-component vector of float) -0:296 3 (const int) +0:296 Constant: +0:296 3 (const int) 0:296 'd2' (uniform float) 0:296 Compare Less Than (bool) 0:296 direct index (float) 0:296 'color' (4-component vector of float) -0:296 1 (const int) +0:296 Constant: +0:296 1 (const int) 0:296 'd3' (uniform float) 0:296 Loop Body 0:297 Sequence @@ -754,7 +857,8 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:298 Compare Less Than (bool) 0:298 direct index (float) 0:298 'color' (4-component vector of float) -0:298 2 (const int) +0:298 Constant: +0:298 2 (const int) 0:298 'd3' (uniform float) 0:298 true case 0:299 Branch: Return @@ -763,7 +867,8 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:307 Compare Less Than (bool) 0:307 direct index (float) 0:307 'color' (4-component vector of float) -0:307 0 (const int) +0:307 Constant: +0:307 0 (const int) 0:307 'd17' (uniform float) 0:307 Loop Body 0:304 Sequence @@ -772,7 +877,8 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:304 Compare Less Than (bool) 0:304 direct index (float) 0:304 'color' (4-component vector of float) -0:304 1 (const int) +0:304 Constant: +0:304 1 (const int) 0:304 'd18' (uniform float) 0:304 true case 0:305 Branch: Return @@ -783,7 +889,8 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:310 Compare Less Than (bool) 0:310 direct index (float) 0:310 'color' (4-component vector of float) -0:310 1 (const int) +0:310 Constant: +0:310 1 (const int) 0:310 'd16' (uniform float) 0:310 Loop Body 0:311 Sequence @@ -792,7 +899,8 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:311 Compare Less Than (bool) 0:311 direct index (float) 0:311 'color' (4-component vector of float) -0:311 3 (const int) +0:311 Constant: +0:311 3 (const int) 0:311 'd16' (uniform float) 0:311 true case 0:312 Sequence diff --git a/Test/baseResults/loopsArtificial.frag.out b/Test/baseResults/loopsArtificial.frag.out index 5681ac4..d63d8ed 100644 --- a/Test/baseResults/loopsArtificial.frag.out +++ b/Test/baseResults/loopsArtificial.frag.out @@ -12,7 +12,8 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:71 Compare Less Than (bool) 0:71 direct index (float) 0:71 'color' (4-component vector of float) -0:71 2 (const int) +0:71 Constant: +0:71 2 (const int) 0:71 'd4' (uniform float) 0:71 Loop Body 0:59 Sequence @@ -24,54 +25,63 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:60 Compare Less Than (bool) 0:60 direct index (float) 0:60 'color' (4-component vector of float) -0:60 0 (const int) +0:60 Constant: +0:60 0 (const int) 0:60 'd4' (uniform float) 0:60 true case 0:61 Sequence 0:61 add second child into first child (float) 0:61 direct index (float) 0:61 'color' (4-component vector of float) -0:61 2 (const int) -0:61 2.000000 +0:61 Constant: +0:61 2 (const int) +0:61 Constant: +0:61 2.000000 0:62 Test condition and select (void) 0:62 Condition 0:62 Compare Less Than (bool) 0:62 direct index (float) 0:62 'color' (4-component vector of float) -0:62 2 (const int) +0:62 Constant: +0:62 2 (const int) 0:62 'd4' (uniform float) 0:62 true case 0:63 Sequence 0:63 Post-Increment (float) 0:63 direct index (float) 0:63 'color' (4-component vector of float) -0:63 0 (const int) +0:63 Constant: +0:63 0 (const int) 0:64 Branch: Continue 0:67 Test condition and select (void) 0:67 Condition 0:67 Compare Less Than (bool) 0:67 direct index (float) 0:67 'color' (4-component vector of float) -0:67 1 (const int) +0:67 Constant: +0:67 1 (const int) 0:67 'd4' (uniform float) 0:67 true case 0:68 add second child into first child (float) 0:68 direct index (float) 0:68 'color' (4-component vector of float) -0:68 1 (const int) +0:68 Constant: +0:68 1 (const int) 0:68 'd4' (uniform float) 0:67 false case 0:70 add second child into first child (float) 0:70 direct index (float) 0:70 'color' (4-component vector of float) -0:70 0 (const int) +0:70 Constant: +0:70 0 (const int) 0:70 'd4' (uniform float) 0:74 Loop with condition tested first 0:74 Loop Condition 0:74 Compare Less Than (bool) 0:74 direct index (float) 0:74 'color' (4-component vector of float) -0:74 3 (const int) +0:74 Constant: +0:74 3 (const int) 0:74 'd13' (uniform float) 0:74 Loop Body 0:75 Sequence @@ -80,7 +90,8 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:75 Compare Less Than (bool) 0:75 direct index (float) 0:75 'color' (4-component vector of float) -0:75 2 (const int) +0:75 Constant: +0:75 2 (const int) 0:75 'd13' (uniform float) 0:75 true case 0:76 Post-Increment (4-component vector of float) @@ -96,47 +107,55 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea 0:81 Compare Less Than (bool) 0:81 direct index (float) 0:81 'color' (4-component vector of float) -0:81 0 (const int) +0:81 Constant: +0:81 0 (const int) 0:81 'd4' (uniform float) 0:81 true case 0:82 Sequence 0:82 add second child into first child (float) 0:82 direct index (float) 0:82 'color' (4-component vector of float) -0:82 2 (const int) -0:82 2.000000 +0:82 Constant: +0:82 2 (const int) +0:82 Constant: +0:82 2.000000 0:83 Test condition and select (void) 0:83 Condition 0:83 Compare Less Than (bool) 0:83 direct index (float) 0:83 'color' (4-component vector of float) -0:83 2 (const int) +0:83 Constant: +0:83 2 (const int) 0:83 'd4' (uniform float) 0:83 true case 0:84 Sequence 0:84 Post-Increment (float) 0:84 direct index (float) 0:84 'color' (4-component vector of float) -0:84 0 (const int) +0:84 Constant: +0:84 0 (const int) 0:85 Branch: Continue 0:88 Test condition and select (void) 0:88 Condition 0:88 Compare Less Than (bool) 0:88 direct index (float) 0:88 'color' (4-component vector of float) -0:88 1 (const int) +0:88 Constant: +0:88 1 (const int) 0:88 'd4' (uniform float) 0:88 true case 0:89 add second child into first child (float) 0:89 direct index (float) 0:89 'color' (4-component vector of float) -0:89 1 (const int) +0:89 Constant: +0:89 1 (const int) 0:89 'd4' (uniform float) 0:88 false case 0:91 add second child into first child (float) 0:91 direct index (float) 0:91 'color' (4-component vector of float) -0:91 0 (const int) +0:91 Constant: +0:91 0 (const int) 0:91 'd4' (uniform float) 0:94 Post-Increment (4-component vector of float) 0:94 'color' (4-component vector of float) diff --git a/Test/baseResults/matrix.frag.out b/Test/baseResults/matrix.frag.out index 2c28b78..1f5914d 100644 --- a/Test/baseResults/matrix.frag.out +++ b/Test/baseResults/matrix.frag.out @@ -10,14 +10,16 @@ WARNING: 0:22: varying deprecated in version 130; may be removed in future relea 0:27 Construct vec4 (4-component vector of float) 0:27 direct index (uniform 4-component vector of float) 0:27 'un34' (uniform 4X4 matrix of float) -0:27 1 (const int) +0:27 Constant: +0:27 1 (const int) 0:28 add second child into first child (4-component vector of float) 0:28 'gl_FragColor' (fragColor 4-component vector of float) 0:28 Construct vec4 (4-component vector of float) 0:28 vector-times-matrix (3-component vector of float) 0:28 'Color' (smooth in 3-component vector of float) 0:28 'colorTransform' (uniform 3X3 matrix of float) -0:28 1.000000 +0:28 Constant: +0:28 1.000000 0:30 Test condition and select (void) 0:30 Condition 0:30 Compare Not Equal (bool) @@ -48,139 +50,176 @@ WARNING: 0:22: varying deprecated in version 130; may be removed in future relea 0:42 component-wise multiply (float) 0:42 direct index (float) 0:42 'v' (smooth in 4-component vector of float) -0:42 0 (const int) +0:42 Constant: +0:42 0 (const int) 0:42 direct index (float) 0:42 'u' (smooth in 4-component vector of float) -0:42 0 (const int) +0:42 Constant: +0:42 0 (const int) 0:42 component-wise multiply (float) 0:42 direct index (float) 0:42 'v' (smooth in 4-component vector of float) -0:42 0 (const int) +0:42 Constant: +0:42 0 (const int) 0:42 direct index (float) 0:42 'u' (smooth in 4-component vector of float) -0:42 1 (const int) +0:42 Constant: +0:42 1 (const int) 0:42 component-wise multiply (float) 0:42 direct index (float) 0:42 'v' (smooth in 4-component vector of float) -0:42 0 (const int) +0:42 Constant: +0:42 0 (const int) 0:42 direct index (float) 0:42 'u' (smooth in 4-component vector of float) -0:42 2 (const int) +0:42 Constant: +0:42 2 (const int) 0:42 component-wise multiply (float) 0:42 direct index (float) 0:42 'v' (smooth in 4-component vector of float) -0:42 0 (const int) +0:42 Constant: +0:42 0 (const int) 0:42 direct index (float) 0:42 'u' (smooth in 4-component vector of float) -0:42 3 (const int) +0:42 Constant: +0:42 3 (const int) 0:43 component-wise multiply (float) 0:43 direct index (float) 0:43 'v' (smooth in 4-component vector of float) -0:43 1 (const int) +0:43 Constant: +0:43 1 (const int) 0:43 direct index (float) 0:43 'u' (smooth in 4-component vector of float) -0:43 0 (const int) +0:43 Constant: +0:43 0 (const int) 0:43 component-wise multiply (float) 0:43 direct index (float) 0:43 'v' (smooth in 4-component vector of float) -0:43 1 (const int) +0:43 Constant: +0:43 1 (const int) 0:43 direct index (float) 0:43 'u' (smooth in 4-component vector of float) -0:43 1 (const int) +0:43 Constant: +0:43 1 (const int) 0:43 component-wise multiply (float) 0:43 direct index (float) 0:43 'v' (smooth in 4-component vector of float) -0:43 1 (const int) +0:43 Constant: +0:43 1 (const int) 0:43 direct index (float) 0:43 'u' (smooth in 4-component vector of float) -0:43 2 (const int) +0:43 Constant: +0:43 2 (const int) 0:43 component-wise multiply (float) 0:43 direct index (float) 0:43 'v' (smooth in 4-component vector of float) -0:43 1 (const int) +0:43 Constant: +0:43 1 (const int) 0:43 direct index (float) 0:43 'u' (smooth in 4-component vector of float) -0:43 3 (const int) +0:43 Constant: +0:43 3 (const int) 0:44 component-wise multiply (float) 0:44 direct index (float) 0:44 'v' (smooth in 4-component vector of float) -0:44 2 (const int) +0:44 Constant: +0:44 2 (const int) 0:44 direct index (float) 0:44 'u' (smooth in 4-component vector of float) -0:44 0 (const int) +0:44 Constant: +0:44 0 (const int) 0:44 component-wise multiply (float) 0:44 direct index (float) 0:44 'v' (smooth in 4-component vector of float) -0:44 2 (const int) +0:44 Constant: +0:44 2 (const int) 0:44 direct index (float) 0:44 'u' (smooth in 4-component vector of float) -0:44 1 (const int) +0:44 Constant: +0:44 1 (const int) 0:44 component-wise multiply (float) 0:44 direct index (float) 0:44 'v' (smooth in 4-component vector of float) -0:44 2 (const int) +0:44 Constant: +0:44 2 (const int) 0:44 direct index (float) 0:44 'u' (smooth in 4-component vector of float) -0:44 2 (const int) +0:44 Constant: +0:44 2 (const int) 0:44 component-wise multiply (float) 0:44 direct index (float) 0:44 'v' (smooth in 4-component vector of float) -0:44 2 (const int) +0:44 Constant: +0:44 2 (const int) 0:44 direct index (float) 0:44 'u' (smooth in 4-component vector of float) -0:44 3 (const int) +0:44 Constant: +0:44 3 (const int) 0:45 component-wise multiply (float) 0:45 direct index (float) 0:45 'v' (smooth in 4-component vector of float) -0:45 3 (const int) +0:45 Constant: +0:45 3 (const int) 0:45 direct index (float) 0:45 'u' (smooth in 4-component vector of float) -0:45 0 (const int) +0:45 Constant: +0:45 0 (const int) 0:45 component-wise multiply (float) 0:45 direct index (float) 0:45 'v' (smooth in 4-component vector of float) -0:45 3 (const int) +0:45 Constant: +0:45 3 (const int) 0:45 direct index (float) 0:45 'u' (smooth in 4-component vector of float) -0:45 1 (const int) +0:45 Constant: +0:45 1 (const int) 0:45 component-wise multiply (float) 0:45 direct index (float) 0:45 'v' (smooth in 4-component vector of float) -0:45 3 (const int) +0:45 Constant: +0:45 3 (const int) 0:45 direct index (float) 0:45 'u' (smooth in 4-component vector of float) -0:45 2 (const int) +0:45 Constant: +0:45 2 (const int) 0:45 component-wise multiply (float) 0:45 direct index (float) 0:45 'v' (smooth in 4-component vector of float) -0:45 3 (const int) +0:45 Constant: +0:45 3 (const int) 0:45 direct index (float) 0:45 'u' (smooth in 4-component vector of float) -0:45 3 (const int) +0:45 Constant: +0:45 3 (const int) 0:46 add second child into first child (4X4 matrix of float) 0:46 'm34' (4X4 matrix of float) 0:46 Construct mat4 (4X4 matrix of float) 0:46 direct index (float) 0:46 'v' (smooth in 4-component vector of float) -0:46 0 (const int) +0:46 Constant: +0:46 0 (const int) 0:47 add second child into first child (4X4 matrix of float) 0:47 'm34' (4X4 matrix of float) 0:47 Construct mat4 (4X4 matrix of float) 0:47 'u' (smooth in 4-component vector of float) 0:47 direct index (float) 0:47 'u' (smooth in 4-component vector of float) -0:47 0 (const int) +0:47 Constant: +0:47 0 (const int) 0:47 'u' (smooth in 4-component vector of float) 0:47 direct index (float) 0:47 'u' (smooth in 4-component vector of float) -0:47 0 (const int) +0:47 Constant: +0:47 0 (const int) 0:47 'u' (smooth in 4-component vector of float) 0:47 direct index (float) 0:47 'u' (smooth in 4-component vector of float) -0:47 0 (const int) +0:47 Constant: +0:47 0 (const int) 0:47 direct index (float) 0:47 'u' (smooth in 4-component vector of float) -0:47 0 (const int) +0:47 Constant: +0:47 0 (const int) 0:51 Test condition and select (void) 0:51 Condition 0:51 Compare Equal (bool) diff --git a/Test/baseResults/matrix2.frag.out b/Test/baseResults/matrix2.frag.out index 8bf9225..0111378 100644 --- a/Test/baseResults/matrix2.frag.out +++ b/Test/baseResults/matrix2.frag.out @@ -13,35 +13,39 @@ WARNING: 0:15: varying deprecated in version 130; may be removed in future relea 0:21 'u' (smooth in 3-component vector of float) 0:23 add second child into first child (3X4 matrix of float) 0:23 'm34' (3X4 matrix of float) -0:23 4.300000 -0:23 0.000000 -0:23 0.000000 -0:23 0.000000 -0:23 0.000000 -0:23 4.300000 -0:23 0.000000 -0:23 0.000000 -0:23 0.000000 -0:23 0.000000 -0:23 4.300000 -0:23 0.000000 +0:23 Constant: +0:23 4.300000 +0:23 0.000000 +0:23 0.000000 +0:23 0.000000 +0:23 0.000000 +0:23 4.300000 +0:23 0.000000 +0:23 0.000000 +0:23 0.000000 +0:23 0.000000 +0:23 4.300000 +0:23 0.000000 0:25 move second child to first child (4-component vector of float) 0:25 'FragColor' (out 4-component vector of float) 0:25 Construct vec4 (4-component vector of float) 0:25 'Color' (smooth in 3-component vector of float) -0:25 1.000000 +0:25 Constant: +0:25 1.000000 0:26 multiply second child into first child (4-component vector of float) 0:26 'FragColor' (out 4-component vector of float) 0:26 Construct vec4 (4-component vector of float) 0:26 vector-times-matrix (3-component vector of float) 0:26 'FragColor' (out 4-component vector of float) 0:26 'm34' (3X4 matrix of float) -0:26 1.000000 +0:26 Constant: +0:26 1.000000 0:28 matrix scale second child into first child (3X4 matrix of float) 0:28 'm34' (3X4 matrix of float) 0:28 direct index (float) 0:28 'v' (smooth in 4-component vector of float) -0:28 0 (const int) +0:28 Constant: +0:28 0 (const int) 0:30 Sequence 0:30 move second child to first child (4X4 matrix of float) 0:30 'm44' (4X4 matrix of float) @@ -73,7 +77,8 @@ WARNING: 0:15: varying deprecated in version 130; may be removed in future relea 0:39 vector-times-matrix (3-component vector of float) 0:39 'FragColor' (out 4-component vector of float) 0:39 'm34' (3X4 matrix of float) -0:39 1.000000 +0:39 Constant: +0:39 1.000000 0:40 multiply second child into first child (4-component vector of float) 0:40 'FragColor' (out 4-component vector of float) 0:40 Construct vec4 (4-component vector of float) @@ -90,23 +95,31 @@ WARNING: 0:15: varying deprecated in version 130; may be removed in future relea 0:42 direct index (float) 0:42 direct index (2-component vector of float) 0:42 'inv' (2X2 matrix of float) +0:42 Constant: +0:42 0 (const int) +0:42 Constant: 0:42 0 (const int) -0:42 0 (const int) 0:42 direct index (float) 0:42 direct index (2-component vector of float) 0:42 'inv' (2X2 matrix of float) -0:42 1 (const int) -0:42 0 (const int) +0:42 Constant: +0:42 1 (const int) +0:42 Constant: +0:42 0 (const int) 0:42 direct index (float) 0:42 direct index (2-component vector of float) 0:42 'inv' (2X2 matrix of float) -0:42 0 (const int) -0:42 1 (const int) +0:42 Constant: +0:42 0 (const int) +0:42 Constant: +0:42 1 (const int) 0:42 direct index (float) 0:42 direct index (2-component vector of float) 0:42 'inv' (2X2 matrix of float) +0:42 Constant: +0:42 1 (const int) +0:42 Constant: 0:42 1 (const int) -0:42 1 (const int) 0:43 Sequence 0:43 move second child to first child (3X3 matrix of float) 0:43 'inv3' (3X3 matrix of float) @@ -118,8 +131,10 @@ WARNING: 0:15: varying deprecated in version 130; may be removed in future relea 0:44 direct index (float) 0:44 direct index (3-component vector of float) 0:44 'inv3' (3X3 matrix of float) -0:44 2 (const int) -0:44 1 (const int) +0:44 Constant: +0:44 2 (const int) +0:44 Constant: +0:44 1 (const int) 0:46 Sequence 0:46 move second child to first child (4X4 matrix of float) 0:46 'inv4' (4X4 matrix of float) diff --git a/Test/baseResults/matrixError.vert.out b/Test/baseResults/matrixError.vert.out index 0f014cf..4a6face 100644 --- a/Test/baseResults/matrixError.vert.out +++ b/Test/baseResults/matrixError.vert.out @@ -25,8 +25,10 @@ ERROR: node is still EOpNull! 0:21 direct index (float) 0:21 direct index (4-component vector of float) 0:21 'm24' (2X4 matrix of float) -0:21 2 (const int) -0:21 4 (const int) +0:21 Constant: +0:21 2 (const int) +0:21 Constant: +0:21 4 (const int) 0:? Linker Objects 0:? 'v3' (in 3-component vector of float) 0:? 'm32' (uniform 3X2 matrix of float) diff --git a/Test/baseResults/newTexture.frag.out b/Test/baseResults/newTexture.frag.out index 8bb8a41..40613b1 100644 --- a/Test/baseResults/newTexture.frag.out +++ b/Test/baseResults/newTexture.frag.out @@ -18,11 +18,13 @@ 0:38 Function Call: textureLod(sA21;vf3;f1; (4-component vector of float) 0:38 's2DArray' (uniform sampler2DArray) 0:38 'c3D' (smooth in 3-component vector of float) -0:38 1.200000 +0:38 Constant: +0:38 1.200000 0:39 add second child into first child (float) 0:39 direct index (float) 0:39 'v' (4-component vector of float) -0:39 1 (const int) +0:39 Constant: +0:39 1 (const int) 0:39 Function Call: textureOffset(sS21;vf3;vi2;f1; (float) 0:39 's2DShadow' (uniform sampler2DShadow) 0:39 'c3D' (smooth in 3-component vector of float) @@ -39,12 +41,14 @@ 0:41 Function Call: texelFetchOffset(s21;vi2;i1;vi2; (4-component vector of float) 0:41 's2D' (uniform sampler2D) 0:41 'ic2D' (flat in 2-component vector of int) -0:41 4 (const int) +0:41 Constant: +0:41 4 (const int) 0:41 'ic2D' (flat in 2-component vector of int) 0:42 add second child into first child (float) 0:42 direct index (float) 0:42 'v' (4-component vector of float) -0:42 1 (const int) +0:42 Constant: +0:42 1 (const int) 0:42 Function Call: textureLodOffset(sS21;vf3;f1;vi2; (float) 0:42 's2DShadow' (uniform sampler2DShadow) 0:42 'c3D' (smooth in 3-component vector of float) @@ -67,7 +71,8 @@ 0:45 add second child into first child (float) 0:45 direct index (float) 0:45 'v' (4-component vector of float) -0:45 0 (const int) +0:45 Constant: +0:45 0 (const int) 0:45 Function Call: textureGradOffset(sAS21;vf4;vf2;vf2;vi2; (float) 0:45 's2DArrayShadow' (uniform sampler2DArrayShadow) 0:45 'c4D' (smooth in 4-component vector of float) @@ -135,7 +140,8 @@ 0:57 Function Call: texture(is31;vf3;f1; (4-component vector of int) 0:57 'is3D' (uniform isampler3D) 0:57 'c3D' (smooth in 3-component vector of float) -0:57 4.200000 +0:57 Constant: +0:57 4.200000 0:58 add second child into first child (4-component vector of float) 0:58 'v' (4-component vector of float) 0:58 Convert int to float (4-component vector of float) @@ -165,7 +171,8 @@ 0:64 'iv2' (2-component vector of int) 0:64 Function Call: textureSize(sSC1;i1; (2-component vector of int) 0:64 'sCubeShadow' (uniform samplerCubeShadow) -0:64 2 (const int) +0:64 Constant: +0:64 2 (const int) 0:67 move second child to first child (4-component vector of float) 0:67 'FragData' (out 4-component vector of float) 0:67 add (4-component vector of float) @@ -173,8 +180,10 @@ 0:67 Construct vec4 (4-component vector of float) 0:67 Convert int to float (2-component vector of float) 0:67 'iv2' (2-component vector of int) -0:67 0.000000 -0:67 0.000000 +0:67 Constant: +0:67 0.000000 +0:67 Constant: +0:67 0.000000 0:? Linker Objects 0:? 's2D' (uniform sampler2D) 0:? 's3D' (uniform sampler3D) diff --git a/Test/baseResults/nonSquare.vert.out b/Test/baseResults/nonSquare.vert.out index 631fa59..6b1961d 100644 --- a/Test/baseResults/nonSquare.vert.out +++ b/Test/baseResults/nonSquare.vert.out @@ -24,42 +24,65 @@ 0:23 'm23' (2X3 matrix of float) 0:23 'm32' (uniform 3X2 matrix of float) 0:23 'v3' (in 3-component vector of float) -0:23 0.000000 +0:23 Constant: +0:23 0.000000 0:24 matrix-times-vector (4-component vector of float) -0:24 3.000000 -0:24 6.000000 -0:24 0.000000 -0:24 0.000000 -0:24 9.000000 -0:24 12.000000 -0:24 0.000000 -0:24 0.000000 -0:24 15.000000 -0:24 18.000000 -0:24 0.000000 -0:24 0.000000 -0:24 21.000000 -0:24 24.000000 -0:24 0.000000 -0:24 0.000000 +0:24 Constant: +0:24 3.000000 +0:24 6.000000 +0:24 0.000000 +0:24 0.000000 +0:24 9.000000 +0:24 12.000000 +0:24 0.000000 +0:24 0.000000 +0:24 15.000000 +0:24 18.000000 +0:24 0.000000 +0:24 0.000000 +0:24 21.000000 +0:24 24.000000 +0:24 0.000000 +0:24 0.000000 0:24 'v4' (in 4-component vector of float) -0:24 50.000000 -0:24 110.000000 -0:24 170.000000 -0:24 230.000000 -0:24 30.000000 -0:24 60.000000 -0:24 0.000000 -0:24 0.000000 -0:24 20.000000 -0:24 10.000000 -0:24 6.000000 -0:24 5.000000 +0:24 Constant: +0:24 50.000000 +0:24 110.000000 +0:24 170.000000 +0:24 230.000000 +0:24 Constant: +0:24 30.000000 +0:24 60.000000 +0:24 0.000000 +0:24 0.000000 +0:24 Constant: +0:24 20.000000 +0:24 10.000000 +0:24 6.000000 +0:24 5.000000 0:? Linker Objects 0:? 'v3' (in 3-component vector of float) 0:? 'v4' (in 4-component vector of float) 0:? 'm32' (uniform 3X2 matrix of float) 0:? 'cv2' (const 2-component vector of float) +0:? 10.000000 +0:? 20.000000 0:? 'm24' (const 2X4 matrix of float) +0:? 3.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 3.000000 +0:? 0.000000 +0:? 0.000000 0:? 'm42' (const 4X2 matrix of float) +0:? 1.000000 +0:? 2.000000 +0:? 3.000000 +0:? 4.000000 +0:? 5.000000 +0:? 6.000000 +0:? 7.000000 +0:? 8.000000 diff --git a/Test/baseResults/numeral.frag.out b/Test/baseResults/numeral.frag.out index 6b99a42..99216ec 100644 --- a/Test/baseResults/numeral.frag.out +++ b/Test/baseResults/numeral.frag.out @@ -17,287 +17,358 @@ ERROR: node is still EOpNull! 0:5 Sequence 0:5 move second child to first child (int) 0:5 'o00' (int) -0:5 0 (const int) +0:5 Constant: +0:5 0 (const int) 0:6 Sequence 0:6 move second child to first child (int) 0:6 'o000' (int) -0:6 0 (const int) +0:6 Constant: +0:6 0 (const int) 0:7 Sequence 0:7 move second child to first child (int) 0:7 'o0000' (int) -0:7 0 (const int) +0:7 Constant: +0:7 0 (const int) 0:8 Sequence 0:8 move second child to first child (int) 0:8 'o5' (int) -0:8 5 (const int) +0:8 Constant: +0:8 5 (const int) 0:9 Sequence 0:9 move second child to first child (int) 0:9 'o05' (int) -0:9 5 (const int) +0:9 Constant: +0:9 5 (const int) 0:10 Sequence 0:10 move second child to first child (int) 0:10 'o006' (int) -0:10 6 (const int) +0:10 Constant: +0:10 6 (const int) 0:11 Sequence 0:11 move second child to first child (int) 0:11 'o7' (int) -0:11 7 (const int) +0:11 Constant: +0:11 7 (const int) 0:12 Sequence 0:12 move second child to first child (int) 0:12 'o58' (int) -0:12 58 (const int) +0:12 Constant: +0:12 58 (const int) 0:13 Sequence 0:13 move second child to first child (int) 0:13 'omax' (int) -0:13 -1 (const int) +0:13 Constant: +0:13 -1 (const int) 0:14 Sequence 0:14 move second child to first child (int) 0:14 'o8' (int) -0:14 0 (const int) +0:14 Constant: +0:14 0 (const int) 0:15 Sequence 0:15 move second child to first child (int) 0:15 'o08' (int) -0:15 0 (const int) +0:15 Constant: +0:15 0 (const int) 0:16 Sequence 0:16 move second child to first child (int) 0:16 'o009' (int) -0:16 0 (const int) +0:16 Constant: +0:16 0 (const int) 0:17 Sequence 0:17 move second child to first child (int) 0:17 'obig' (int) -0:17 995208915 (const int) +0:17 Constant: +0:17 995208915 (const int) 0:18 Sequence 0:18 move second child to first child (int) 0:18 'omax1' (int) -0:18 536870912 (const int) +0:18 Constant: +0:18 536870912 (const int) 0:20 Sequence 0:20 move second child to first child (uint) 0:20 'uo5' (uint) -0:20 5 (const uint) +0:20 Constant: +0:20 5 (const uint) 0:21 Sequence 0:21 move second child to first child (uint) 0:21 'uo6' (uint) -0:21 6 (const uint) +0:21 Constant: +0:21 6 (const uint) 0:22 Sequence 0:22 move second child to first child (uint) 0:22 'uo7' (uint) -0:22 7 (const uint) +0:22 Constant: +0:22 7 (const uint) 0:23 Sequence 0:23 move second child to first child (uint) 0:23 'uo8' (uint) -0:23 0 (const uint) +0:23 Constant: +0:23 0 (const uint) 0:24 Sequence 0:24 move second child to first child (uint) 0:24 'uo9' (uint) -0:24 0 (const uint) +0:24 Constant: +0:24 0 (const uint) 0:26 Sequence 0:26 move second child to first child (int) 0:26 'h0' (int) -0:26 0 (const int) +0:26 Constant: +0:26 0 (const int) 0:27 Sequence 0:27 move second child to first child (int) 0:27 'h00' (int) -0:27 0 (const int) +0:27 Constant: +0:27 0 (const int) 0:28 Sequence 0:28 move second child to first child (int) 0:28 'h000' (int) -0:28 0 (const int) +0:28 Constant: +0:28 0 (const int) 0:29 Sequence 0:29 move second child to first child (int) 0:29 'h1' (int) -0:29 1 (const int) +0:29 Constant: +0:29 1 (const int) 0:30 Sequence 0:30 move second child to first child (int) 0:30 'h2' (int) -0:30 2 (const int) +0:30 Constant: +0:30 2 (const int) 0:31 Sequence 0:31 move second child to first child (int) 0:31 'h300' (int) -0:31 768 (const int) +0:31 Constant: +0:31 768 (const int) 0:32 Sequence 0:32 move second child to first child (int) 0:32 'hABCDEF' (int) -0:32 11259375 (const int) +0:32 Constant: +0:32 11259375 (const int) 0:33 Sequence 0:33 move second child to first child (int) 0:33 'hFFFFFFFF' (int) -0:33 -1 (const int) +0:33 Constant: +0:33 -1 (const int) 0:34 Sequence 0:34 move second child to first child (int) 0:34 'h12345678' (int) -0:34 12345678 (const int) +0:34 Constant: +0:34 12345678 (const int) 0:35 Sequence 0:35 move second child to first child (int) 0:35 'hToBeOrNotToBe' (int) -0:35 -1 (const int) +0:35 Constant: +0:35 -1 (const int) 0:37 Sequence 0:37 move second child to first child (uint) 0:37 'uh0' (uint) -0:37 0 (const uint) +0:37 Constant: +0:37 0 (const uint) 0:38 Sequence 0:38 move second child to first child (uint) 0:38 'uhg' (uint) -0:38 12 (const uint) +0:38 Constant: +0:38 12 (const uint) 0:39 Sequence 0:39 move second child to first child (uint) 0:39 'uh000' (uint) -0:39 0 (const uint) +0:39 Constant: +0:39 0 (const uint) 0:40 Sequence 0:40 move second child to first child (uint) 0:40 'uh1' (uint) -0:40 1 (const uint) +0:40 Constant: +0:40 1 (const uint) 0:41 Sequence 0:41 move second child to first child (uint) 0:41 'uh2' (uint) -0:41 2 (const uint) +0:41 Constant: +0:41 2 (const uint) 0:42 Sequence 0:42 move second child to first child (uint) 0:42 'uh300' (uint) -0:42 768 (const uint) +0:42 Constant: +0:42 768 (const uint) 0:43 Sequence 0:43 move second child to first child (uint) 0:43 'uhABCDEF' (uint) -0:43 11259375 (const uint) +0:43 Constant: +0:43 11259375 (const uint) 0:44 Sequence 0:44 move second child to first child (uint) 0:44 'uhFFFFFFFF' (uint) -0:44 4294967295 (const uint) +0:44 Constant: +0:44 4294967295 (const uint) 0:45 Sequence 0:45 move second child to first child (uint) 0:45 'uh12345678' (uint) -0:45 12345678 (const uint) +0:45 Constant: +0:45 12345678 (const uint) 0:46 Sequence 0:46 move second child to first child (uint) 0:46 'uhToBeOrNotToBe' (uint) -0:46 4294967295 (const uint) +0:46 Constant: +0:46 4294967295 (const uint) 0:49 Sequence 0:49 move second child to first child (int) 0:49 'he2' (int) -0:49 0 (const int) +0:49 Constant: +0:49 0 (const int) 0:50 Sequence 0:50 move second child to first child (int) 0:50 'hbig' (int) -0:50 -1 (const int) +0:50 Constant: +0:50 -1 (const int) 0:52 Sequence 0:52 move second child to first child (float) 0:52 'f1' (float) -0:52 1.000000 +0:52 Constant: +0:52 1.000000 0:53 Sequence 0:53 move second child to first child (float) 0:53 'f2' (float) -0:53 2.000000 +0:53 Constant: +0:53 2.000000 0:54 Sequence 0:54 move second child to first child (float) 0:54 'f3' (float) -0:54 3.000000 +0:54 Constant: +0:54 3.000000 0:55 Sequence 0:55 move second child to first child (float) 0:55 'f4' (float) -0:55 4.000000 +0:55 Constant: +0:55 4.000000 0:56 Sequence 0:56 move second child to first child (float) 0:56 'f5' (float) -0:56 5.000000 +0:56 Constant: +0:56 5.000000 0:57 Sequence 0:57 move second child to first child (float) 0:57 'f6' (float) -0:57 6.000000 +0:57 Constant: +0:57 6.000000 0:58 Sequence 0:58 move second child to first child (float) 0:58 'f7' (float) -0:58 7.000000 +0:58 Constant: +0:58 7.000000 0:59 Sequence 0:59 move second child to first child (float) 0:59 'f8' (float) -0:59 8.000000 +0:59 Constant: +0:59 8.000000 0:60 Sequence 0:60 move second child to first child (float) 0:60 'f9' (float) -0:60 9.000000 +0:60 Constant: +0:60 9.000000 0:61 Sequence 0:61 move second child to first child (float) 0:61 'f10' (float) -0:61 10.000000 +0:61 Constant: +0:61 10.000000 0:62 Sequence 0:62 move second child to first child (float) 0:62 'f11' (float) -0:62 11.000000 +0:62 Constant: +0:62 11.000000 0:63 Sequence 0:63 move second child to first child (float) 0:63 'f12' (float) -0:63 12.000000 +0:63 Constant: +0:63 12.000000 0:64 Sequence 0:64 move second child to first child (float) 0:64 'f543' (float) -0:64 543.000000 +0:64 Constant: +0:64 543.000000 0:65 Sequence 0:65 move second child to first child (float) 0:65 'f6789' (float) -0:65 6789.000000 +0:65 Constant: +0:65 6789.000000 0:66 Sequence 0:66 move second child to first child (float) 0:66 'f88' (float) -0:66 88.000000 +0:66 Constant: +0:66 88.000000 0:68 Sequence 0:68 move second child to first child (float) 0:68 'g1' (float) -0:68 53876.000000 +0:68 Constant: +0:68 53876.000000 0:69 Sequence 0:69 move second child to first child (float) 0:69 'g2' (float) -0:69 0.040000 +0:69 Constant: +0:69 0.040000 0:70 Sequence 0:70 move second child to first child (float) 0:70 'g3' (float) -0:70 100000.000000 +0:70 Constant: +0:70 100000.000000 0:71 Sequence 0:71 move second child to first child (float) 0:71 'g4' (float) -0:71 0.007321 +0:71 Constant: +0:71 0.007321 0:72 Sequence 0:72 move second child to first child (float) 0:72 'g5' (float) -0:72 32000.000000 +0:72 Constant: +0:72 32000.000000 0:73 Sequence 0:73 move second child to first child (float) 0:73 'g6' (float) -0:73 0.000005 +0:73 Constant: +0:73 0.000005 0:74 Sequence 0:74 move second child to first child (float) 0:74 'g7' (float) -0:74 0.450000 +0:74 Constant: +0:74 0.450000 0:75 Sequence 0:75 move second child to first child (float) 0:75 'g8' (float) -0:75 60000000000.000000 +0:75 Constant: +0:75 60000000000.000000 0:77 Sequence 0:77 move second child to first child (double) 0:77 'gf1' (double) -0:77 1.000000 +0:77 Constant: +0:77 1.000000 0:78 Sequence 0:78 move second child to first child (double) 0:78 'gf2' (double) -0:78 2.000000 +0:78 Constant: +0:78 2.000000 0:79 Sequence 0:79 move second child to first child (double) 0:79 'gf3' (double) -0:79 3.000000 +0:79 Constant: +0:79 3.000000 0:80 Sequence 0:80 move second child to first child (double) 0:80 'gf4' (double) -0:80 4.000000 +0:80 Constant: +0:80 4.000000 0:81 Sequence 0:81 move second child to first child (float) 0:81 'gf5' (float) -0:81 5.000000 +0:81 Constant: +0:81 5.000000 0:82 Sequence 0:82 move second child to first child (float) 0:82 'gf6' (float) -0:82 6.000000 +0:82 Constant: +0:82 6.000000 0:88 Sequence 0:88 move second child to first child (float) 0:88 'e5' (float) -0:88 5.000000 +0:88 Constant: +0:88 5.000000 0:? Linker Objects 0:? 'c2' (layout(location=2 ) out 4-component vector of float) 0:? 'c3' (layout(location=3 ) out 4-component vector of float) diff --git a/Test/baseResults/pointCoord.frag.out b/Test/baseResults/pointCoord.frag.out index 94cef16..ed4fe56 100644 --- a/Test/baseResults/pointCoord.frag.out +++ b/Test/baseResults/pointCoord.frag.out @@ -8,7 +8,8 @@ WARNING: #version: statement missing; use #version on first line of shader 0:9 Compare Less Than (bool) 0:9 length (mediump float) 0:9 'gl_PointCoord' (gl_PointCoord mediump 2-component vector of float) -0:9 0.300000 +0:9 Constant: +0:9 0.300000 0:9 true case 0:10 move second child to first child (highp 4-component vector of float) 0:10 'color' (highp 4-component vector of float) @@ -18,10 +19,11 @@ WARNING: #version: statement missing; use #version on first line of shader 0:9 false case 0:12 move second child to first child (highp 4-component vector of float) 0:12 'color' (highp 4-component vector of float) -0:12 0.000000 -0:12 0.000000 -0:12 0.000000 -0:12 0.000000 +0:12 Constant: +0:12 0.000000 +0:12 0.000000 +0:12 0.000000 +0:12 0.000000 0:14 move second child to first child (highp 4-component vector of float) 0:14 'gl_FragColor' (fragColor mediump 4-component vector of float) 0:14 'color' (highp 4-component vector of float) diff --git a/Test/baseResults/precision.frag.out b/Test/baseResults/precision.frag.out index 38d1a20..59e30e2 100644 --- a/Test/baseResults/precision.frag.out +++ b/Test/baseResults/precision.frag.out @@ -16,8 +16,10 @@ ERROR: node is still EOpNull! 0:8 vector swizzle (highp 2-component vector of float) 0:8 'hv4' (highp 4-component vector of float) 0:8 Sequence -0:8 0 (const int) -0:8 1 (const int) +0:8 Constant: +0:8 0 (const int) +0:8 Constant: +0:8 1 (const int) 0:25 Function Definition: main( (void) 0:25 Function Parameters: 0:27 Sequence @@ -31,7 +33,8 @@ ERROR: node is still EOpNull! 0:29 'gl_FragColor' (fragColor mediump 4-component vector of float) 0:29 Construct vec4 (mediump 4-component vector of float) 0:29 'color' (smooth in mediump 3-component vector of float) -0:29 1.000000 +0:29 Constant: +0:29 1.000000 0:32 add second child into first child (highp int) 0:32 'sum' (lowp int) 0:32 'level1_high' (highp int) @@ -53,12 +56,14 @@ ERROR: node is still EOpNull! 0:49 'level2_high' (highp int) 0:58 Loop with condition not tested first 0:58 Loop Condition -0:58 true (const bool) +0:58 Constant: +0:58 true (const bool) 0:58 Loop Body 0:51 Sequence 0:51 Test condition and select (void) 0:51 Condition -0:51 true (const bool) +0:51 Constant: +0:51 true (const bool) 0:51 true case 0:? Sequence 0:54 add second child into first child (mediump int) @@ -76,7 +81,8 @@ ERROR: node is still EOpNull! 0:65 add second child into first child (lowp int) 0:65 'sum' (lowp int) 0:65 add (lowp int) -0:65 4 (const int) +0:65 Constant: +0:65 4 (const int) 0:65 direct index (lowp int) 0:65 add (lowp 2-component vector of int) 0:65 component-wise multiply (lowp 2-component vector of int) @@ -88,19 +94,23 @@ ERROR: node is still EOpNull! 0:65 Comma (highp int) 0:65 'level1_low3' (lowp int) 0:65 'level1_high' (highp int) -0:65 0 (const int) +0:65 Constant: +0:65 0 (const int) 0:67 Function Call: texture2D(s21;vf2; (lowp 4-component vector of float) 0:67 'samplerLow' (uniform lowp sampler2D) -0:67 0.100000 -0:67 0.200000 +0:67 Constant: +0:67 0.100000 +0:67 0.200000 0:68 Function Call: texture2D(s21;vf2; (mediump 4-component vector of float) 0:68 'samplerMed' (uniform mediump sampler2D) -0:68 0.100000 -0:68 0.200000 +0:68 Constant: +0:68 0.100000 +0:68 0.200000 0:69 Function Call: texture2D(s21;vf2; (highp 4-component vector of float) 0:69 'samplerHigh' (uniform highp sampler2D) -0:69 0.100000 -0:69 0.200000 +0:69 Constant: +0:69 0.100000 +0:69 0.200000 0:? Linker Objects 0:? 'color' (smooth in mediump 3-component vector of float) 0:? 'global_medium' (mediump int) diff --git a/Test/baseResults/precision.vert.out b/Test/baseResults/precision.vert.out index ed13267..8024291 100644 --- a/Test/baseResults/precision.vert.out +++ b/Test/baseResults/precision.vert.out @@ -12,22 +12,25 @@ ERROR: node is still EOpNull! 0:20 't' (highp 4-component vector of float) 0:20 Function Call: texture(s21;vf2; (highp 4-component vector of float) 0:20 's2D' (uniform lowp sampler2D) -0:20 0.100000 -0:20 0.200000 +0:20 Constant: +0:20 0.100000 +0:20 0.200000 0:21 add second child into first child (highp 4-component vector of float) 0:21 't' (highp 4-component vector of float) 0:21 Function Call: texture(s21;vf2; (highp 4-component vector of float) 0:21 's2Dhigh' (uniform highp sampler2D) -0:21 0.100000 -0:21 0.200000 +0:21 Constant: +0:21 0.100000 +0:21 0.200000 0:22 add second child into first child (highp 4-component vector of float) 0:22 't' (highp 4-component vector of float) 0:22 Function Call: texture(sAS21;vf4; (highp float) 0:22 's2dAS' (uniform mediump sampler2DArrayShadow) -0:22 0.500000 -0:22 0.500000 -0:22 0.500000 -0:22 0.500000 +0:22 Constant: +0:22 0.500000 +0:22 0.500000 +0:22 0.500000 +0:22 0.500000 0:24 move second child to first child (highp 4-component vector of float) 0:24 'gl_Position' (gl_Position highp 4-component vector of float) 0:24 'pos' (in highp 4-component vector of float) diff --git a/Test/baseResults/prepost.frag.out b/Test/baseResults/prepost.frag.out index f322cc7..337117d 100644 --- a/Test/baseResults/prepost.frag.out +++ b/Test/baseResults/prepost.frag.out @@ -5,29 +5,36 @@ 0:10 Sequence 0:10 move second child to first child (int) 0:10 'index' (int) -0:10 5 (const int) +0:10 Constant: +0:10 5 (const int) 0:12 move second child to first child (float) 0:12 direct index (float) 0:12 y: direct index for structure (5-element array of float) 0:12 'str' (structure) -0:12 0 (const int) -0:12 4 (const int) -0:12 2.000000 +0:12 Constant: +0:12 0 (const int) +0:12 Constant: +0:12 4 (const int) +0:12 Constant: +0:12 2.000000 0:13 move second child to first child (float) 0:13 't' (float) 0:13 Pre-Increment (float) 0:13 indirect index (float) 0:13 y: direct index for structure (5-element array of float) 0:13 'str' (structure) -0:13 0 (const int) +0:13 Constant: +0:13 0 (const int) 0:13 Pre-Decrement (int) 0:13 'index' (int) 0:14 add second child into first child (float) 0:14 direct index (float) 0:14 y: direct index for structure (5-element array of float) 0:14 'str' (structure) -0:14 0 (const int) -0:14 4 (const int) +0:14 Constant: +0:14 0 (const int) +0:14 Constant: +0:14 4 (const int) 0:14 't' (float) 0:15 move second child to first child (float) 0:15 't' (float) @@ -35,13 +42,16 @@ 0:15 direct index (float) 0:15 y: direct index for structure (5-element array of float) 0:15 'str' (structure) -0:15 0 (const int) -0:15 4 (const int) +0:15 Constant: +0:15 0 (const int) +0:15 Constant: +0:15 4 (const int) 0:16 add second child into first child (float) 0:16 indirect index (float) 0:16 y: direct index for structure (5-element array of float) 0:16 'str' (structure) -0:16 0 (const int) +0:16 Constant: +0:16 0 (const int) 0:16 Post-Increment (int) 0:16 'index' (int) 0:16 't' (float) @@ -49,7 +59,8 @@ 0:17 indirect index (float) 0:17 y: direct index for structure (5-element array of float) 0:17 'str' (structure) -0:17 0 (const int) +0:17 Constant: +0:17 0 (const int) 0:17 Pre-Decrement (int) 0:17 'index' (int) 0:19 Sequence @@ -58,8 +69,10 @@ 0:19 direct index (float) 0:19 y: direct index for structure (5-element array of float) 0:19 'str' (structure) -0:19 0 (const int) -0:19 4 (const int) +0:19 Constant: +0:19 0 (const int) +0:19 Constant: +0:19 4 (const int) 0:20 Pre-Increment (float) 0:20 'x' (float) 0:21 Pre-Decrement (float) @@ -85,26 +98,31 @@ 0:33 Sequence 0:33 move second child to first child (4-component vector of float) 0:33 'v' (4-component vector of float) -0:33 1.000000 -0:33 2.000000 -0:33 3.000000 -0:33 4.000000 +0:33 Constant: +0:33 1.000000 +0:33 2.000000 +0:33 3.000000 +0:33 4.000000 0:34 move second child to first child (float) 0:34 direct index (float) 0:34 'v' (4-component vector of float) -0:34 1 (const int) +0:34 Constant: +0:34 1 (const int) 0:34 Post-Decrement (float) 0:34 direct index (float) 0:34 'v' (4-component vector of float) -0:34 2 (const int) +0:34 Constant: +0:34 2 (const int) 0:35 move second child to first child (float) 0:35 direct index (float) 0:35 'v' (4-component vector of float) -0:35 0 (const int) +0:35 Constant: +0:35 0 (const int) 0:35 Pre-Decrement (float) 0:35 direct index (float) 0:35 'v' (4-component vector of float) -0:35 3 (const int) +0:35 Constant: +0:35 3 (const int) 0:37 move second child to first child (4-component vector of float) 0:37 'gl_FragColor' (fragColor 4-component vector of float) 0:37 vector-scale (4-component vector of float) diff --git a/Test/baseResults/sample.frag.out b/Test/baseResults/sample.frag.out index 0b5f302..0e85f8e 100644 --- a/Test/baseResults/sample.frag.out +++ b/Test/baseResults/sample.frag.out @@ -6,7 +6,8 @@ 0:40 'gl_FragColor' (fragColor 4-component vector of float) 0:40 Construct vec4 (4-component vector of float) 0:40 'color' (smooth in 3-component vector of float) -0:40 1.000000 +0:40 Constant: +0:40 1.000000 0:? Linker Objects 0:? 'color' (smooth in 3-component vector of float) diff --git a/Test/baseResults/sample.vert.out b/Test/baseResults/sample.vert.out index 34628e3..e7942be 100644 --- a/Test/baseResults/sample.vert.out +++ b/Test/baseResults/sample.vert.out @@ -4,9 +4,10 @@ 0:40 Sequence 0:40 move second child to first child (3-component vector of float) 0:40 'color' (smooth out 3-component vector of float) -0:40 1.000000 -0:40 1.000000 -0:40 1.000000 +0:40 Constant: +0:40 1.000000 +0:40 1.000000 +0:40 1.000000 0:42 move second child to first child (4-component vector of float) 0:42 'gl_Position' (gl_Position 4-component vector of float) 0:42 matrix-times-vector (4-component vector of float) diff --git a/Test/baseResults/specExamples.frag.out b/Test/baseResults/specExamples.frag.out index c776306..d0f248c 100644 --- a/Test/baseResults/specExamples.frag.out +++ b/Test/baseResults/specExamples.frag.out @@ -59,71 +59,79 @@ ERROR: node is still EOpNull! 0:5 Sequence 0:5 move second child to first child (int) 0:5 'a' (int) -0:5 -1 (const int) +0:5 Constant: +0:5 -1 (const int) 0:7 Sequence 0:7 move second child to first child (uint) 0:7 'c' (uint) -0:7 4294967295 (const uint) +0:7 Constant: +0:7 4294967295 (const uint) 0:8 Sequence 0:8 move second child to first child (uint) 0:8 'd' (uint) -0:8 4294967295 (const uint) +0:8 Constant: +0:8 4294967295 (const uint) 0:9 Sequence 0:9 move second child to first child (int) 0:9 'e' (int) -0:9 -1 (const int) +0:9 Constant: +0:9 -1 (const int) 0:13 Sequence 0:13 move second child to first child (uint) 0:13 'f' (uint) -0:13 4294967295 (const uint) +0:13 Constant: +0:13 4294967295 (const uint) 0:17 Sequence 0:17 move second child to first child (int) 0:17 'g' (int) -0:17 -1294967296 (const int) +0:17 Constant: +0:17 -1294967296 (const int) 0:19 Sequence 0:19 move second child to first child (int) 0:19 'h' (int) -0:19 -1610612736 (const int) +0:19 Constant: +0:19 -1610612736 (const int) 0:20 Sequence 0:20 move second child to first child (int) 0:20 'i' (int) -0:20 -1 (const int) +0:20 Constant: +0:20 -1 (const int) 0:21 Sequence 0:21 move second child to first child (int) 0:21 'j' (int) -0:21 -1 (const int) +0:21 Constant: +0:21 -1 (const int) 0:22 Sequence 0:22 move second child to first child (int) 0:22 'k' (int) -0:22 -2147483648 (const int) +0:22 Constant: +0:22 -2147483648 (const int) 0:23 Sequence 0:23 move second child to first child (int) 0:23 'l' (int) -0:23 -2147483648 (const int) +0:23 Constant: +0:23 -2147483648 (const int) 0:25 Sequence 0:25 move second child to first child (float) 0:25 'fb' (float) -0:25 1.500000 +0:25 Constant: +0:25 1.500000 0:26 Sequence 0:26 move second child to first child (double) 0:26 'fd' (double) -0:26 2.000000 -0:69 Sequence -0:69 move second child to first child (3-component vector of float) -0:69 'color' (uniform 3-component vector of float) -0:69 0.700000 -0:69 0.700000 -0:69 0.200000 +0:26 Constant: +0:26 2.000000 0:127 Function Definition: foo(f1[5]; (5-element array of float) 0:127 Function Parameters: 0:127 '' (in 5-element array of float) 0:129 Sequence 0:129 Branch: Return with expression -0:129 3.400000 -0:129 4.200000 -0:129 5.000000 -0:129 5.200000 -0:129 1.100000 +0:129 Constant: +0:129 3.400000 +0:129 4.200000 +0:129 5.000000 +0:129 5.200000 +0:129 1.100000 0:137 Function Definition: main( (void) 0:137 Function Parameters: 0:140 Sequence @@ -131,32 +139,35 @@ ERROR: node is still EOpNull! 0:140 Sequence 0:140 move second child to first child (5-element array of float) 0:140 'a' (5-element array of float) -0:140 3.400000 -0:140 4.200000 -0:140 5.000000 -0:140 5.200000 -0:140 1.100000 +0:140 Constant: +0:140 3.400000 +0:140 4.200000 +0:140 5.000000 +0:140 5.200000 +0:140 1.100000 0:143 Sequence 0:143 Sequence 0:143 move second child to first child (5-element array of float) 0:143 'a' (5-element array of float) -0:143 3.400000 -0:143 4.200000 -0:143 5.000000 -0:143 5.200000 -0:143 1.100000 +0:143 Constant: +0:143 3.400000 +0:143 4.200000 +0:143 5.000000 +0:143 5.200000 +0:143 1.100000 0:? Sequence 0:149 Sequence 0:149 move second child to first child (2-element array of 4-component vector of float) 0:149 'b' (2-element array of 4-component vector of float) -0:149 0.000000 -0:149 0.000000 -0:149 0.000000 -0:149 0.000000 -0:149 0.100000 -0:149 0.100000 -0:149 0.100000 -0:149 0.100000 +0:149 Constant: +0:149 0.000000 +0:149 0.000000 +0:149 0.000000 +0:149 0.000000 +0:149 0.100000 +0:149 0.100000 +0:149 0.100000 +0:149 0.100000 0:150 Sequence 0:150 move second child to first child (3-element array of 4-component vector of float) 0:150 'a3' (3-element array of 4-component vector of float) @@ -176,26 +187,33 @@ ERROR: node is still EOpNull! 0:165 Sequence 0:165 move second child to first child (5-element array of float) 0:165 'b' (5-element array of float) -0:165 1.000000 -0:165 2.000000 -0:165 3.000000 -0:165 4.000000 -0:165 5.000000 -0:167 5 (const int) +0:165 Constant: +0:165 1.000000 +0:165 2.000000 +0:165 3.000000 +0:165 4.000000 +0:165 5.000000 +0:167 Constant: +0:167 5 (const int) 0:? Sequence -0:171 3 (const int) -0:172 0.000000 -0:175 0.000000 -0:178 0.000000 +0:171 Constant: +0:171 3 (const int) +0:172 Constant: +0:172 0.000000 +0:175 Constant: +0:175 0.000000 +0:178 Constant: +0:178 0.000000 0:216 Sequence 0:216 Sequence 0:216 move second child to first child (5-element array of float) 0:216 'a' (5-element array of float) -0:216 3.400000 -0:216 4.200000 -0:216 5.000000 -0:216 5.200000 -0:216 1.100000 +0:216 Constant: +0:216 3.400000 +0:216 4.200000 +0:216 5.000000 +0:216 5.200000 +0:216 1.100000 0:218 Sequence 0:218 move second child to first child (5-element array of float) 0:218 'c' (5-element array of float) @@ -235,6 +253,7 @@ ERROR: node is still EOpNull! 0:? 'lightPosition' (uniform 4-element array of 4-component vector of float) 0:? 'lights' (2-element array of structure) 0:? 'numLights' (const int) +0:? 2 (const int) 0:? 'normal' (smooth in 3-component vector of float) 0:? 'TexCoord' (centroid smooth in 2-component vector of float) 0:? 'Color' (invariant centroid smooth in 4-component vector of float) @@ -242,6 +261,9 @@ ERROR: node is still EOpNull! 0:? 'myColor' (flat in 3-component vector of float) 0:? 'myTexCoord' (centroid noperspective in 2-component vector of float) 0:? 'color' (uniform 3-component vector of float) +0:? 0.700000 +0:? 0.700000 +0:? 0.200000 0:? 'gl_FragCoord' (gl_FragCoord 4-component vector of float) 0:? 'factor' (layout(location=3 ) out 4-component vector of float) 0:? 'colors' (layout(location=2 ) out 3-element array of 4-component vector of float) diff --git a/Test/baseResults/specExamples.vert.out b/Test/baseResults/specExamples.vert.out index 3b9733a..c1b7c96 100644 --- a/Test/baseResults/specExamples.vert.out +++ b/Test/baseResults/specExamples.vert.out @@ -132,57 +132,72 @@ ERROR: node is still EOpNull! 0:162 vector swizzle (3-component vector of float) 0:162 'v' (smooth out 4-component vector of float) 0:162 Sequence -0:162 0 (const int) -0:162 1 (const int) -0:162 2 (const int) +0:162 Constant: +0:162 0 (const int) +0:162 Constant: +0:162 1 (const int) +0:162 Constant: +0:162 2 (const int) 0:162 add (3-component vector of float) 0:162 'r' (3-component vector of float) 0:162 's' (3-component vector of float) 0:163 move second child to first child (float) 0:163 direct index (float) 0:163 'v' (smooth out 4-component vector of float) -0:163 3 (const int) +0:163 Constant: +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 'b' (in 4-component vector of float) -0:163 3 (const int) +0:163 Constant: +0:163 3 (const int) 0:163 component-wise multiply (float) 0:163 direct index (float) 0:163 'c' (in 4-component vector of float) -0:163 3 (const int) +0:163 Constant: +0:163 3 (const int) 0:163 direct index (float) 0:163 'd' (in 4-component vector of float) -0:163 3 (const int) +0:163 Constant: +0:163 3 (const int) 0:164 move second child to first child (float) 0:164 direct index (float) 0:164 'v' (smooth out 4-component vector of float) -0:164 0 (const int) -0:164 0.000000 +0:164 Constant: +0:164 0 (const int) +0:164 Constant: +0:164 0.000000 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 0 (const int) -0:166 0.000000 +0:166 Constant: +0:166 0 (const int) +0:166 Constant: +0:166 0.000000 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 'b' (in 4-component vector of float) -0:167 0 (const int) +0:167 Constant: +0:167 0 (const int) 0:167 component-wise multiply (float) 0:167 direct index (float) 0:167 'c' (in 4-component vector of float) -0:167 0 (const int) +0:167 Constant: +0:167 0 (const int) 0:167 direct index (float) 0:167 'd' (in 4-component vector of float) -0:167 0 (const int) +0:167 Constant: +0:167 0 (const int) 0:167 direct index (float) 0:167 'v' (smooth out 4-component vector of float) -0:167 0 (const int) +0:167 Constant: +0:167 0 (const int) 0:169 Function Call: funcA(I21; (4-component vector of float) 0:169 'img1' (uniform image2D) 0:170 Function Call: funcB(I21; (4-component vector of float) @@ -191,19 +206,22 @@ ERROR: node is still EOpNull! 0:178 Sequence 0:178 move second child to first child (structure) 0:178 'lightVar' (structure) -0:178 3.000000 -0:178 1.000000 -0:178 2.000000 -0:178 3.000000 +0:178 Constant: +0:178 3.000000 +0:178 1.000000 +0:178 2.000000 +0:178 3.000000 0:? Sequence 0:185 Sequence 0:185 move second child to first child (5-element array of float) 0:185 'a' (5-element array of float) 0:185 Construct float (5-element array of float) 0:185 'g' (float) -0:185 1.000000 +0:185 Constant: +0:185 1.000000 0:185 'g' (float) -0:185 2.300000 +0:185 Constant: +0:185 2.300000 0:185 'g' (float) 0:188 move second child to first child (3-element array of float) 0:188 'b' (3-element array of float) @@ -211,10 +229,12 @@ ERROR: node is still EOpNull! 0:188 'g' (float) 0:188 add (float) 0:188 'g' (float) -0:188 1.000000 +0:188 Constant: +0:188 1.000000 0:188 add (float) 0:188 'g' (float) -0:188 2.000000 +0:188 Constant: +0:188 2.000000 0:? Sequence 0:192 Construct vec4 (3-element array of 4-component vector of float) 0:193 Construct vec4 (3-element array of 4-component vector of float) diff --git a/Test/baseResults/structAssignment.frag.out b/Test/baseResults/structAssignment.frag.out index 2eb679a..9ca8325 100644 --- a/Test/baseResults/structAssignment.frag.out +++ b/Test/baseResults/structAssignment.frag.out @@ -9,15 +9,19 @@ WARNING: 0:4: varying deprecated in version 130; may be removed in future releas 0:33 i: direct index for structure (int) 0:33 s2_1: direct index for structure (structure) 0:33 'foo3' (uniform structure) +0:33 Constant: +0:33 0 (const int) +0:33 Constant: 0:33 0 (const int) +0:33 Constant: 0:33 0 (const int) -0:33 0 (const int) 0:33 true case 0:34 move second child to first child (structure) 0:34 'locals2' (structure) 0:34 s2_1: direct index for structure (structure) 0:34 'foo3' (uniform structure) -0:34 0 (const int) +0:34 Constant: +0:34 0 (const int) 0:33 false case 0:36 move second child to first child (structure) 0:36 'locals2' (structure) @@ -28,8 +32,10 @@ WARNING: 0:4: varying deprecated in version 130; may be removed in future releas 0:38 f: direct index for structure (float) 0:38 s1_1: direct index for structure (structure) 0:38 'locals2' (structure) -0:38 2 (const int) -0:38 1 (const int) +0:38 Constant: +0:38 2 (const int) +0:38 Constant: +0:38 1 (const int) 0:38 Function Call: texture2D(s21;vf2; (4-component vector of float) 0:38 'sampler' (uniform sampler2D) 0:38 'coord' (smooth in 2-component vector of float) diff --git a/Test/baseResults/structDeref.frag.out b/Test/baseResults/structDeref.frag.out index 453ebcc..a4d4c33 100644 --- a/Test/baseResults/structDeref.frag.out +++ b/Test/baseResults/structDeref.frag.out @@ -10,82 +10,103 @@ WARNING: 0:4: varying deprecated in version 130; may be removed in future releas 0:51 direct index (structure) 0:51 s2_1: direct index for structure (12-element array of structure) 0:51 'foo3' (uniform structure) -0:51 0 (const int) -0:51 9 (const int) +0:51 Constant: +0:51 0 (const int) +0:51 Constant: +0:51 9 (const int) +0:51 Constant: +0:51 0 (const int) +0:51 Constant: 0:51 0 (const int) -0:51 0 (const int) 0:51 true case 0:52 Sequence 0:52 move second child to first child (float) 0:52 f: direct index for structure (float) 0:52 'locals2' (structure) -0:52 1 (const int) -0:52 1.000000 +0:52 Constant: +0:52 1 (const int) +0:52 Constant: +0:52 1.000000 0:53 move second child to first child (structure) 0:53 s1_1: direct index for structure (structure) 0:53 'locals2' (structure) -0:53 2 (const int) -0:53 0 (const int) -0:53 1.000000 -0:53 0 (const int) +0:53 Constant: +0:53 2 (const int) +0:53 Constant: +0:53 0 (const int) +0:53 1.000000 +0:53 0 (const int) 0:54 move second child to first child (6-element array of float) 0:54 'fArray' (6-element array of float) -0:54 0.000000 -0:54 0.000000 -0:54 0.000000 -0:54 0.000000 -0:54 0.000000 -0:54 0.000000 +0:54 Constant: +0:54 0.000000 +0:54 0.000000 +0:54 0.000000 +0:54 0.000000 +0:54 0.000000 +0:54 0.000000 0:55 move second child to first child (structure) 0:55 direct index (structure) 0:55 'locals1Array' (10-element array of structure) -0:55 6 (const int) +0:55 Constant: +0:55 6 (const int) 0:55 'foo1' (uniform structure) 0:56 move second child to first child (structure) 0:56 'locals0' (structure) -0:56 0 (const int) +0:56 Constant: +0:56 0 (const int) 0:57 move second child to first child (structure) 0:57 'locals00' (structure) -0:57 0 (const int) +0:57 Constant: +0:57 0 (const int) 0:51 false case 0:59 Sequence 0:59 move second child to first child (float) 0:59 f: direct index for structure (float) 0:59 'locals2' (structure) -0:59 1 (const int) +0:59 Constant: +0:59 1 (const int) 0:59 direct index (float) 0:59 'coord' (smooth in 2-component vector of float) -0:59 0 (const int) +0:59 Constant: +0:59 0 (const int) 0:60 move second child to first child (structure) 0:60 s1_1: direct index for structure (structure) 0:60 'locals2' (structure) -0:60 2 (const int) +0:60 Constant: +0:60 2 (const int) 0:60 Construct structure (structure) -0:60 1 (const int) +0:60 Constant: +0:60 1 (const int) 0:60 direct index (float) 0:60 'coord' (smooth in 2-component vector of float) -0:60 1 (const int) +0:60 Constant: +0:60 1 (const int) 0:60 'foo0' (uniform structure) 0:61 move second child to first child (6-element array of float) 0:61 'fArray' (6-element array of float) -0:61 0.000000 -0:61 1.000000 -0:61 2.000000 -0:61 3.000000 -0:61 4.000000 -0:61 5.000000 +0:61 Constant: +0:61 0.000000 +0:61 1.000000 +0:61 2.000000 +0:61 3.000000 +0:61 4.000000 +0:61 5.000000 0:62 move second child to first child (structure) 0:62 direct index (structure) 0:62 'locals1Array' (10-element array of structure) -0:62 6 (const int) +0:62 Constant: +0:62 6 (const int) 0:62 s1_1: direct index for structure (structure) 0:62 'locals2' (structure) -0:62 2 (const int) +0:62 Constant: +0:62 2 (const int) 0:63 move second child to first child (structure) 0:63 'locals0' (structure) 0:63 s0_1: direct index for structure (structure) 0:63 'foo1' (uniform structure) -0:63 2 (const int) +0:63 Constant: +0:63 2 (const int) 0:64 move second child to first child (structure) 0:64 'locals00' (structure) 0:64 'foo00' (uniform structure) @@ -94,14 +115,17 @@ WARNING: 0:4: varying deprecated in version 130; may be removed in future releas 0:67 Compare Greater Than (bool) 0:67 i: direct index for structure (int) 0:67 'locals0' (structure) -0:67 0 (const int) -0:67 5 (const int) +0:67 Constant: +0:67 0 (const int) +0:67 Constant: +0:67 5 (const int) 0:67 true case 0:68 move second child to first child (structure) 0:68 'locals0' (structure) 0:68 s0_0: direct index for structure (structure) 0:68 'locals00' (structure) -0:68 0 (const int) +0:68 Constant: +0:68 0 (const int) 0:70 move second child to first child (4-component vector of float) 0:70 'gl_FragColor' (fragColor 4-component vector of float) 0:70 vector-scale (4-component vector of float) @@ -111,20 +135,26 @@ WARNING: 0:4: varying deprecated in version 130; may be removed in future releas 0:70 Convert int to float (float) 0:70 i: direct index for structure (int) 0:70 'locals0' (structure) -0:70 0 (const int) +0:70 Constant: +0:70 0 (const int) 0:70 f: direct index for structure (float) 0:70 direct index (structure) 0:70 'locals1Array' (10-element array of structure) -0:70 6 (const int) -0:70 1 (const int) +0:70 Constant: +0:70 6 (const int) +0:70 Constant: +0:70 1 (const int) 0:70 direct index (float) 0:70 'fArray' (6-element array of float) -0:70 3 (const int) +0:70 Constant: +0:70 3 (const int) 0:70 f: direct index for structure (float) 0:70 s1_1: direct index for structure (structure) 0:70 'locals2' (structure) -0:70 2 (const int) -0:70 1 (const int) +0:70 Constant: +0:70 2 (const int) +0:70 Constant: +0:70 1 (const int) 0:70 Function Call: texture2D(s21;vf2; (4-component vector of float) 0:70 'sampler' (uniform sampler2D) 0:70 'coord' (smooth in 2-component vector of float) diff --git a/Test/baseResults/structure.frag.out b/Test/baseResults/structure.frag.out index 9d03594..f05893d 100644 --- a/Test/baseResults/structure.frag.out +++ b/Test/baseResults/structure.frag.out @@ -6,7 +6,8 @@ WARNING: 0:3: varying deprecated in version 130; may be removed in future releas 0:22 Sequence 0:22 move second child to first child (float) 0:22 'scale' (float) -0:22 0.000000 +0:22 Constant: +0:22 0.000000 0:24 Test condition and select (void) 0:24 Condition 0:24 Compare Greater Than (bool) @@ -14,10 +15,14 @@ WARNING: 0:3: varying deprecated in version 130; may be removed in future releas 0:24 i: direct index for structure (5-element array of int) 0:24 direct index (uniform structure) 0:24 'foo2' (uniform 5-element array of structure) -0:24 3 (const int) -0:24 0 (const int) -0:24 4 (const int) -0:24 0 (const int) +0:24 Constant: +0:24 3 (const int) +0:24 Constant: +0:24 0 (const int) +0:24 Constant: +0:24 4 (const int) +0:24 Constant: +0:24 0 (const int) 0:24 true case 0:25 move second child to first child (float) 0:25 'scale' (float) @@ -28,12 +33,18 @@ WARNING: 0:3: varying deprecated in version 130; may be removed in future releas 0:25 s1_1: direct index for structure (7-element array of structure) 0:25 direct index (uniform structure) 0:25 'foo2' (uniform 5-element array of structure) -0:25 3 (const int) +0:25 Constant: +0:25 3 (const int) +0:25 Constant: +0:25 2 (const int) +0:25 Constant: 0:25 2 (const int) +0:25 Constant: 0:25 2 (const int) -0:25 2 (const int) -0:25 3 (const int) -0:25 0 (const int) +0:25 Constant: +0:25 3 (const int) +0:25 Constant: +0:25 0 (const int) 0:24 false case 0:27 move second child to first child (float) 0:27 'scale' (float) @@ -43,11 +54,16 @@ WARNING: 0:3: varying deprecated in version 130; may be removed in future releas 0:27 s1_1: direct index for structure (7-element array of structure) 0:27 direct index (uniform structure) 0:27 'foo2' (uniform 5-element array of structure) -0:27 3 (const int) +0:27 Constant: +0:27 3 (const int) +0:27 Constant: +0:27 2 (const int) +0:27 Constant: 0:27 2 (const int) -0:27 2 (const int) -0:27 1 (const int) -0:27 3 (const int) +0:27 Constant: +0:27 1 (const int) +0:27 Constant: +0:27 3 (const int) 0:29 move second child to first child (4-component vector of float) 0:29 'gl_FragColor' (fragColor 4-component vector of float) 0:29 vector-scale (4-component vector of float) diff --git a/Test/baseResults/switch.frag.out b/Test/baseResults/switch.frag.out index 01b2ce2..a55f091 100644 --- a/Test/baseResults/switch.frag.out +++ b/Test/baseResults/switch.frag.out @@ -28,7 +28,8 @@ ERROR: node is still EOpNull! 0:28 sine (highp float) 0:28 'x' (smooth in highp float) 0:29 case: with expression -0:29 2 (const int) +0:29 Constant: +0:29 2 (const int) 0:? Sequence 0:30 move second child to first child (highp float) 0:30 'f' (highp float) @@ -44,7 +45,8 @@ ERROR: node is still EOpNull! 0:? Sequence 0:36 Branch: Break 0:37 case: with expression -0:37 1 (const int) +0:37 Constant: +0:37 1 (const int) 0:? Sequence 0:38 move second child to first child (highp float) 0:38 'f' (highp float) @@ -52,7 +54,8 @@ ERROR: node is still EOpNull! 0:38 'x' (smooth in highp float) 0:39 Branch: Break 0:40 case: with expression -0:40 2 (const int) +0:40 Constant: +0:40 2 (const int) 0:? Sequence 0:41 move second child to first child (highp float) 0:41 'f' (highp float) @@ -71,7 +74,8 @@ ERROR: node is still EOpNull! 0:47 body 0:47 Sequence 0:48 case: with expression -0:48 1 (const int) +0:48 Constant: +0:48 1 (const int) 0:? Sequence 0:49 move second child to first child (highp float) 0:49 'f' (highp float) @@ -79,7 +83,8 @@ ERROR: node is still EOpNull! 0:49 'x' (smooth in highp float) 0:50 Branch: Break 0:51 case: with expression -0:51 2 (const int) +0:51 Constant: +0:51 2 (const int) 0:? Sequence 0:52 switch 0:52 condition @@ -87,7 +92,8 @@ ERROR: node is still EOpNull! 0:52 body 0:52 Sequence 0:53 case: with expression -0:53 1 (const int) +0:53 Constant: +0:53 1 (const int) 0:? Sequence 0:54 move second child to first child (highp float) 0:54 'f' (highp float) @@ -98,7 +104,8 @@ ERROR: node is still EOpNull! 0:54 'x' (smooth in highp float) 0:55 Branch: Break 0:56 case: with expression -0:56 2 (const int) +0:56 Constant: +0:56 2 (const int) 0:? Sequence 0:57 move second child to first child (highp float) 0:57 'f' (highp float) @@ -114,11 +121,13 @@ ERROR: node is still EOpNull! 0:62 tangent (highp float) 0:62 'x' (smooth in highp float) 0:63 case: with expression -0:63 1 (const int) +0:63 Constant: +0:63 1 (const int) 0:? Sequence 0:64 Branch: Break 0:65 case: with expression -0:65 3.800000 +0:65 Constant: +0:65 3.800000 0:? Sequence 0:66 Branch: Break 0:67 case: with expression @@ -131,7 +140,8 @@ ERROR: node is still EOpNull! 0:71 body 0:71 Sequence 0:72 case: with expression -0:72 1 (const int) +0:72 Constant: +0:72 1 (const int) 0:? Sequence 0:73 move second child to first child (highp float) 0:73 'f' (highp float) @@ -139,7 +149,8 @@ ERROR: node is still EOpNull! 0:73 'x' (smooth in highp float) 0:74 Branch: Break 0:75 case: with expression -0:75 2 (const int) +0:75 Constant: +0:75 2 (const int) 0:? Sequence 0:76 switch 0:76 condition @@ -147,7 +158,8 @@ ERROR: node is still EOpNull! 0:76 body 0:76 Sequence 0:77 case: with expression -0:77 1 (const int) +0:77 Constant: +0:77 1 (const int) 0:? Sequence 0:78 move second child to first child (highp float) 0:78 'f' (highp float) @@ -158,7 +170,8 @@ ERROR: node is still EOpNull! 0:78 'x' (smooth in highp float) 0:79 Branch: Break 0:80 case: with expression -0:80 2 (const int) +0:80 Constant: +0:80 2 (const int) 0:? Sequence 0:81 move second child to first child (highp float) 0:81 'f' (highp float) diff --git a/Test/baseResults/swizzle.frag.out b/Test/baseResults/swizzle.frag.out index 103c6b0..e6b3a93 100644 --- a/Test/baseResults/swizzle.frag.out +++ b/Test/baseResults/swizzle.frag.out @@ -5,7 +5,8 @@ 0:11 Sequence 0:11 move second child to first child (float) 0:11 'blendscale' (float) -0:11 1.789000 +0:11 Constant: +0:11 1.789000 0:13 Sequence 0:13 move second child to first child (4-component vector of float) 0:13 'w' (4-component vector of float) @@ -29,69 +30,92 @@ 0:20 move second child to first child (float) 0:20 direct index (float) 0:20 'w_reorder' (4-component vector of float) -0:20 2 (const int) +0:20 Constant: +0:20 2 (const int) 0:20 'blendscale' (float) 0:22 move second child to first child (2-component vector of float) 0:22 vector swizzle (2-component vector of float) 0:22 'w' (4-component vector of float) 0:22 Sequence -0:22 3 (const int) -0:22 1 (const int) +0:22 Constant: +0:22 3 (const int) +0:22 Constant: +0:22 1 (const int) 0:22 't' (smooth in 2-component vector of float) 0:24 move second child to first child (float) 0:24 direct index (float) 0:24 'w_reorder' (4-component vector of float) -0:24 0 (const int) +0:24 Constant: +0:24 0 (const int) 0:24 'blendscale' (float) 0:26 move second child to first child (4-component vector of float) 0:26 vector swizzle (4-component vector of float) 0:26 'w2' (4-component vector of float) 0:26 Sequence -0:26 0 (const int) -0:26 1 (const int) -0:26 2 (const int) -0:26 3 (const int) +0:26 Constant: +0:26 0 (const int) +0:26 Constant: +0:26 1 (const int) +0:26 Constant: +0:26 2 (const int) +0:26 Constant: +0:26 3 (const int) 0:26 vector swizzle (4-component vector of float) 0:26 'u' (uniform 4-component vector of float) 0:26 Sequence -0:26 2 (const int) -0:26 3 (const int) -0:26 0 (const int) -0:26 1 (const int) +0:26 Constant: +0:26 2 (const int) +0:26 Constant: +0:26 3 (const int) +0:26 Constant: +0:26 0 (const int) +0:26 Constant: +0:26 1 (const int) 0:28 move second child to first child (float) 0:28 direct index (float) 0:28 'w_reorder' (4-component vector of float) -0:28 1 (const int) +0:28 Constant: +0:28 1 (const int) 0:28 'blendscale' (float) 0:30 move second child to first child (2-component vector of float) 0:30 vector swizzle (2-component vector of float) 0:30 'w_dep' (4-component vector of float) 0:30 Sequence -0:30 0 (const int) -0:30 1 (const int) +0:30 Constant: +0:30 0 (const int) +0:30 Constant: +0:30 1 (const int) 0:30 vector swizzle (2-component vector of float) 0:30 'w2' (4-component vector of float) 0:30 Sequence -0:30 0 (const int) -0:30 2 (const int) +0:30 Constant: +0:30 0 (const int) +0:30 Constant: +0:30 2 (const int) 0:31 move second child to first child (2-component vector of float) 0:31 vector swizzle (2-component vector of float) 0:31 'w_dep' (4-component vector of float) 0:31 Sequence -0:31 2 (const int) -0:31 3 (const int) +0:31 Constant: +0:31 2 (const int) +0:31 Constant: +0:31 3 (const int) 0:31 't' (smooth in 2-component vector of float) 0:33 move second child to first child (2-component vector of float) 0:33 vector swizzle (2-component vector of float) 0:33 'w_undef' (4-component vector of float) 0:33 Sequence -0:33 0 (const int) -0:33 1 (const int) +0:33 Constant: +0:33 0 (const int) +0:33 Constant: +0:33 1 (const int) 0:33 vector swizzle (2-component vector of float) 0:33 'u' (uniform 4-component vector of float) 0:33 Sequence -0:33 2 (const int) -0:33 3 (const int) +0:33 Constant: +0:33 2 (const int) +0:33 Constant: +0:33 3 (const int) 0:35 Test condition and select (void) 0:35 Condition 0:35 'p' (uniform bool) @@ -99,18 +123,22 @@ 0:36 move second child to first child (float) 0:36 direct index (float) 0:36 'w_flow' (4-component vector of float) -0:36 0 (const int) +0:36 Constant: +0:36 0 (const int) 0:36 direct index (float) 0:36 't' (smooth in 2-component vector of float) -0:36 0 (const int) +0:36 Constant: +0:36 0 (const int) 0:35 false case 0:38 move second child to first child (float) 0:38 direct index (float) 0:38 'w_flow' (4-component vector of float) -0:38 0 (const int) +0:38 Constant: +0:38 0 (const int) 0:38 direct index (float) 0:38 't' (smooth in 2-component vector of float) -0:38 1 (const int) +0:38 Constant: +0:38 1 (const int) 0:40 move second child to first child (4-component vector of float) 0:40 'gl_FragColor' (fragColor 4-component vector of float) 0:40 mix (4-component vector of float) @@ -130,36 +158,45 @@ 0:43 Sequence 0:43 move second child to first child (4-component vector of float) 0:43 'rep' (4-component vector of float) -0:43 0.000000 -0:43 0.000000 -0:43 0.000000 -0:43 1.000000 +0:43 Constant: +0:43 0.000000 +0:43 0.000000 +0:43 0.000000 +0:43 1.000000 0:45 Test condition and select (void) 0:45 Condition 0:45 Compare Less Than (bool) 0:45 direct index (float) 0:45 'c' (2-component vector of float) -0:45 0 (const int) -0:45 0.000000 +0:45 Constant: +0:45 0 (const int) +0:45 Constant: +0:45 0.000000 0:45 true case 0:46 multiply second child into first child (float) 0:46 direct index (float) 0:46 'c' (2-component vector of float) -0:46 0 (const int) -0:46 -1.000000 +0:46 Constant: +0:46 0 (const int) +0:46 Constant: +0:46 -1.000000 0:48 Test condition and select (void) 0:48 Condition 0:48 Compare Less Than or Equal (bool) 0:48 direct index (float) 0:48 'c' (2-component vector of float) -0:48 0 (const int) -0:48 1.000000 +0:48 Constant: +0:48 0 (const int) +0:48 Constant: +0:48 1.000000 0:48 true case 0:49 move second child to first child (float) 0:49 direct index (float) 0:49 'rep' (4-component vector of float) -0:49 0 (const int) -0:49 3.400000 +0:49 Constant: +0:49 0 (const int) +0:49 Constant: +0:49 3.400000 0:51 add second child into first child (4-component vector of float) 0:51 'gl_FragColor' (fragColor 4-component vector of float) 0:51 'rep' (4-component vector of float) diff --git a/Test/baseResults/test.frag.out b/Test/baseResults/test.frag.out index 582d2d3..74bf270 100644 --- a/Test/baseResults/test.frag.out +++ b/Test/baseResults/test.frag.out @@ -5,7 +5,8 @@ 0:15 Sequence 0:15 move second child to first child (float) 0:15 'blendscale' (float) -0:15 1.789000 +0:15 Constant: +0:15 1.789000 0:17 Sequence 0:17 move second child to first child (4-component vector of float) 0:17 'v' (4-component vector of float) @@ -18,10 +19,14 @@ 0:17 'scale' (uniform 2-component vector of float) 0:17 'scale' (uniform 2-component vector of float) 0:17 Sequence -0:17 3 (const int) -0:17 2 (const int) -0:17 1 (const int) -0:17 0 (const int) +0:17 Constant: +0:17 3 (const int) +0:17 Constant: +0:17 2 (const int) +0:17 Constant: +0:17 1 (const int) +0:17 Constant: +0:17 0 (const int) 0:19 Sequence 0:19 move second child to first child (4-component vector of float) 0:19 'w' (4-component vector of float) diff --git a/Test/baseResults/texture.frag.out b/Test/baseResults/texture.frag.out index 806c38f..4a2738d 100644 --- a/Test/baseResults/texture.frag.out +++ b/Test/baseResults/texture.frag.out @@ -7,43 +7,51 @@ WARNING: 0:15: varying deprecated in version 130; may be removed in future relea 0:19 Sequence 0:19 move second child to first child (float) 0:19 'blendscale' (float) -0:19 1.789000 +0:19 Constant: +0:19 1.789000 0:20 Sequence 0:20 move second child to first child (float) 0:20 'bias' (float) -0:20 2.000000 +0:20 Constant: +0:20 2.000000 0:21 Sequence 0:21 move second child to first child (float) 0:21 'lod' (float) -0:21 3.000000 +0:21 Constant: +0:21 3.000000 0:22 Sequence 0:22 move second child to first child (float) 0:22 'proj' (float) -0:22 2.000000 +0:22 Constant: +0:22 2.000000 0:23 Sequence 0:23 move second child to first child (float) 0:23 'coords1D' (float) -0:23 1.789000 +0:23 Constant: +0:23 1.789000 0:24 Sequence 0:24 move second child to first child (3-component vector of float) 0:24 'coords3D' (3-component vector of float) -0:24 1.789000 -0:24 2.718000 -0:24 3.453000 +0:24 Constant: +0:24 1.789000 +0:24 2.718000 +0:24 3.453000 0:25 Sequence 0:25 move second child to first child (4-component vector of float) 0:25 'coords4D' (4-component vector of float) -0:25 1.789000 -0:25 2.718000 -0:25 3.453000 -0:25 2.000000 +0:25 Constant: +0:25 1.789000 +0:25 2.718000 +0:25 3.453000 +0:25 2.000000 0:26 Sequence 0:26 move second child to first child (4-component vector of float) 0:26 'color' (4-component vector of float) -0:26 0.000000 -0:26 0.000000 -0:26 0.000000 -0:26 0.000000 +0:26 Constant: +0:26 0.000000 +0:26 0.000000 +0:26 0.000000 +0:26 0.000000 0:28 add second child into first child (4-component vector of float) 0:28 'color' (4-component vector of float) 0:28 Function Call: texture1D(s11;f1; (4-component vector of float) @@ -179,12 +187,14 @@ WARNING: 0:15: varying deprecated in version 130; may be removed in future relea 0:57 Sequence 0:57 move second child to first child (2-component vector of int) 0:57 'iCoords2D' (2-component vector of int) -0:57 0 (const int) -0:57 5 (const int) +0:57 Constant: +0:57 0 (const int) +0:57 5 (const int) 0:58 Sequence 0:58 move second child to first child (int) 0:58 'iLod' (int) -0:58 1 (const int) +0:58 Constant: +0:58 1 (const int) 0:60 add second child into first child (4-component vector of float) 0:60 'color' (4-component vector of float) 0:60 Function Call: texelFetch(s21;vi2;i1; (4-component vector of float) @@ -204,8 +214,9 @@ WARNING: 0:15: varying deprecated in version 130; may be removed in future relea 0:64 Sequence 0:64 move second child to first child (2-component vector of int) 0:64 'offset' (2-component vector of int) -0:64 3 (const int) -0:64 -7 (const int) +0:64 Constant: +0:64 3 (const int) +0:64 -7 (const int) 0:66 add second child into first child (4-component vector of float) 0:66 'color' (4-component vector of float) 0:66 Function Call: textureGrad(s21;vf2;vf2;vf2; (4-component vector of float) diff --git a/Test/baseResults/tokenLength.vert.out b/Test/baseResults/tokenLength.vert.out index f371596..fb82cc3 100644 --- a/Test/baseResults/tokenLength.vert.out +++ b/Test/baseResults/tokenLength.vert.out @@ -18,35 +18,43 @@ ERROR: node is still EOpNull! 0:9 Sequence 0:9 move second child to first child (highp int) 0:9 'E1' (highp int) -0:9 -1 (const int) +0:9 Constant: +0:9 -1 (const int) 0:10 Sequence 0:10 move second child to first child (highp int) 0:10 'E2' (highp int) -0:10 -1 (const int) +0:10 Constant: +0:10 -1 (const int) 0:11 Sequence 0:11 move second child to first child (highp int) 0:11 'B' (highp int) -0:11 -1 (const int) +0:11 Constant: +0:11 -1 (const int) 0:13 Sequence 0:13 move second child to first child (highp int) 0:13 'OE' (highp int) -0:13 1073741823 (const int) +0:13 Constant: +0:13 1073741823 (const int) 0:14 Sequence 0:14 move second child to first child (highp int) 0:14 'HE' (highp int) -0:14 -1 (const int) +0:14 Constant: +0:14 -1 (const int) 0:17 Sequence 0:17 move second child to first child (highp float) 0:17 'F' (highp float) -0:17 1.012346 +0:17 Constant: +0:17 1.012346 0:20 Sequence 0:20 move second child to first child (highp float) 0:20 'G' (highp float) -0:20 1.012346 +0:20 Constant: +0:20 1.012346 0:23 Sequence 0:23 move second child to first child (highp float) 0:23 'E3' (highp float) -0:23 12.000000 +0:23 Constant: +0:23 12.000000 0:25 Function Definition: main( (void) 0:25 Function Parameters: 0:27 Sequence @@ -61,19 +69,23 @@ ERROR: node is still EOpNull! 0:33 Sequence 0:33 move second child to first child (highp int) 0:33 'superH' (highp int) -0:33 -1 (const int) +0:33 Constant: +0:33 -1 (const int) 0:34 Sequence 0:34 move second child to first child (highp int) 0:34 'superO' (highp int) -0:34 1073741823 (const int) +0:34 Constant: +0:34 1073741823 (const int) 0:35 Sequence 0:35 move second child to first child (highp int) 0:35 'superI' (highp int) -0:35 -1 (const int) +0:35 Constant: +0:35 -1 (const int) 0:36 Sequence 0:36 move second child to first child (highp float) 0:36 'superF' (highp float) -0:36 1.#INF00 +0:36 Constant: +0:36 1.#INF00 0:? Linker Objects 0:? 'BCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789' (in highp float) 0:? 'ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789' (in highp float) diff --git a/Test/baseResults/types.frag.out b/Test/baseResults/types.frag.out index af4db5b..ee4164e 100644 --- a/Test/baseResults/types.frag.out +++ b/Test/baseResults/types.frag.out @@ -17,16 +17,20 @@ 0:36 logical-and (bool) 0:36 direct index (bool) 0:36 'u_b2' (uniform 2-component vector of bool) -0:36 0 (const int) +0:36 Constant: +0:36 0 (const int) 0:36 direct index (bool) 0:36 'i_b2' (uniform 2-component vector of bool) -0:36 0 (const int) +0:36 Constant: +0:36 0 (const int) 0:36 direct index (bool) 0:36 'u_b2' (uniform 2-component vector of bool) -0:36 1 (const int) +0:36 Constant: +0:36 1 (const int) 0:36 direct index (bool) 0:36 'i_b2' (uniform 2-component vector of bool) -0:36 1 (const int) +0:36 Constant: +0:36 1 (const int) 0:37 Sequence 0:37 move second child to first child (3-component vector of bool) 0:37 'b3' (3-component vector of bool) @@ -38,22 +42,28 @@ 0:37 logical-and (bool) 0:37 direct index (bool) 0:37 'u_b3' (uniform 3-component vector of bool) -0:37 0 (const int) +0:37 Constant: +0:37 0 (const int) 0:37 direct index (bool) 0:37 'i_b3' (uniform 3-component vector of bool) -0:37 0 (const int) +0:37 Constant: +0:37 0 (const int) 0:37 direct index (bool) 0:37 'u_b3' (uniform 3-component vector of bool) -0:37 1 (const int) +0:37 Constant: +0:37 1 (const int) 0:37 direct index (bool) 0:37 'i_b3' (uniform 3-component vector of bool) -0:37 1 (const int) +0:37 Constant: +0:37 1 (const int) 0:37 direct index (bool) 0:37 'u_b3' (uniform 3-component vector of bool) -0:37 2 (const int) +0:37 Constant: +0:37 2 (const int) 0:37 direct index (bool) 0:37 'i_b3' (uniform 3-component vector of bool) -0:37 2 (const int) +0:37 Constant: +0:37 2 (const int) 0:38 Sequence 0:38 move second child to first child (4-component vector of bool) 0:38 'b4' (4-component vector of bool) @@ -67,28 +77,36 @@ 0:38 logical-and (bool) 0:38 direct index (bool) 0:38 'u_b4' (uniform 4-component vector of bool) -0:38 0 (const int) +0:38 Constant: +0:38 0 (const int) 0:38 direct index (bool) 0:38 'i_b4' (uniform 4-component vector of bool) -0:38 0 (const int) +0:38 Constant: +0:38 0 (const int) 0:38 direct index (bool) 0:38 'u_b4' (uniform 4-component vector of bool) -0:38 1 (const int) +0:38 Constant: +0:38 1 (const int) 0:38 direct index (bool) 0:38 'i_b4' (uniform 4-component vector of bool) -0:38 1 (const int) +0:38 Constant: +0:38 1 (const int) 0:38 direct index (bool) 0:38 'u_b4' (uniform 4-component vector of bool) -0:38 2 (const int) +0:38 Constant: +0:38 2 (const int) 0:38 direct index (bool) 0:38 'i_b4' (uniform 4-component vector of bool) -0:38 2 (const int) +0:38 Constant: +0:38 2 (const int) 0:38 direct index (bool) 0:38 'u_b4' (uniform 4-component vector of bool) -0:38 3 (const int) +0:38 Constant: +0:38 3 (const int) 0:38 direct index (bool) 0:38 'i_b4' (uniform 4-component vector of bool) -0:38 3 (const int) +0:38 Constant: +0:38 3 (const int) 0:40 Sequence 0:40 move second child to first child (int) 0:40 'i' (int) @@ -153,31 +171,40 @@ 0:51 'b' (bool) 0:52 direct index (bool) 0:52 'b2' (2-component vector of bool) -0:52 0 (const int) +0:52 Constant: +0:52 0 (const int) 0:53 direct index (bool) 0:53 'b2' (2-component vector of bool) -0:53 1 (const int) +0:53 Constant: +0:53 1 (const int) 0:54 direct index (bool) 0:54 'b3' (3-component vector of bool) -0:54 0 (const int) +0:54 Constant: +0:54 0 (const int) 0:55 direct index (bool) 0:55 'b3' (3-component vector of bool) -0:55 1 (const int) +0:55 Constant: +0:55 1 (const int) 0:56 direct index (bool) 0:56 'b3' (3-component vector of bool) -0:56 2 (const int) +0:56 Constant: +0:56 2 (const int) 0:57 direct index (bool) 0:57 'b4' (4-component vector of bool) -0:57 0 (const int) +0:57 Constant: +0:57 0 (const int) 0:58 direct index (bool) 0:58 'b4' (4-component vector of bool) -0:58 1 (const int) +0:58 Constant: +0:58 1 (const int) 0:59 direct index (bool) 0:59 'b4' (4-component vector of bool) -0:59 2 (const int) +0:59 Constant: +0:59 2 (const int) 0:60 direct index (bool) 0:60 'b4' (4-component vector of bool) -0:60 3 (const int) +0:60 Constant: +0:60 3 (const int) 0:60 true case 0:79 Construct vec4 (4-component vector of float) 0:79 add (float) @@ -203,64 +230,83 @@ 0:61 'i' (int) 0:62 direct index (int) 0:62 'i2' (2-component vector of int) -0:62 0 (const int) +0:62 Constant: +0:62 0 (const int) 0:63 direct index (int) 0:63 'i2' (2-component vector of int) -0:63 1 (const int) +0:63 Constant: +0:63 1 (const int) 0:64 direct index (int) 0:64 'i3' (3-component vector of int) -0:64 0 (const int) +0:64 Constant: +0:64 0 (const int) 0:65 direct index (int) 0:65 'i3' (3-component vector of int) -0:65 1 (const int) +0:65 Constant: +0:65 1 (const int) 0:66 direct index (int) 0:66 'i3' (3-component vector of int) -0:66 2 (const int) +0:66 Constant: +0:66 2 (const int) 0:67 direct index (int) 0:67 'i4' (4-component vector of int) -0:67 0 (const int) +0:67 Constant: +0:67 0 (const int) 0:68 direct index (int) 0:68 'i4' (4-component vector of int) -0:68 1 (const int) +0:68 Constant: +0:68 1 (const int) 0:69 direct index (int) 0:69 'i4' (4-component vector of int) -0:69 2 (const int) +0:69 Constant: +0:69 2 (const int) 0:70 direct index (int) 0:70 'i4' (4-component vector of int) -0:70 3 (const int) +0:70 Constant: +0:70 3 (const int) 0:71 'f' (float) 0:72 direct index (float) 0:72 'f2' (2-component vector of float) -0:72 0 (const int) +0:72 Constant: +0:72 0 (const int) 0:73 direct index (float) 0:73 'f2' (2-component vector of float) -0:73 1 (const int) +0:73 Constant: +0:73 1 (const int) 0:74 direct index (float) 0:74 'f3' (3-component vector of float) -0:74 0 (const int) +0:74 Constant: +0:74 0 (const int) 0:75 direct index (float) 0:75 'f3' (3-component vector of float) -0:75 1 (const int) +0:75 Constant: +0:75 1 (const int) 0:76 direct index (float) 0:76 'f3' (3-component vector of float) -0:76 2 (const int) +0:76 Constant: +0:76 2 (const int) 0:77 direct index (float) 0:77 'f4' (4-component vector of float) -0:77 0 (const int) +0:77 Constant: +0:77 0 (const int) 0:78 direct index (float) 0:78 'f4' (4-component vector of float) -0:78 1 (const int) +0:78 Constant: +0:78 1 (const int) 0:79 direct index (float) 0:79 'f4' (4-component vector of float) -0:79 2 (const int) +0:79 Constant: +0:79 2 (const int) 0:80 direct index (float) 0:80 'f4' (4-component vector of float) -0:80 3 (const int) +0:80 Constant: +0:80 3 (const int) 0:60 false case -0:80 1.000000 -0:80 1.000000 -0:80 1.000000 -0:80 1.000000 +0:80 Constant: +0:80 1.000000 +0:80 1.000000 +0:80 1.000000 +0:80 1.000000 0:? Linker Objects 0:? 'u_b' (uniform bool) 0:? 'u_b2' (uniform 2-component vector of bool) diff --git a/Test/baseResults/uint.frag.out b/Test/baseResults/uint.frag.out index b871722..6b17b95 100644 --- a/Test/baseResults/uint.frag.out +++ b/Test/baseResults/uint.frag.out @@ -16,73 +16,92 @@ ERROR: node is still EOpNull! 0:17 Sequence 0:17 move second child to first child (mediump int) 0:17 'count' (mediump int) -0:17 1 (const int) +0:17 Constant: +0:17 1 (const int) 0:19 Sequence 0:19 move second child to first child (mediump uint) 0:19 'u' (mediump uint) 0:19 add (mediump uint) 0:19 direct index (mediump uint) 0:19 't' (flat in mediump 2-component vector of uint) -0:19 1 (const int) -0:19 3 (const uint) +0:19 Constant: +0:19 1 (const int) +0:19 Constant: +0:19 3 (const uint) 0:27 Test condition and select (void) 0:27 Condition -0:27 true (const bool) +0:27 Constant: +0:27 true (const bool) 0:27 true case 0:28 multiply second child into first child (mediump int) 0:28 'count' (mediump int) -0:28 2 (const int) +0:28 Constant: +0:28 2 (const int) 0:29 Test condition and select (void) 0:29 Condition -0:29 true (const bool) +0:29 Constant: +0:29 true (const bool) 0:29 true case 0:30 multiply second child into first child (mediump int) 0:30 'count' (mediump int) -0:30 3 (const int) +0:30 Constant: +0:30 3 (const int) 0:31 Test condition and select (void) 0:31 Condition -0:31 false (const bool) +0:31 Constant: +0:31 false (const bool) 0:31 true case 0:32 multiply second child into first child (mediump int) 0:32 'count' (mediump int) -0:32 5 (const int) +0:32 Constant: +0:32 5 (const int) 0:41 Test condition and select (void) 0:41 Condition -0:41 true (const bool) +0:41 Constant: +0:41 true (const bool) 0:41 true case 0:42 multiply second child into first child (mediump int) 0:42 'count' (mediump int) -0:42 7 (const int) +0:42 Constant: +0:42 7 (const int) 0:43 Test condition and select (void) 0:43 Condition -0:43 true (const bool) +0:43 Constant: +0:43 true (const bool) 0:43 true case 0:44 multiply second child into first child (mediump int) 0:44 'count' (mediump int) -0:44 11 (const int) +0:44 Constant: +0:44 11 (const int) 0:45 Test condition and select (void) 0:45 Condition -0:45 false (const bool) +0:45 Constant: +0:45 false (const bool) 0:45 true case 0:46 multiply second child into first child (mediump int) 0:46 'count' (mediump int) -0:46 13 (const int) +0:46 Constant: +0:46 13 (const int) 0:49 Sequence 0:49 move second child to first child (mediump int) 0:49 'shiftedii' (mediump int) -0:49 -1 (const int) +0:49 Constant: +0:49 -1 (const int) 0:50 Sequence 0:50 move second child to first child (mediump uint) 0:50 'shiftedui' (mediump uint) -0:50 4194303 (const uint) +0:50 Constant: +0:50 4194303 (const uint) 0:52 Sequence 0:52 move second child to first child (mediump int) 0:52 'shiftediu' (mediump int) -0:52 -1 (const int) +0:52 Constant: +0:52 -1 (const int) 0:53 Sequence 0:53 move second child to first child (mediump uint) 0:53 'shifteduu' (mediump uint) -0:53 4194303 (const uint) +0:53 Constant: +0:53 4194303 (const uint) 0:55 Test condition and select (void) 0:55 Condition 0:55 Compare Equal (bool) @@ -106,7 +125,8 @@ ERROR: node is still EOpNull! 0:58 'usampler' (uniform lowp usampler2D) 0:58 add (highp 2-component vector of float) 0:58 'tc' (smooth in highp 2-component vector of float) -0:58 1.000000 +0:58 Constant: +0:58 1.000000 0:59 Test condition and select (void) 0:59 Condition 0:59 Compare Equal (bool) @@ -120,15 +140,18 @@ ERROR: node is still EOpNull! 0:60 'usampler' (uniform lowp usampler2D) 0:60 subtract (highp 2-component vector of float) 0:60 'tc' (smooth in highp 2-component vector of float) -0:60 2.000000 -0:60 2.000000 +0:60 Constant: +0:60 2.000000 +0:60 2.000000 0:62 Test condition and select (void) 0:62 Condition 0:62 Compare Greater Than (bool) 0:62 direct index (mediump uint) 0:62 't' (flat in mediump 2-component vector of uint) -0:62 0 (const int) -0:62 4 (const uint) +0:62 Constant: +0:62 0 (const int) +0:62 Constant: +0:62 4 (const uint) 0:62 true case 0:63 Sequence 0:63 Sequence @@ -159,50 +182,62 @@ ERROR: node is still EOpNull! 0:67 'count' (mediump int) 0:75 Test condition and select (void) 0:75 Condition -0:75 true (const bool) +0:75 Constant: +0:75 true (const bool) 0:75 true case 0:76 multiply second child into first child (mediump int) 0:76 'count' (mediump int) -0:76 17 (const int) +0:76 Constant: +0:76 17 (const int) 0:78 Test condition and select (void) 0:78 Condition -0:78 false (const bool) +0:78 Constant: +0:78 false (const bool) 0:78 true case 0:79 multiply second child into first child (mediump int) 0:79 'count' (mediump int) -0:79 19 (const int) +0:79 Constant: +0:79 19 (const int) 0:81 Test condition and select (void) 0:81 Condition -0:81 true (const bool) +0:81 Constant: +0:81 true (const bool) 0:81 true case 0:82 multiply second child into first child (mediump int) 0:82 'count' (mediump int) -0:82 23 (const int) +0:82 Constant: +0:82 23 (const int) 0:84 Test condition and select (void) 0:84 Condition -0:84 true (const bool) +0:84 Constant: +0:84 true (const bool) 0:84 true case 0:85 multiply second child into first child (mediump int) 0:85 'count' (mediump int) -0:85 27 (const int) +0:85 Constant: +0:85 27 (const int) 0:87 Sequence 0:87 move second child to first child (mediump uint) 0:87 'mask1' (mediump uint) -0:87 161 (const uint) +0:87 Constant: +0:87 161 (const uint) 0:88 Sequence 0:88 move second child to first child (mediump uint) 0:88 'mask2' (mediump uint) -0:88 2576 (const uint) +0:88 Constant: +0:88 2576 (const uint) 0:89 Sequence 0:89 move second child to first child (mediump uint) 0:89 'mask3' (mediump uint) 0:89 left-shift (mediump uint) 0:89 'mask1' (mediump uint) -0:89 4 (const int) +0:89 Constant: +0:89 4 (const int) 0:90 Sequence 0:90 move second child to first child (mediump uint) 0:90 'mask4' (mediump uint) -0:90 2737 (const uint) +0:90 Constant: +0:90 2737 (const uint) 0:92 Test condition and select (void) 0:92 Condition 0:92 Compare Equal (bool) @@ -211,18 +246,21 @@ ERROR: node is still EOpNull! 0:92 true case 0:93 multiply second child into first child (mediump int) 0:93 'count' (mediump int) -0:93 100 (const int) +0:93 Constant: +0:93 100 (const int) 0:95 Test condition and select (void) 0:95 Condition 0:95 Compare Not Equal (bool) 0:95 bitwise and (mediump uint) 0:95 'mask3' (mediump uint) 0:95 'mask1' (mediump uint) -0:95 0 (const uint) +0:95 Constant: +0:95 0 (const uint) 0:95 true case 0:96 multiply second child into first child (mediump int) 0:96 'count' (mediump int) -0:96 101 (const int) +0:96 Constant: +0:96 101 (const int) 0:98 Test condition and select (void) 0:98 Condition 0:98 Compare Equal (bool) @@ -233,18 +271,21 @@ ERROR: node is still EOpNull! 0:98 true case 0:99 multiply second child into first child (mediump int) 0:99 'count' (mediump int) -0:99 102 (const int) +0:99 Constant: +0:99 102 (const int) 0:101 Test condition and select (void) 0:101 Condition 0:101 Compare Equal (bool) 0:101 exclusive-or (mediump uint) 0:101 'mask1' (mediump uint) 0:101 'mask4' (mediump uint) -0:101 2576 (const uint) +0:101 Constant: +0:101 2576 (const uint) 0:101 true case 0:102 multiply second child into first child (mediump int) 0:102 'count' (mediump int) -0:102 103 (const int) +0:102 Constant: +0:102 103 (const int) 0:104 add second child into first child (mediump 4-component vector of uint) 0:104 'c' (out mediump 4-component vector of uint) 0:104 Construct uvec4 (mediump 4-component vector of uint) diff --git a/Test/baseResults/uniformArray.frag.out b/Test/baseResults/uniformArray.frag.out index f67d80d..b8f1594 100644 --- a/Test/baseResults/uniformArray.frag.out +++ b/Test/baseResults/uniformArray.frag.out @@ -8,25 +8,32 @@ 0:9 add (4-component vector of float) 0:9 direct index (uniform 4-component vector of float) 0:9 'color' (uniform 6-element array of 4-component vector of float) -0:9 1 (const int) +0:9 Constant: +0:9 1 (const int) 0:9 direct index (uniform 4-component vector of float) 0:9 'color' (uniform 6-element array of 4-component vector of float) -0:9 1 (const int) +0:9 Constant: +0:9 1 (const int) 0:11 add second child into first child (3-component vector of float) 0:11 vector swizzle (3-component vector of float) 0:11 'texColor' (4-component vector of float) 0:11 Sequence -0:11 0 (const int) -0:11 1 (const int) -0:11 2 (const int) +0:11 Constant: +0:11 0 (const int) +0:11 Constant: +0:11 1 (const int) +0:11 Constant: +0:11 2 (const int) 0:11 'inColor' (uniform 3-component vector of float) 0:13 add second child into first child (float) 0:13 direct index (float) 0:13 'texColor' (4-component vector of float) -0:13 3 (const int) +0:13 Constant: +0:13 3 (const int) 0:13 direct index (uniform float) 0:13 'alpha' (uniform 16-element array of float) -0:13 12 (const int) +0:13 Constant: +0:13 12 (const int) 0:15 move second child to first child (4-component vector of float) 0:15 'gl_FragColor' (fragColor 4-component vector of float) 0:15 'texColor' (4-component vector of float) diff --git a/Test/baseResults/variableArrayIndex.frag.out b/Test/baseResults/variableArrayIndex.frag.out index a217c28..96db492 100644 --- a/Test/baseResults/variableArrayIndex.frag.out +++ b/Test/baseResults/variableArrayIndex.frag.out @@ -14,10 +14,14 @@ WARNING: 0:3: varying deprecated in version 130; may be removed in future releas 0:34 direct index (structure) 0:34 s2_1: direct index for structure (3-element array of structure) 0:34 'foo3' (uniform structure) -0:34 0 (const int) -0:34 1 (const int) +0:34 Constant: +0:34 0 (const int) +0:34 Constant: +0:34 1 (const int) +0:34 Constant: +0:34 0 (const int) +0:34 Constant: 0:34 0 (const int) -0:34 0 (const int) 0:34 true case 0:35 move second child to first child (float) 0:35 'scale' (float) @@ -31,16 +35,22 @@ WARNING: 0:3: varying deprecated in version 130; may be removed in future releas 0:35 indirect index (structure) 0:35 s2_1: direct index for structure (3-element array of structure) 0:35 'foo3' (uniform structure) -0:35 0 (const int) +0:35 Constant: +0:35 0 (const int) 0:35 i: direct index for structure (int) 0:35 'foo' (uniform structure) -0:35 0 (const int) -0:35 0 (const int) -0:35 2 (const int) +0:35 Constant: +0:35 0 (const int) +0:35 Constant: +0:35 0 (const int) +0:35 Constant: +0:35 2 (const int) 0:35 Pre-Increment (int) 0:35 'iLocal' (int) -0:35 2 (const int) -0:35 1 (const int) +0:35 Constant: +0:35 2 (const int) +0:35 Constant: +0:35 1 (const int) 0:34 false case 0:37 move second child to first child (float) 0:37 'scale' (float) @@ -49,10 +59,14 @@ WARNING: 0:3: varying deprecated in version 130; may be removed in future releas 0:37 direct index (structure) 0:37 s2_1: direct index for structure (3-element array of structure) 0:37 'foo3' (uniform structure) +0:37 Constant: +0:37 0 (const int) +0:37 Constant: 0:37 0 (const int) -0:37 0 (const int) -0:37 2 (const int) -0:37 1 (const int) +0:37 Constant: +0:37 2 (const int) +0:37 Constant: +0:37 1 (const int) 0:43 move second child to first child (4-component vector of float) 0:43 'gl_FragColor' (fragColor 4-component vector of float) 0:43 vector-scale (4-component vector of float) @@ -67,8 +81,9 @@ WARNING: 0:3: varying deprecated in version 130; may be removed in future releas 0:45 'coord' (smooth in 2-component vector of float) 0:45 Construct vec2 (2-component vector of float) 0:45 'scale' (float) -0:45 1.000000 -0:45 2.000000 +0:45 Constant: +0:45 1.000000 +0:45 2.000000 0:46 add second child into first child (4-component vector of float) 0:46 'gl_FragColor' (fragColor 4-component vector of float) 0:46 Construct vec4 (4-component vector of float) @@ -76,12 +91,14 @@ WARNING: 0:3: varying deprecated in version 130; may be removed in future releas 0:46 'constructed' (3-element array of 2-component vector of float) 0:46 i: direct index for structure (int) 0:46 'foo' (uniform structure) -0:46 0 (const int) +0:46 Constant: +0:46 0 (const int) 0:46 indirect index (2-component vector of float) 0:46 'constructed' (3-element array of 2-component vector of float) 0:46 i: direct index for structure (int) 0:46 'foo' (uniform structure) -0:46 0 (const int) +0:46 Constant: +0:46 0 (const int) 0:? Linker Objects 0:? 'sampler' (uniform sampler2D) 0:? 'coord' (smooth in 2-component vector of float) diff --git a/Test/baseResults/varyingArray.frag.out b/Test/baseResults/varyingArray.frag.out index 57048da..aa905ac 100644 --- a/Test/baseResults/varyingArray.frag.out +++ b/Test/baseResults/varyingArray.frag.out @@ -15,17 +15,20 @@ WARNING: 0:8: varying deprecated in version 130; may be removed in future releas 0:12 add (4-component vector of float) 0:12 direct index (smooth in 4-component vector of float) 0:12 'gl_TexCoord' (smooth in 6-element array of 4-component vector of float) -0:12 4 (const int) +0:12 Constant: +0:12 4 (const int) 0:12 direct index (smooth in 4-component vector of float) 0:12 'gl_TexCoord' (smooth in 6-element array of 4-component vector of float) -0:12 5 (const int) +0:12 Constant: +0:12 5 (const int) 0:14 add second child into first child (4-component vector of float) 0:14 'texColor' (4-component vector of float) 0:14 'color' (smooth in 4-component vector of float) 0:16 move second child to first child (float) 0:16 direct index (float) 0:16 'texColor' (4-component vector of float) -0:16 3 (const int) +0:16 Constant: +0:16 3 (const int) 0:16 'alpha' (smooth in float) 0:18 move second child to first child (4-component vector of float) 0:18 'gl_FragColor' (fragColor 4-component vector of float) @@ -34,13 +37,16 @@ WARNING: 0:8: varying deprecated in version 130; may be removed in future releas 0:18 add (4-component vector of float) 0:18 direct index (smooth in 4-component vector of float) 0:18 'foo' (smooth in 3-element array of 4-component vector of float) -0:18 1 (const int) +0:18 Constant: +0:18 1 (const int) 0:18 direct index (smooth in 4-component vector of float) 0:18 'gl_TexCoord' (smooth in 6-element array of 4-component vector of float) -0:18 0 (const int) +0:18 Constant: +0:18 0 (const int) 0:18 direct index (smooth in 4-component vector of float) 0:18 'gl_TexCoord' (smooth in 6-element array of 4-component vector of float) -0:18 4 (const int) +0:18 Constant: +0:18 4 (const int) 0:18 'texColor' (4-component vector of float) 0:? Linker Objects 0:? 'texSampler2D' (uniform sampler2D) diff --git a/Test/baseResults/varyingArrayIndirect.frag.out b/Test/baseResults/varyingArrayIndirect.frag.out index 8e60670..24b3582 100644 --- a/Test/baseResults/varyingArrayIndirect.frag.out +++ b/Test/baseResults/varyingArrayIndirect.frag.out @@ -22,14 +22,16 @@ WARNING: 0:8: varying deprecated in version 130; may be removed in future releas 0:14 'a' (uniform int) 0:14 direct index (smooth in 4-component vector of float) 0:14 'gl_TexCoord' (smooth in 6-element array of 4-component vector of float) -0:14 5 (const int) +0:14 Constant: +0:14 5 (const int) 0:16 add second child into first child (4-component vector of float) 0:16 'texColor' (4-component vector of float) 0:16 'color' (smooth in 4-component vector of float) 0:18 move second child to first child (float) 0:18 direct index (float) 0:18 'texColor' (4-component vector of float) -0:18 3 (const int) +0:18 Constant: +0:18 3 (const int) 0:18 'alpha' (smooth in float) 0:20 move second child to first child (4-component vector of float) 0:20 'gl_FragColor' (fragColor 4-component vector of float) @@ -38,7 +40,8 @@ WARNING: 0:8: varying deprecated in version 130; may be removed in future releas 0:20 add (4-component vector of float) 0:20 direct index (smooth in 4-component vector of float) 0:20 'gl_TexCoord' (smooth in 6-element array of 4-component vector of float) -0:20 0 (const int) +0:20 Constant: +0:20 0 (const int) 0:20 indirect index (smooth in 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) diff --git a/Test/baseResults/versionsClean.frag.out b/Test/baseResults/versionsClean.frag.out index 8014ce5..19082c3 100644 --- a/Test/baseResults/versionsClean.frag.out +++ b/Test/baseResults/versionsClean.frag.out @@ -9,7 +9,8 @@ ERROR: node is still EOpNull! 0:43 'foo' (out highp 4-component vector of float) 0:43 Construct vec4 (highp 4-component vector of float) 0:43 'color' (smooth in highp 3-component vector of float) -0:43 142.000000 +0:43 Constant: +0:43 142.000000 0:44 Branch: Kill 0:? Linker Objects 0:? 'color' (smooth in highp 3-component vector of float) diff --git a/Test/baseResults/versionsClean.vert.out b/Test/baseResults/versionsClean.vert.out index 807ee88..259ad00 100644 --- a/Test/baseResults/versionsClean.vert.out +++ b/Test/baseResults/versionsClean.vert.out @@ -6,7 +6,8 @@ 0:42 'gl_Position' (gl_Position 4-component vector of float) 0:42 Construct vec4 (4-component vector of float) 0:42 'color' (in 3-component vector of float) -0:42 142.000000 +0:42 Constant: +0:42 142.000000 0:? Linker Objects 0:? 'color' (in 3-component vector of float) 0:? 'foo' (uniform sampler2DRect) diff --git a/Test/baseResults/versionsErrors.frag.out b/Test/baseResults/versionsErrors.frag.out index 4110560..b339567 100644 --- a/Test/baseResults/versionsErrors.frag.out +++ b/Test/baseResults/versionsErrors.frag.out @@ -12,7 +12,8 @@ ERROR: node is still EOpNull! 0:44 'gl_FragColor' (fragColor 4-component vector of float) 0:44 Construct vec4 (4-component vector of float) 0:44 'color' (smooth in 3-component vector of float) -0:44 142.000000 +0:44 Constant: +0:44 142.000000 0:45 Branch: Kill 0:? Linker Objects 0:? 'color' (smooth in 3-component vector of float) diff --git a/Test/baseResults/versionsErrors.vert.out b/Test/baseResults/versionsErrors.vert.out index 0622ec2..12ab775 100644 --- a/Test/baseResults/versionsErrors.vert.out +++ b/Test/baseResults/versionsErrors.vert.out @@ -11,7 +11,8 @@ ERROR: node is still EOpNull! 0:44 'gl_Position' (gl_Position 4-component vector of float) 0:44 Construct vec4 (4-component vector of float) 0:44 'color' (in 3-component vector of float) -0:44 142.000000 +0:44 Constant: +0:44 142.000000 0:45 Branch: Kill 0:? Linker Objects 0:? 'color' (in 3-component vector of float) diff --git a/Test/baseResults/voidFunction.frag.out b/Test/baseResults/voidFunction.frag.out index 3f8254a..4b62cd2 100644 --- a/Test/baseResults/voidFunction.frag.out +++ b/Test/baseResults/voidFunction.frag.out @@ -2,7 +2,8 @@ 0:7 Sequence 0:7 move second child to first child (float) 0:7 'bar' (float) -0:7 2.000000 +0:7 Constant: +0:7 2.000000 0:9 Function Definition: foo( (void) 0:9 Function Parameters: 0:11 Sequence @@ -26,7 +27,8 @@ 0:29 add second child into first child (float) 0:29 direct index (float) 0:29 'outColor' (4-component vector of float) -0:29 0 (const int) +0:29 Constant: +0:29 0 (const int) 0:29 'bar' (float) 0:31 move second child to first child (4-component vector of float) 0:31 'gl_FragColor' (fragColor 4-component vector of float) diff --git a/Test/baseResults/whileLoop.frag.out b/Test/baseResults/whileLoop.frag.out index b8575b3..7b25a0c 100644 --- a/Test/baseResults/whileLoop.frag.out +++ b/Test/baseResults/whileLoop.frag.out @@ -11,7 +11,8 @@ 0:11 Compare Less Than (bool) 0:11 direct index (float) 0:11 'color' (4-component vector of float) -0:11 0 (const int) +0:11 Constant: +0:11 0 (const int) 0:11 'd' (uniform float) 0:11 Loop Body 0:12 Sequence diff --git a/Test/decls.frag b/Test/decls.frag index e76d385..0e41f35 100644 --- a/Test/decls.frag +++ b/Test/decls.frag @@ -21,6 +21,16 @@ void vj, vk5[5] = int[](5, 6, 7, 8, 9); void vm2[2] = int[](10, 11), vm3[3] = int[](12, 13, 14); void vn8[4] = int[](21, 22, 23, 24), vp; +const int cii4[4] = int[](1, 2, 3, 4); +const int cij, cik5[5] = int[](5, 6, 7, 8, 9); +const int cim2[2] = int[](10, 11), cim3[3] = int[](12, 13, 14); +const int cin8[4] = int[](21, 22, 23, 24), cip; + +uniform int uii4[4] = int[](1, 2, 3, 4); +uniform int uij, uik5[5] = int[](5, 6, 7, 8, 9); +uniform int uim2[2] = int[](10, 11), uim3[3] = int[](12, 13, 14); +uniform int uin8[4] = int[](21, 22, 23, 24), uip; + int gl_vi4[4] = int[](1, 2, 3, 4); int gl_vj, gl_vk5[5] = int[](5, 6, 7, 8, 9); int gl_vm2[2] = int[](10, 11), gl_vm3[3] = int[](12, 13, 14); diff --git a/Test/link1.frag b/Test/link1.frag index 3bb5cf6..2b8d95a 100644 --- a/Test/link1.frag +++ b/Test/link1.frag @@ -22,3 +22,17 @@ ivec2 foo(mat2 m) } vec4 c = b * b; + +const vec3 cv3 = vec3(43.0, 0.34, 9.9); +const vec3 cv3n = vec3(43.0, 0.34, 9.9); +const vec3 cv3e = vec3(43.0, 0.34, 9.9); +uniform mat2 um2 = mat2(4.0); +uniform mat2 um2n = mat2(4.0); +uniform mat2 um2e = mat2(4.0); +struct S { + int a; + float b; +}; +uniform S s = S(82, 3.9); +uniform S sn; +uniform S se = S(82, 3.9); diff --git a/Test/link2.frag b/Test/link2.frag index e7fe630..3eb265e 100644 --- a/Test/link2.frag +++ b/Test/link2.frag @@ -18,3 +18,16 @@ ivec2 foo() } vec4 f = e * e; + +const vec3 cv3 = vec3(43.0, 0.34, 9.9); +const vec3 cv3e = vec3(43.0, 0.34, 2.9); +uniform mat2 um2 = mat2(4.0); +uniform mat2 um2n; +uniform mat2 um2e = mat2(3.0); +struct S { + int a; + float b; +}; +uniform S s = S(82, 3.9); +uniform S sn = S(82, 3.9); +uniform S se = S(81, 3.9); diff --git a/glslang/Include/Common.h b/glslang/Include/Common.h index fcfe1e2..cdabe09 100644 --- a/glslang/Include/Common.h +++ b/glslang/Include/Common.h @@ -106,7 +106,8 @@ public: typedef typename std::vector >::size_type size_type; TVector() : std::vector >() {} TVector(const pool_allocator& a) : std::vector >(a) {} - TVector(size_type i): std::vector >(i) {} + TVector(size_type i) : std::vector >(i) {} + TVector(size_type i, const T& val) : std::vector >(i, val) {} }; template class TList : public TBaseList > { diff --git a/glslang/Include/ConstantUnion.h b/glslang/Include/ConstantUnion.h index 6868d11..c179a58 100644 --- a/glslang/Include/ConstantUnion.h +++ b/glslang/Include/ConstantUnion.h @@ -41,8 +41,8 @@ namespace glslang { class TConstUnion { public: - POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator()) + void setIConst(int i) { iConst = i; @@ -394,9 +394,9 @@ public: return returnValue; } - TBasicType getType() { return type; } -private: + TBasicType getType() const { return type; } +private: union { int iConst; // used for ivec, scalar ints unsigned int uConst; // used for uvec, scalar uints @@ -407,6 +407,61 @@ private: TBasicType type; }; +// Encapsulate having a pointer to an array of TConstUnion, +// which only needs to be allocated if it's size is going to be +// bigger than 0. +// +// One convenience is being able to use [] to go inside the array, instead +// of C++ assuming it as an array of pointers to vectors. +// +// General usage is that the size is known up front, and it is +// created once with the proper size. +// +class TConstUnionArray { +public: + POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator()) + + TConstUnionArray() { unionArray = 0; } + + explicit TConstUnionArray(int size) + { + if (size == 0) + unionArray = 0; + else + unionArray = new TVector(size); + } + TConstUnionArray(const TConstUnionArray& a) : unionArray(a.unionArray) { } + TConstUnionArray(const TConstUnionArray& a, int start, int size) + { + unionArray = new TVector(size); + for (int i = 0; i < size; ++i) + (*unionArray)[i] = a[start + i]; + } + + // Use this constructor for a smear operation + TConstUnionArray(int size, const TConstUnion& val) + { + unionArray = new TVector(size, val); + } + + TConstUnion& operator[](int index) { return (*unionArray)[index]; } + const TConstUnion& operator[](int index) const { return (*unionArray)[index]; } + bool operator==(const TConstUnionArray& rhs) const + { + // this includes the case that both are unallocated + if (unionArray == rhs.unionArray) + return true; + + return *unionArray == *rhs.unionArray; + } + bool operator!=(const TConstUnionArray& rhs) const { return ! operator==(rhs); } + + bool empty() const { return unionArray == 0; } + +protected: + TVector* unionArray; +}; + } // end namespace glslang #endif // _CONSTANT_UNION_INCLUDED_ diff --git a/glslang/Include/Types.h b/glslang/Include/Types.h index c33e41b..7199a5b 100644 --- a/glslang/Include/Types.h +++ b/glslang/Include/Types.h @@ -721,6 +721,42 @@ public: name += ';' ; } + // Do two structure types match? They could be declared independently, + // in different places, but still might satisfy the definition of matching. + // From the spec: + // + // "Structures must have the same name, sequence of type names, and + // type definitions, and member names to be considered the same type. + // This rule applies recursively for nested or embedded types." + // + bool sameStructType(const TType& right) const + { + // Most commonly, they are both 0, or the same pointer to the same actual structure + if (structure == right.structure) + return true; + + // Both being 0 was caught above, now they both have to be structures of the same number of elements + if (structure == 0 || right.structure == 0 || + structure->size() != right.structure->size()) + return false; + + // Structure names have to match + if (*typeName != *right.typeName) + return false; + + // Compare the names and types of all the members, which have to match + for (unsigned int i = 0; i < structure->size(); ++i) { + if ((*structure)[i].type->getFieldName() != (*right.structure)[i].type->getFieldName()) + return false; + + if (*(*structure)[i].type != *(*right.structure)[i].type) + return false; + } + + return true; + } + + // See if two types match, in all aspects except arrayness bool sameElementType(const TType& right) const { return basicType == right.basicType && @@ -728,20 +764,20 @@ public: vectorSize == right.vectorSize && matrixCols == right.matrixCols && matrixRows == right.matrixRows && - structure == right.structure; + sameStructType(right); } + // See if two types match in all ways (just the actual type, not qualification bool operator==(const TType& right) const { return sameElementType(right) && (arraySizes == 0 && right.arraySizes == 0 || (arraySizes && right.arraySizes && arraySizes->sizes == right.arraySizes->sizes)); - // don't check the qualifier, it's not ever what's being sought after } bool operator!=(const TType& right) const { - return !operator==(right); + return ! operator==(right); } protected: @@ -764,7 +800,7 @@ protected: TTypeList* structure; // 0 unless this is a struct mutable int structureSize; // a cache, updated on first access TString *fieldName; // for structure field names - TString *typeName; // for structure field type name + TString *typeName; // for structure type name }; } // end namespace glslang diff --git a/glslang/Include/intermediate.h b/glslang/Include/intermediate.h index d735bda..549ec86 100644 --- a/glslang/Include/intermediate.h +++ b/glslang/Include/intermediate.h @@ -460,27 +460,29 @@ public: // per process globalpoolallocator, then it causes increased memory usage per compile // it is essential to use "symbol = sym" to assign to symbol TIntermSymbol(int i, const TString& n, const TType& t) : - TIntermTyped(t), id(i) { name = n;} + TIntermTyped(t), id(i) { name = n;} virtual int getId() const { return id; } virtual const TString& getName() const { return name; } virtual void traverse(TIntermTraverser*); virtual TIntermSymbol* getAsSymbolNode() { return this; } + void setConstArray(const TConstUnionArray& c) { unionArray = c; } + const TConstUnionArray& getConstArray() const { return unionArray; } protected: int id; TString name; + TConstUnionArray unionArray; }; class TIntermConstantUnion : public TIntermTyped { public: - TIntermConstantUnion(TConstUnion *unionPointer, const TType& t) : TIntermTyped(t), unionArrayPointer(unionPointer) { } - TConstUnion* getUnionArrayPointer() const { return unionArrayPointer; } - void setUnionArrayPointer(TConstUnion *c) { unionArrayPointer = c; } + TIntermConstantUnion(const TConstUnionArray& ua, const TType& t) : TIntermTyped(t), unionArray(ua) { } + const TConstUnionArray& getConstArray() const { return unionArray; } virtual TIntermConstantUnion* getAsConstantUnion() { return this; } virtual void traverse(TIntermTraverser* ); virtual TIntermTyped* fold(TOperator, TIntermTyped*); virtual TIntermTyped* fold(TOperator, const TType&); protected: - TConstUnion *unionArrayPointer; + const TConstUnionArray unionArray; }; // diff --git a/glslang/MachineIndependent/Constant.cpp b/glslang/MachineIndependent/Constant.cpp index 8aa4ed8..218fe94 100644 --- a/glslang/MachineIndependent/Constant.cpp +++ b/glslang/MachineIndependent/Constant.cpp @@ -65,53 +65,6 @@ bool isInf(double x) const double pi = 3.1415926535897932384626433832795; -// forward reference for mutual recursion -bool CompareStruct(const TType& leftNodeType, TConstUnion* rightUnionArray, TConstUnion* leftUnionArray); - -bool CompareStructure(const TType& leftNodeType, TConstUnion* rightUnionArray, TConstUnion* leftUnionArray) -{ - if (leftNodeType.isArray()) { - TType typeWithoutArrayness; - typeWithoutArrayness.shallowCopy(leftNodeType); // TODO: arrays of arrays: the shallow copy won't work if arrays are shared and dereferenced - typeWithoutArrayness.dereference(); - - int arraySize = leftNodeType.getArraySize(); - - for (int i = 0; i < arraySize; ++i) { - int offset = typeWithoutArrayness.getObjectSize() * i; - if (! CompareStruct(typeWithoutArrayness, &rightUnionArray[offset], &leftUnionArray[offset])) - return false; - } - } else - return CompareStruct(leftNodeType, rightUnionArray, leftUnionArray); - - return true; -} - -bool CompareStruct(const TType& leftNodeType, TConstUnion* rightUnionArray, TConstUnion* leftUnionArray) -{ - TTypeList* fields = leftNodeType.getStruct(); - - size_t structSize = fields->size(); - int index = 0; - - for (size_t j = 0; j < structSize; j++) { - int size = (*fields)[j].type->getObjectSize(); - for (int i = 0; i < size; i++) { - if ((*fields)[j].type->getBasicType() == EbtStruct) { - if (!CompareStructure(*(*fields)[j].type, &rightUnionArray[index], &leftUnionArray[index])) - return false; - } else { - if (leftUnionArray[index] != rightUnionArray[index]) - return false; - index++; - } - - } - } - return true; -} - } // end anonymous namespace @@ -132,10 +85,6 @@ namespace glslang { // TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNode) { - TConstUnion *unionArray = getUnionArrayPointer(); - int objectSize = getType().getObjectSize(); - TConstUnion* newConstArray = 0; - // For most cases, the return type matches the argument type, so set that // up and just code to exceptions below. TType returnType; @@ -146,33 +95,46 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNod // TIntermConstantUnion *node = constantNode->getAsConstantUnion(); - TConstUnion *rightUnionArray = node->getUnionArrayPointer(); - - if (constantNode->getType().getObjectSize() == 1 && objectSize > 1) { - // for a case like float f = vec4(2,3,4,5) + 1.2; - rightUnionArray = new TConstUnion[objectSize]; - for (int i = 0; i < objectSize; ++i) - rightUnionArray[i] = *node->getUnionArrayPointer(); - } else if (constantNode->getType().getObjectSize() > 1 && objectSize == 1) { - // for a case like float f = 1.2 + vec4(2,3,4,5); - rightUnionArray = node->getUnionArrayPointer(); - unionArray = new TConstUnion[constantNode->getType().getObjectSize()]; - for (int i = 0; i < constantNode->getType().getObjectSize(); ++i) - unionArray[i] = *getUnionArrayPointer(); - returnType.shallowCopy(node->getType()); - objectSize = constantNode->getType().getObjectSize(); + TConstUnionArray unionArray = getConstArray(); + TConstUnionArray rightUnionArray = node->getConstArray(); + + // Figure out the size of the result + int objectSize; + switch(op) { + case EOpMatrixTimesMatrix: + objectSize = getMatrixRows() * node->getMatrixCols(); + break; + case EOpMatrixTimesVector: + objectSize = getMatrixRows(); + break; + case EOpVectorTimesMatrix: + objectSize = node->getMatrixCols(); + break; + default: + objectSize = getType().getObjectSize(); + if (constantNode->getType().getObjectSize() == 1 && getType().getObjectSize() > 1) { + // for a case like vec4 f = vec4(2,3,4,5) + 1.2; + TConstUnionArray smearedArray(objectSize, node->getConstArray()[0]); + rightUnionArray = smearedArray; + } else if (constantNode->getType().getObjectSize() > 1 && getType().getObjectSize() == 1) { + // for a case like vec4 f = 1.2 + vec4(2,3,4,5); + objectSize = constantNode->getType().getObjectSize(); + rightUnionArray = node->getConstArray(); + TConstUnionArray smearedArray(objectSize, getConstArray()[0]); + unionArray = smearedArray; + returnType.shallowCopy(node->getType()); + } + break; } - int index = 0; - bool boolNodeFlag = false; + TConstUnionArray newConstArray(objectSize); + switch(op) { case EOpAdd: - newConstArray = new TConstUnion[objectSize]; for (int i = 0; i < objectSize; i++) newConstArray[i] = unionArray[i] + rightUnionArray[i]; break; case EOpSub: - newConstArray = new TConstUnion[objectSize]; for (int i = 0; i < objectSize; i++) newConstArray[i] = unionArray[i] - rightUnionArray[i]; break; @@ -180,12 +142,10 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNod case EOpMul: case EOpVectorTimesScalar: case EOpMatrixTimesScalar: - newConstArray = new TConstUnion[objectSize]; for (int i = 0; i < objectSize; i++) newConstArray[i] = unionArray[i] * rightUnionArray[i]; break; case EOpMatrixTimesMatrix: - newConstArray = new TConstUnion[getMatrixRows() * node->getMatrixCols()]; for (int row = 0; row < getMatrixRows(); row++) { for (int column = 0; column < node->getMatrixCols(); column++) { double sum = 0.0f; @@ -197,7 +157,6 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNod returnType.shallowCopy(TType(getType().getBasicType(), EvqConst, 0, getMatrixRows(), node->getMatrixCols())); break; case EOpDiv: - newConstArray = new TConstUnion[objectSize]; for (int i = 0; i < objectSize; i++) { switch (getType().getBasicType()) { case EbtDouble: @@ -225,7 +184,6 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNod break; case EOpMatrixTimesVector: - newConstArray = new TConstUnion[getMatrixRows()]; for (int i = 0; i < getMatrixRows(); i++) { double sum = 0.0f; for (int j = 0; j < node->getVectorSize(); j++) { @@ -238,7 +196,6 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNod break; case EOpVectorTimesMatrix: - newConstArray = new TConstUnion[node->getMatrixCols()]; for (int i = 0; i < node->getMatrixCols(); i++) { double sum = 0.0f; for (int j = 0; j < getVectorSize(); j++) @@ -250,53 +207,44 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNod break; case EOpMod: - newConstArray = new TConstUnion[objectSize]; for (int i = 0; i < objectSize; i++) newConstArray[i] = unionArray[i] % rightUnionArray[i]; break; case EOpRightShift: - newConstArray = new TConstUnion[objectSize]; for (int i = 0; i < objectSize; i++) newConstArray[i] = unionArray[i] >> rightUnionArray[i]; break; case EOpLeftShift: - newConstArray = new TConstUnion[objectSize]; for (int i = 0; i < objectSize; i++) newConstArray[i] = unionArray[i] << rightUnionArray[i]; break; case EOpAnd: - newConstArray = new TConstUnion[objectSize]; for (int i = 0; i < objectSize; i++) newConstArray[i] = unionArray[i] & rightUnionArray[i]; break; case EOpInclusiveOr: - newConstArray = new TConstUnion[objectSize]; for (int i = 0; i < objectSize; i++) newConstArray[i] = unionArray[i] | rightUnionArray[i]; break; case EOpExclusiveOr: - newConstArray = new TConstUnion[objectSize]; for (int i = 0; i < objectSize; i++) newConstArray[i] = unionArray[i] ^ rightUnionArray[i]; break; case EOpLogicalAnd: // this code is written for possible future use, will not get executed currently - newConstArray = new TConstUnion[objectSize]; for (int i = 0; i < objectSize; i++) newConstArray[i] = unionArray[i] && rightUnionArray[i]; break; case EOpLogicalOr: // this code is written for possible future use, will not get executed currently - newConstArray = new TConstUnion[objectSize]; for (int i = 0; i < objectSize; i++) newConstArray[i] = unionArray[i] || rightUnionArray[i]; break; case EOpLogicalXor: - newConstArray = new TConstUnion[objectSize]; for (int i = 0; i < objectSize; i++) { switch (getType().getBasicType()) { case EbtBool: newConstArray[i].setBConst((unionArray[i] == rightUnionArray[i]) ? false : true); break; @@ -306,71 +254,27 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNod break; case EOpLessThan: - assert(objectSize == 1); - newConstArray = new TConstUnion[1]; - newConstArray->setBConst(*unionArray < *rightUnionArray); + newConstArray[0].setBConst(unionArray[0] < rightUnionArray[0]); returnType.shallowCopy(TType(EbtBool, EvqConst)); break; case EOpGreaterThan: - assert(objectSize == 1); - newConstArray = new TConstUnion[1]; - newConstArray->setBConst(*unionArray > *rightUnionArray); + newConstArray[0].setBConst(unionArray[0] > rightUnionArray[0]); returnType.shallowCopy(TType(EbtBool, EvqConst)); break; case EOpLessThanEqual: - { - assert(objectSize == 1); - TConstUnion constant; - constant.setBConst(*unionArray > *rightUnionArray); - newConstArray = new TConstUnion[1]; - newConstArray->setBConst(!constant.getBConst()); + newConstArray[0].setBConst(! (unionArray[0] > rightUnionArray[0])); returnType.shallowCopy(TType(EbtBool, EvqConst)); break; - } case EOpGreaterThanEqual: - { - assert(objectSize == 1); - TConstUnion constant; - constant.setBConst(*unionArray < *rightUnionArray); - newConstArray = new TConstUnion[1]; - newConstArray->setBConst(!constant.getBConst()); + newConstArray[0].setBConst(! (unionArray[0] < rightUnionArray[0])); returnType.shallowCopy(TType(EbtBool, EvqConst)); break; - } - case EOpEqual: - if (getType().getBasicType() == EbtStruct) { - if (! CompareStructure(node->getType(), node->getUnionArrayPointer(), unionArray)) - boolNodeFlag = true; - } else { - for (int i = 0; i < objectSize; i++) { - if (unionArray[i] != rightUnionArray[i]) { - boolNodeFlag = true; - break; // break out of for loop - } - } - } - - newConstArray = new TConstUnion[1]; - newConstArray->setBConst(! boolNodeFlag); + newConstArray[0].setBConst(node->getConstArray() == unionArray); returnType.shallowCopy(TType(EbtBool, EvqConst)); break; - case EOpNotEqual: - if (getType().getBasicType() == EbtStruct) { - if (CompareStructure(node->getType(), node->getUnionArrayPointer(), unionArray)) - boolNodeFlag = true; - } else { - for (int i = 0; i < objectSize; i++) { - if (unionArray[i] == rightUnionArray[i]) { - boolNodeFlag = true; - break; // break out of for loop - } - } - } - - newConstArray = new TConstUnion[1]; - newConstArray->setBConst(! boolNodeFlag); + newConstArray[0].setBConst(node->getConstArray() != unionArray); returnType.shallowCopy(TType(EbtBool, EvqConst)); break; @@ -389,19 +293,16 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNod // TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType) { - TConstUnion *unionArray = getUnionArrayPointer(); - int objectSize = getType().getObjectSize(); - // First, size the result, which is mostly the same as the argument's size, // but not always. - TConstUnion* newConstArray; + int resultSize; switch (op) { // TODO: functionality: constant folding: finish listing exceptions to size here case EOpDeterminant: case EOpAny: case EOpAll: case EOpLength: - newConstArray = new TConstUnion[1]; + resultSize = 1; break; case EOpEmitStreamVertex: @@ -410,10 +311,15 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType) return 0; default: - newConstArray = new TConstUnion[objectSize]; + resultSize = getType().getObjectSize(); + break; } + TConstUnionArray newConstArray(resultSize); + + const TConstUnionArray unionArray = getConstArray(); // Process non-component-wise operations + int objectSize = getType().getObjectSize(); switch (op) { case EOpLength: case EOpNormalize: @@ -671,11 +577,11 @@ TIntermTyped* TIntermediate::fold(TIntermAggregate* aggrNode) default: return aggrNode; } - TConstUnion* newConstArray = new TConstUnion[objectSize]; + TConstUnionArray newConstArray(objectSize); - TVector childConstUnions; + TVector childConstUnions; for (unsigned int arg = 0; arg < children.size(); ++arg) - childConstUnions.push_back(children[arg]->getAsConstantUnion()->getUnionArrayPointer()); + childConstUnions.push_back(children[arg]->getAsConstantUnion()->getConstArray()); // Second, do the actual folding @@ -805,7 +711,7 @@ TIntermTyped* TIntermediate::foldConstructor(TIntermAggregate* aggrNode) { bool error = false; - TConstUnion* unionArray = new TConstUnion[aggrNode->getType().getObjectSize()]; + TConstUnionArray unionArray(aggrNode->getType().getObjectSize()); if (aggrNode->getSequence().size() == 1) error = parseConstTree(aggrNode->getLoc(), aggrNode, unionArray, aggrNode->getOp(), aggrNode->getType(), true); else diff --git a/glslang/MachineIndependent/Intermediate.cpp b/glslang/MachineIndependent/Intermediate.cpp index ebf6d14..63bf27f 100644 --- a/glslang/MachineIndependent/Intermediate.cpp +++ b/glslang/MachineIndependent/Intermediate.cpp @@ -757,7 +757,7 @@ TIntermTyped* TIntermediate::addSelection(TIntermTyped* cond, TIntermTyped* true // if (cond->getAsConstantUnion() && trueBlock->getAsConstantUnion() && falseBlock->getAsConstantUnion()) { - if (cond->getAsConstantUnion()->getUnionArrayPointer()->getBConst()) + if (cond->getAsConstantUnion()->getConstArray()[0].getBConst()) return trueBlock; else return falseBlock; @@ -779,9 +779,9 @@ TIntermTyped* TIntermediate::addSelection(TIntermTyped* cond, TIntermTyped* true // Returns the constant union node created. // -TIntermConstantUnion* TIntermediate::addConstantUnion(TConstUnion* unionArrayPointer, const TType& t, TSourceLoc loc) +TIntermConstantUnion* TIntermediate::addConstantUnion(const TConstUnionArray& unionArray, const TType& t, TSourceLoc loc) { - TIntermConstantUnion* node = new TIntermConstantUnion(unionArrayPointer, t); + TIntermConstantUnion* node = new TIntermConstantUnion(unionArray, t); node->setLoc(loc); return node; @@ -795,11 +795,10 @@ TIntermTyped* TIntermediate::addSwizzle(TVectorFields& fields, TSourceLoc loc) node->setLoc(loc); TIntermConstantUnion* constIntNode; TIntermSequence &sequenceVector = node->getSequence(); - TConstUnion* unionArray; for (int i = 0; i < fields.num; i++) { - unionArray = new TConstUnion[1]; - unionArray->setIConst(fields.offsets[i]); + TConstUnionArray unionArray(1); + unionArray[0].setIConst(fields.offsets[i]); constIntNode = addConstantUnion(unionArray, TType(EbtInt, EvqConst), loc); sequenceVector.push_back(constIntNode); } @@ -896,6 +895,7 @@ void TIntermediate::addSymbolLinkageNode(TIntermAggregate*& linkage, TSymbolTabl void TIntermediate::addSymbolLinkageNode(TIntermAggregate*& linkage, const TVariable& variable) { TIntermSymbol* node = new TIntermSymbol(variable.getUniqueId(), variable.getName(), variable.getType()); + node->setConstArray(variable.getConstArray()); linkage = growAggregate(linkage, node); } @@ -975,8 +975,13 @@ void TIntermediate::mergeLinkerObjects(TInfoSink& infoSink, TIntermSequence& lin if (symbol->getName() == unitSymbol->getName()) { // filter out copy merge = false; + + // but if one has an initializer and the other does not, update + // the initializer + if (symbol->getConstArray().empty() && ! unitSymbol->getConstArray().empty()) + symbol->setConstArray(unitSymbol->getConstArray()); - // Check for consistent types/qualification/etc. + // Check for consistent types/qualification/initializers etc. linkErrorCheck(infoSink, *symbol, *unitSymbol, false); } } @@ -1067,6 +1072,16 @@ void TIntermediate::linkErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sym writeTypeComparison = true; } + // Initializers have to match, if both are present, and if we don't already know the types don't match + if (! writeTypeComparison) { + if (! symbol.getConstArray().empty() && ! unitSymbol.getConstArray().empty()) { + if (symbol.getConstArray() != unitSymbol.getConstArray()) { + error(infoSink, "Initializers must match:"); + infoSink.info << " " << symbol.getName() << "\n"; + } + } + } + if (writeTypeComparison) infoSink.info << " " << symbol.getName() << ": \"" << symbol.getType().getCompleteString() << "\" versus \"" << unitSymbol.getType().getCompleteString() << "\"\n"; @@ -1547,12 +1562,12 @@ void TIntermTyped::propagatePrecision(TPrecisionQualifier newPrecision) TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermConstantUnion* node) { - TConstUnion *rightUnionArray = node->getUnionArrayPointer(); + const TConstUnionArray& rightUnionArray = node->getConstArray(); int size = node->getType().getObjectSize(); - TConstUnion *leftUnionArray = new TConstUnion[size]; + TConstUnionArray leftUnionArray(size); - for (int i=0; i < size; i++) { + for (int i=0; i < size; i++) { switch (promoteTo) { case EbtFloat: switch (node->getType().getBasicType()) { diff --git a/glslang/MachineIndependent/ParseHelper.cpp b/glslang/MachineIndependent/ParseHelper.cpp index c364c06..9fc9d3d 100644 --- a/glslang/MachineIndependent/ParseHelper.cpp +++ b/glslang/MachineIndependent/ParseHelper.cpp @@ -464,8 +464,8 @@ TIntermTyped* TParseContext::handleVariable(TSourceLoc loc, TSymbol* symbol, TSt // it was a member of an anonymous container, have to insert its dereference const TVariable* variable = anon->getAnonContainer().getAsVariable(); TIntermTyped* container = intermediate.addSymbol(variable->getUniqueId(), variable->getName(), variable->getType(), loc); - TConstUnion* unionArray = new TConstUnion[1]; - unionArray->setUConst(anon->getMemberNumber()); + TConstUnionArray unionArray(1); + unionArray[0].setUConst(anon->getMemberNumber()); TIntermTyped* constNode = intermediate.addConstantUnion(unionArray, TType(EbtUint, EvqConst), loc); node = intermediate.addIndex(EOpIndexDirectStruct, container, constNode, loc); @@ -483,10 +483,9 @@ TIntermTyped* TParseContext::handleVariable(TSourceLoc loc, TSymbol* symbol, TSt // don't delete $1.string, it's used by error recovery, and the pool // pop will reclaim the memory - if (variable->getType().getQualifier().storage == EvqConst ) { - TConstUnion* constArray = variable->getConstUnionPointer(); - node = intermediate.addConstantUnion(constArray, variable->getType(), loc); - } else + if (variable->getType().getQualifier().storage == EvqConst) + node = intermediate.addConstantUnion(variable->getConstArray(), variable->getType(), loc); + else node = intermediate.addSymbol(variable->getUniqueId(), variable->getName(), variable->getType(), loc); } @@ -509,30 +508,30 @@ TIntermTyped* TParseContext::handleBracketDereference(TSourceLoc loc, TIntermTyp } else if (base->getType().getQualifier().storage == EvqConst && index->getQualifier().storage == EvqConst) { if (base->isArray()) { // constant folding for arrays - result = addConstArrayNode(index->getAsConstantUnion()->getUnionArrayPointer()->getIConst(), base, loc); + result = addConstArrayNode(index->getAsConstantUnion()->getConstArray()[0].getIConst(), base, loc); } else if (base->isVector()) { // constant folding for vectors TVectorFields fields; fields.num = 1; - fields.offsets[0] = index->getAsConstantUnion()->getUnionArrayPointer()->getIConst(); // need to do it this way because v.xy sends fields integer array + fields.offsets[0] = index->getAsConstantUnion()->getConstArray()[0].getIConst(); // need to do it this way because v.xy sends fields integer array result = addConstVectorNode(fields, base, loc); } else if (base->isMatrix()) { // constant folding for matrices - result = addConstMatrixNode(index->getAsConstantUnion()->getUnionArrayPointer()->getIConst(), base, loc); + result = addConstMatrixNode(index->getAsConstantUnion()->getConstArray()[0].getIConst(), base, loc); } } else { if (index->getQualifier().storage == EvqConst) { - int indexValue = index->getAsConstantUnion()->getUnionArrayPointer()->getIConst(); + int indexValue = index->getAsConstantUnion()->getConstArray()[0].getIConst(); if (! base->isArray() && (base->isVector() && base->getType().getVectorSize() <= indexValue || base->isMatrix() && base->getType().getMatrixCols() <= indexValue)) - error(loc, "", "[", "index out of range '%d'", index->getAsConstantUnion()->getUnionArrayPointer()->getIConst()); + error(loc, "", "[", "index out of range '%d'", index->getAsConstantUnion()->getConstArray()[0].getIConst()); if (base->isArray()) { if (base->getType().getArraySize() == 0) { - if (base->getType().getMaxArraySize() <= index->getAsConstantUnion()->getUnionArrayPointer()->getIConst()) - arraySetMaxSize(loc, base->getAsSymbolNode(), index->getAsConstantUnion()->getUnionArrayPointer()->getIConst() + 1); - } else if ( index->getAsConstantUnion()->getUnionArrayPointer()->getIConst() >= base->getType().getArraySize() || - index->getAsConstantUnion()->getUnionArrayPointer()->getIConst() < 0) - error(loc, "", "[", "array index out of range '%d'", index->getAsConstantUnion()->getUnionArrayPointer()->getIConst()); + if (base->getType().getMaxArraySize() <= index->getAsConstantUnion()->getConstArray()[0].getIConst()) + arraySetMaxSize(loc, base->getAsSymbolNode(), index->getAsConstantUnion()->getConstArray()[0].getIConst() + 1); + } else if ( index->getAsConstantUnion()->getConstArray()[0].getIConst() >= base->getType().getArraySize() || + index->getAsConstantUnion()->getConstArray()[0].getIConst() < 0) + error(loc, "", "[", "array index out of range '%d'", index->getAsConstantUnion()->getConstArray()[0].getIConst()); } result = intermediate.addIndex(EOpIndexDirect, base, index, loc); } else { @@ -550,8 +549,8 @@ TIntermTyped* TParseContext::handleBracketDereference(TSourceLoc loc, TIntermTyp } if (result == 0) { - TConstUnion *unionArray = new TConstUnion[1]; - unionArray->setDConst(0.0); + TConstUnionArray unionArray(1); + unionArray[0].setDConst(0.0); result = intermediate.addConstantUnion(unionArray, TType(EbtFloat, EvqConst), loc); } else { TType newType; @@ -599,8 +598,8 @@ TIntermTyped* TParseContext::handleDotDereference(TSourceLoc loc, TIntermTyped* result->setType(TType(base->getBasicType(), EvqConst, (int) (field).size())); } else { if (fields.num == 1) { - TConstUnion *unionArray = new TConstUnion[1]; - unionArray->setIConst(fields.offsets[0]); + TConstUnionArray unionArray(1); + unionArray[0].setIConst(fields.offsets[0]); TIntermTyped* index = intermediate.addConstantUnion(unionArray, TType(EbtInt, EvqConst), loc); result = intermediate.addIndex(EOpIndexDirect, base, index, loc); result->setType(TType(base->getBasicType(), EvqTemporary, base->getType().getQualifier().precision)); @@ -638,8 +637,8 @@ TIntermTyped* TParseContext::handleDotDereference(TSourceLoc loc, TIntermTyped* result->getWritableType().getQualifier().storage = EvqConst; } } else { - TConstUnion *unionArray = new TConstUnion[1]; - unionArray->setIConst(i); + TConstUnionArray unionArray(1); + unionArray[0].setIConst(i); TIntermTyped* index = intermediate.addConstantUnion(unionArray, TType(EbtInt, EvqConst), loc); result = intermediate.addIndex(EOpIndexDirectStruct, base, index, loc); result->setType(*(*fields)[i].type); @@ -761,8 +760,8 @@ TIntermTyped* TParseContext::handleFunctionCall(TSourceLoc loc, TFunction* fnCal } else length = intermNode->getAsTyped()->getType().getArraySize(); - TConstUnion *unionArray = new TConstUnion[1]; - unionArray->setIConst(length); + TConstUnionArray unionArray(1); + unionArray[0].setIConst(length); result = intermediate.addConstantUnion(unionArray, TType(EbtInt, EvqConst), loc); } else if (op != EOpNull) { // @@ -836,8 +835,8 @@ TIntermTyped* TParseContext::handleFunctionCall(TSourceLoc loc, TFunction* fnCal } else { // error message was put out by PaFindFunction() // Put on a dummy node for error recovery - TConstUnion *unionArray = new TConstUnion[1]; - unionArray->setDConst(0.0); + TConstUnionArray unionArray(1); + unionArray[0].setDConst(0.0); result = intermediate.addConstantUnion(unionArray, TType(EbtFloat, EvqConst), loc); } } @@ -1074,7 +1073,7 @@ bool TParseContext::lValueErrorCheck(TSourceLoc loc, const char* op, TIntermType for (TIntermSequence::iterator p = aggrNode->getSequence().begin(); p != aggrNode->getSequence().end(); p++) { - int value = (*p)->getAsTyped()->getAsConstantUnion()->getUnionArrayPointer()->getIConst(); + int value = (*p)->getAsTyped()->getAsConstantUnion()->getConstArray()[0].getIConst(); offset[value]++; if (offset[value] > 1) { error(loc, " l-value of swizzle cannot have duplicate components", op, "", ""); @@ -1631,7 +1630,7 @@ void TParseContext::arraySizeCheck(TSourceLoc loc, TIntermTyped* expr, int& size return; } - size = constant->getUnionArrayPointer()->getIConst(); + size = constant->getConstArray()[0].getIConst(); if (size <= 0) { error(loc, "array size must be a positive integer", "", ""); @@ -1767,7 +1766,7 @@ bool TParseContext::arraySetMaxSize(TSourceLoc loc, TIntermSymbol *node, int siz // return true; // } - // int texCoordValue = texCoord->getAsVariable()->getConstUnionPointer()[0].getIConst(); + // int texCoordValue = texCoord->getAsVariable()->getConstArray()[0].getIConst(); // if (texCoordValue <= size) { // error(loc, "", "[", "gl_TexCoord can only have a max array size of up to gl_MaxTextureCoords", ""); // return true; @@ -2087,8 +2086,8 @@ TIntermNode* TParseContext::executeInitializer(TSourceLoc loc, TString& identifi // // test for and propagate constant // - if (qualifier == EvqConst) { - if (qualifier != initializer->getType().getQualifier().storage) { + if (qualifier == EvqConst || qualifier == EvqUniform) { + if (initializer->getType().getQualifier().storage != EvqConst) { error(loc, " assigning non-constant to", "=", "'%s'", variable->getType().getCompleteString().c_str()); variable->getWritableType().getQualifier().storage = EvqTemporary; return 0; @@ -2099,20 +2098,13 @@ TIntermNode* TParseContext::executeInitializer(TSourceLoc loc, TString& identifi variable->getWritableType().getQualifier().storage = EvqTemporary; return 0; } - if (initializer->getAsConstantUnion()) { - TConstUnion* unionArray = variable->getConstUnionPointer(); - - if (type.getObjectSize() == 1 && type.getBasicType() != EbtStruct) { - *unionArray = (initializer->getAsConstantUnion()->getUnionArrayPointer())[0]; - } else { - variable->shareConstPointer(initializer->getAsConstantUnion()->getUnionArrayPointer()); - } - } else if (initializer->getAsSymbolNode()) { + if (initializer->getAsConstantUnion()) + variable->setConstArray(initializer->getAsConstantUnion()->getConstArray()); + else if (initializer->getAsSymbolNode()) { TSymbol* symbol = symbolTable.find(initializer->getAsSymbolNode()->getName()); - if (const TVariable* tVar = symbol->getAsVariable()) { - TConstUnion* constArray = tVar->getConstUnionPointer(); - variable->shareConstPointer(constArray); - } else { + if (const TVariable* tVar = symbol->getAsVariable()) + variable->setConstArray(tVar->getConstArray()); + else { error(loc, "expected variable", initializer->getAsSymbolNode()->getName().c_str(), ""); return 0; } @@ -2121,16 +2113,14 @@ TIntermNode* TParseContext::executeInitializer(TSourceLoc loc, TString& identifi variable->getWritableType().getQualifier().storage = EvqTemporary; return 0; } - } - - if (qualifier != EvqConst) { + } else { TIntermSymbol* intermSymbol = intermediate.addSymbol(variable->getUniqueId(), variable->getName(), variable->getType(), loc); TIntermNode* initNode = intermediate.addAssign(EOpAssign, intermSymbol, initializer, loc); if (! initNode) assignError(loc, "=", intermSymbol->getCompleteString(), initializer->getCompleteString()); return initNode; - } + } return 0; } @@ -2559,8 +2549,8 @@ void TParseContext::wrapupSwitchSubsequence(TIntermAggregate* statements, TInter newExpression != 0 && prevExpression->getAsConstantUnion() && newExpression->getAsConstantUnion() && - prevExpression->getAsConstantUnion()->getUnionArrayPointer()->getIConst() == - newExpression->getAsConstantUnion()->getUnionArrayPointer()->getIConst()) + prevExpression->getAsConstantUnion()->getConstArray()[0].getIConst() == + newExpression->getAsConstantUnion()->getConstArray()[0].getIConst()) error(branchNode->getLoc(), "duplicated value", "case", ""); } } @@ -2617,22 +2607,16 @@ TIntermTyped* TParseContext::addConstVectorNode(TVectorFields& fields, TIntermTy TIntermTyped* typedNode; TIntermConstantUnion* tempConstantNode = node->getAsConstantUnion(); - TConstUnion *unionArray; - if (tempConstantNode) { - unionArray = tempConstantNode->getUnionArrayPointer(); - - if (!unionArray) { // this error message should never be raised - infoSink.info.message(EPrefixInternalError, "TConstUnion not initialized in addConstVectorNode function", loc); - - return node; - } - } else { // The node has to be either a symbol node or an aggregate node or a tempConstant node, else, its an error + TConstUnionArray unionArray; + if (tempConstantNode) + unionArray = tempConstantNode->getConstArray(); + else { // The node has to be either a symbol node or an aggregate node or a tempConstant node, else, its an error error(loc, "Cannot offset into the vector", "Error", ""); return 0; } - TConstUnion* constArray = new TConstUnion[fields.num]; + TConstUnionArray constArray(fields.num); for (int i = 0; i < fields.num; i++) { if (fields.offsets[i] >= node->getType().getObjectSize()) { @@ -2664,10 +2648,10 @@ TIntermTyped* TParseContext::addConstMatrixNode(int index, TIntermTyped* node, T } if (tempConstantNode) { - TConstUnion* unionArray = tempConstantNode->getUnionArrayPointer(); - int size = tempConstantNode->getType().getMatrixRows(); - // Note: the type is corrected (dereferenced) by the caller - typedNode = intermediate.addConstantUnion(&unionArray[size*index], tempConstantNode->getType(), loc); + const TConstUnionArray& unionArray = tempConstantNode->getConstArray(); + int size = tempConstantNode->getType().getMatrixRows(); + // Note: the type is corrected (dereferenced) by the caller + typedNode = intermediate.addConstantUnion(TConstUnionArray(unionArray, size * index, size), tempConstantNode->getType(), loc); } else { error(loc, "Cannot offset into the matrix", "Error", ""); @@ -2701,8 +2685,8 @@ TIntermTyped* TParseContext::addConstArrayNode(int index, TIntermTyped* node, TS int arrayElementSize = arrayElementType.getObjectSize(); if (tempConstantNode) { - TConstUnion* unionArray = tempConstantNode->getUnionArrayPointer(); - typedNode = intermediate.addConstantUnion(&unionArray[arrayElementSize * index], tempConstantNode->getType(), loc); + typedNode = intermediate.addConstantUnion(TConstUnionArray(tempConstantNode->getConstArray(), arrayElementSize * index, arrayElementSize), + tempConstantNode->getType(), loc); } else { error(loc, "Cannot offset into the array", "Error", ""); @@ -2722,22 +2706,24 @@ TIntermTyped* TParseContext::addConstStruct(TString& identifier, TIntermTyped* n { TTypeList* fields = node->getType().getStruct(); TIntermTyped *typedNode; - int instanceSize = 0; + int instanceOffset = 0; + int instanceSize; unsigned int index = 0; TIntermConstantUnion *tempConstantNode = node->getAsConstantUnion(); for ( index = 0; index < fields->size(); ++index) { - if ((*fields)[index].type->getFieldName() == identifier) { + instanceSize = (*fields)[index].type->getObjectSize(); + + if ((*fields)[index].type->getFieldName() == identifier) break; - } else { - instanceSize += (*fields)[index].type->getObjectSize(); - } + + instanceOffset += instanceSize; } if (tempConstantNode) { - TConstUnion* constArray = tempConstantNode->getUnionArrayPointer(); - - typedNode = intermediate.addConstantUnion(constArray+instanceSize, tempConstantNode->getType(), loc); // type will be changed in the calling function + typedNode = intermediate.addConstantUnion(TConstUnionArray(tempConstantNode->getConstArray(), instanceOffset, instanceSize), + tempConstantNode->getType(), loc); + // type will be changed in the calling function } else { error(loc, "Cannot offset into the structure", "Error", ""); diff --git a/glslang/MachineIndependent/ParseHelper.h b/glslang/MachineIndependent/ParseHelper.h index a4bfbfd..f32c748 100644 --- a/glslang/MachineIndependent/ParseHelper.h +++ b/glslang/MachineIndependent/ParseHelper.h @@ -171,7 +171,6 @@ protected: void declareArray(TSourceLoc, TString& identifier, const TType&, TVariable*&, bool& newDeclaration); TIntermNode* executeInitializer(TSourceLoc, TString& identifier, TType&, TIntermTyped* initializer, TVariable* variable); - public: // // Generally, bison productions, the scanner, and the PP need read/write access to these; just give them direct access diff --git a/glslang/MachineIndependent/SymbolTable.cpp b/glslang/MachineIndependent/SymbolTable.cpp index 8e1c79d..ee964de 100644 --- a/glslang/MachineIndependent/SymbolTable.cpp +++ b/glslang/MachineIndependent/SymbolTable.cpp @@ -231,13 +231,13 @@ TVariable::TVariable(const TVariable& copyOf, TStructureMap& remapper) : TSymbol type.deepCopy(copyOf.type, remapper); userType = copyOf.userType; - if (copyOf.unionArray) { + if (! copyOf.unionArray.empty()) { assert(!copyOf.type.getStruct()); assert(copyOf.type.getObjectSize() == 1); - unionArray = new TConstUnion[1]; - unionArray[0] = copyOf.unionArray[0]; - } else - unionArray = 0; + TConstUnionArray newArray(1); + newArray[0] = copyOf.unionArray[0]; + unionArray = newArray; + } } TVariable* TVariable::clone(TStructureMap& remapper) diff --git a/glslang/MachineIndependent/SymbolTable.h b/glslang/MachineIndependent/SymbolTable.h index 0b30723..d3831bb 100644 --- a/glslang/MachineIndependent/SymbolTable.h +++ b/glslang/MachineIndependent/SymbolTable.h @@ -125,7 +125,7 @@ protected: // class TVariable : public TSymbol { public: - TVariable(const TString *name, const TType& t, bool uT = false ) : TSymbol(name), userType(uT), unionArray(0) { type.shallowCopy(t); } + TVariable(const TString *name, const TType& t, bool uT = false ) : TSymbol(name), userType(uT) { type.shallowCopy(t); } virtual TVariable* clone(TStructureMap& remapper); virtual ~TVariable() { } @@ -137,21 +137,8 @@ public: virtual void dump(TInfoSink &infoSink) const; - TConstUnion* getConstUnionPointer() - { - if (!unionArray) - unionArray = new TConstUnion[type.getObjectSize()]; - - return unionArray; - } - - TConstUnion* getConstUnionPointer() const { return unionArray; } - - void shareConstPointer( TConstUnion *constArray) - { - delete unionArray; - unionArray = constArray; - } + const TConstUnionArray& getConstArray() const { return unionArray; } + void setConstArray(const TConstUnionArray& constArray) { unionArray = constArray; } protected: explicit TVariable(const TVariable&); @@ -162,7 +149,7 @@ protected: bool userType; // we are assuming that Pool Allocator will free the memory allocated to unionArray // when this object is destroyed - TConstUnion *unionArray; + TConstUnionArray unionArray; }; // diff --git a/glslang/MachineIndependent/glslang.y b/glslang/MachineIndependent/glslang.y index 614bf41..af986bd 100644 --- a/glslang/MachineIndependent/glslang.y +++ b/glslang/MachineIndependent/glslang.y @@ -226,30 +226,30 @@ primary_expression $$ = $1; } | INTCONSTANT { - TConstUnion *unionArray = new TConstUnion[1]; - unionArray->setIConst($1.i); + TConstUnionArray unionArray(1); + unionArray[0].setIConst($1.i); $$ = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtInt, EvqConst), $1.loc); } | UINTCONSTANT { parseContext.fullIntegerCheck($1.loc, "unsigned literal"); - TConstUnion *unionArray = new TConstUnion[1]; - unionArray->setUConst($1.u); + TConstUnionArray unionArray(1); + unionArray[0].setUConst($1.u); $$ = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtUint, EvqConst), $1.loc); } | FLOATCONSTANT { - TConstUnion *unionArray = new TConstUnion[1]; - unionArray->setDConst($1.d); + TConstUnionArray unionArray(1); + unionArray[0].setDConst($1.d); $$ = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtFloat, EvqConst), $1.loc); } | DOUBLECONSTANT { parseContext.doubleCheck($1.loc, "double literal"); - TConstUnion *unionArray = new TConstUnion[1]; - unionArray->setDConst($1.d); + TConstUnionArray unionArray(1); + unionArray[0].setDConst($1.d); $$ = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtDouble, EvqConst), $1.loc); } | BOOLCONSTANT { - TConstUnion *unionArray = new TConstUnion[1]; - unionArray->setBConst($1.b); + TConstUnionArray unionArray(1); + unionArray[0].setBConst($1.b); $$ = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtBool, EvqConst), $1.loc); } | LEFT_PAREN expression RIGHT_PAREN { @@ -515,8 +515,8 @@ relational_expression $$ = parseContext.intermediate.addBinaryMath(EOpLessThan, $1, $3, $2.loc); if ($$ == 0) { parseContext.binaryOpError($2.loc, "<", $1->getCompleteString(), $3->getCompleteString()); - TConstUnion *unionArray = new TConstUnion[1]; - unionArray->setBConst(false); + TConstUnionArray unionArray(1); + unionArray[0].setBConst(false); $$ = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtBool, EvqConst), $2.loc); } } @@ -524,8 +524,8 @@ relational_expression $$ = parseContext.intermediate.addBinaryMath(EOpGreaterThan, $1, $3, $2.loc); if ($$ == 0) { parseContext.binaryOpError($2.loc, ">", $1->getCompleteString(), $3->getCompleteString()); - TConstUnion *unionArray = new TConstUnion[1]; - unionArray->setBConst(false); + TConstUnionArray unionArray(1); + unionArray[0].setBConst(false); $$ = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtBool, EvqConst), $2.loc); } } @@ -533,8 +533,8 @@ relational_expression $$ = parseContext.intermediate.addBinaryMath(EOpLessThanEqual, $1, $3, $2.loc); if ($$ == 0) { parseContext.binaryOpError($2.loc, "<=", $1->getCompleteString(), $3->getCompleteString()); - TConstUnion *unionArray = new TConstUnion[1]; - unionArray->setBConst(false); + TConstUnionArray unionArray(1); + unionArray[0].setBConst(false); $$ = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtBool, EvqConst), $2.loc); } } @@ -542,8 +542,8 @@ relational_expression $$ = parseContext.intermediate.addBinaryMath(EOpGreaterThanEqual, $1, $3, $2.loc); if ($$ == 0) { parseContext.binaryOpError($2.loc, ">=", $1->getCompleteString(), $3->getCompleteString()); - TConstUnion *unionArray = new TConstUnion[1]; - unionArray->setBConst(false); + TConstUnionArray unionArray(1); + unionArray[0].setBConst(false); $$ = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtBool, EvqConst), $2.loc); } } @@ -555,8 +555,8 @@ equality_expression $$ = parseContext.intermediate.addBinaryMath(EOpEqual, $1, $3, $2.loc); if ($$ == 0) { parseContext.binaryOpError($2.loc, "==", $1->getCompleteString(), $3->getCompleteString()); - TConstUnion *unionArray = new TConstUnion[1]; - unionArray->setBConst(false); + TConstUnionArray unionArray(1); + unionArray[0].setBConst(false); $$ = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtBool, EvqConst), $2.loc); } else if (($1->isArray() || $3->isArray())) parseContext.profileRequires($2.loc, ENoProfile, 120, "GL_3DL_array_objects", "=="); @@ -565,8 +565,8 @@ equality_expression $$ = parseContext.intermediate.addBinaryMath(EOpNotEqual, $1, $3, $2.loc); if ($$ == 0) { parseContext.binaryOpError($2.loc, "!=", $1->getCompleteString(), $3->getCompleteString()); - TConstUnion *unionArray = new TConstUnion[1]; - unionArray->setBConst(false); + TConstUnionArray unionArray(1); + unionArray[0].setBConst(false); $$ = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtBool, EvqConst), $2.loc); } else if (($1->isArray() || $3->isArray())) parseContext.profileRequires($2.loc, ENoProfile, 120, "GL_3DL_array_objects", "!="); @@ -615,8 +615,8 @@ logical_and_expression $$ = parseContext.intermediate.addBinaryMath(EOpLogicalAnd, $1, $3, $2.loc); if ($$ == 0) { parseContext.binaryOpError($2.loc, "&&", $1->getCompleteString(), $3->getCompleteString()); - TConstUnion *unionArray = new TConstUnion[1]; - unionArray->setBConst(false); + TConstUnionArray unionArray(1); + unionArray[0].setBConst(false); $$ = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtBool, EvqConst), $2.loc); } } @@ -628,8 +628,8 @@ logical_xor_expression $$ = parseContext.intermediate.addBinaryMath(EOpLogicalXor, $1, $3, $2.loc); if ($$ == 0) { parseContext.binaryOpError($2.loc, "^^", $1->getCompleteString(), $3->getCompleteString()); - TConstUnion *unionArray = new TConstUnion[1]; - unionArray->setBConst(false); + TConstUnionArray unionArray(1); + unionArray[0].setBConst(false); $$ = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtBool, EvqConst), $2.loc); } } @@ -641,8 +641,8 @@ logical_or_expression $$ = parseContext.intermediate.addBinaryMath(EOpLogicalOr, $1, $3, $2.loc); if ($$ == 0) { parseContext.binaryOpError($2.loc, "||", $1->getCompleteString(), $3->getCompleteString()); - TConstUnion *unionArray = new TConstUnion[1]; - unionArray->setBConst(false); + TConstUnionArray unionArray(1); + unionArray[0].setBConst(false); $$ = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtBool, EvqConst), $2.loc); } } diff --git a/glslang/MachineIndependent/intermOut.cpp b/glslang/MachineIndependent/intermOut.cpp index d6b618e..b2fe2d5 100644 --- a/glslang/MachineIndependent/intermOut.cpp +++ b/glslang/MachineIndependent/intermOut.cpp @@ -62,7 +62,7 @@ public: // Helper functions for printing, not part of traversing. // -void OutputTreeText(TInfoSink& infoSink, TIntermNode* node, const int depth) +void OutputTreeText(TInfoSink& infoSink, const TIntermNode* node, const int depth) { int i; @@ -85,21 +85,6 @@ void OutputTreeText(TInfoSink& infoSink, TIntermNode* node, const int depth) // return false. // -void OutputSymbol(TIntermSymbol* node, TIntermTraverser* it) -{ - TOutputTraverser* oit = static_cast(it); - - OutputTreeText(oit->infoSink, node, oit->depth); - - const int maxSize = GlslangMaxTypeLength + GlslangMaxTokenLength; - char buf[maxSize]; - snprintf(buf, maxSize, "'%s' (%s)\n", - node->getName().c_str(), - node->getCompleteString().c_str()); - - oit->infoSink.debug << buf; -} - bool OutputBinary(bool /* preVisit */, TIntermBinary* node, TIntermTraverser* it) { TOutputTraverser* oit = static_cast(it); @@ -127,7 +112,7 @@ bool OutputBinary(bool /* preVisit */, TIntermBinary* node, TIntermTraverser* it case EOpIndexDirect: out.debug << "direct index"; break; case EOpIndexIndirect: out.debug << "indirect index"; break; case EOpIndexDirectStruct: - out.debug << (*node->getLeft()->getType().getStruct())[node->getRight()->getAsConstantUnion()->getUnionArrayPointer()->getIConst()].type->getFieldName(); + out.debug << (*node->getLeft()->getType().getStruct())[node->getRight()->getAsConstantUnion()->getConstArray()[0].getIConst()].type->getFieldName(); out.debug << ": direct index for structure"; break; case EOpVectorSwizzle: out.debug << "vector swizzle"; break; @@ -417,18 +402,15 @@ bool OutputSelection(bool /* preVisit */, TIntermSelection* node, TIntermTravers return false; } -void OutputConstantUnion(TIntermConstantUnion* node, TIntermTraverser* it) +void OutputConstantUnion(TInfoSink& out, const TIntermTyped* node, const TConstUnionArray& constUnion, int depth) { - TOutputTraverser* oit = static_cast(it); - TInfoSink& out = oit->infoSink; - int size = node->getType().getObjectSize(); for (int i = 0; i < size; i++) { - OutputTreeText(out, node, oit->depth); - switch (node->getUnionArrayPointer()[i].getType()) { + OutputTreeText(out, node, depth); + switch (constUnion[i].getType()) { case EbtBool: - if (node->getUnionArrayPointer()[i].getBConst()) + if (constUnion[i].getBConst()) out.debug << "true"; else out.debug << "false"; @@ -442,7 +424,7 @@ void OutputConstantUnion(TIntermConstantUnion* node, TIntermTraverser* it) { const int maxSize = 300; char buf[maxSize]; - snprintf(buf, maxSize, "%f", node->getUnionArrayPointer()[i].getDConst()); + snprintf(buf, maxSize, "%f", constUnion[i].getDConst()); out.debug << buf << "\n"; } @@ -451,7 +433,7 @@ void OutputConstantUnion(TIntermConstantUnion* node, TIntermTraverser* it) { const int maxSize = 300; char buf[maxSize]; - snprintf(buf, maxSize, "%d (%s)", node->getUnionArrayPointer()[i].getIConst(), "const int"); + snprintf(buf, maxSize, "%d (%s)", constUnion[i].getIConst(), "const int"); out.debug << buf << "\n"; } @@ -460,7 +442,7 @@ void OutputConstantUnion(TIntermConstantUnion* node, TIntermTraverser* it) { const int maxSize = 300; char buf[maxSize]; - snprintf(buf, maxSize, "%u (%s)", node->getUnionArrayPointer()[i].getUConst(), "const uint"); + snprintf(buf, maxSize, "%u (%s)", constUnion[i].getUConst(), "const uint"); out.debug << buf << "\n"; } @@ -472,6 +454,34 @@ void OutputConstantUnion(TIntermConstantUnion* node, TIntermTraverser* it) } } +void OutputConstantUnion(TIntermConstantUnion* node, TIntermTraverser* it) +{ + TOutputTraverser* oit = static_cast(it); + TInfoSink& out = oit->infoSink; + + OutputTreeText(oit->infoSink, node, oit->depth); + oit->infoSink.debug << "Constant:\n"; + + OutputConstantUnion(oit->infoSink, node, node->getConstArray(), oit->depth + 1); +} + +void OutputSymbol(TIntermSymbol* node, TIntermTraverser* it) +{ + TOutputTraverser* oit = static_cast(it); + + OutputTreeText(oit->infoSink, node, oit->depth); + + const int maxSize = GlslangMaxTypeLength + GlslangMaxTokenLength; + char buf[maxSize]; + snprintf(buf, maxSize, "'%s' (%s)\n", + node->getName().c_str(), + node->getCompleteString().c_str()); + oit->infoSink.debug << buf; + + if (! node->getConstArray().empty()) + OutputConstantUnion(oit->infoSink, node, node->getConstArray(), oit->depth + 1); +} + bool OutputLoop(bool /* preVisit */, TIntermLoop* node, TIntermTraverser* it) { TOutputTraverser* oit = static_cast(it); diff --git a/glslang/MachineIndependent/localintermediate.h b/glslang/MachineIndependent/localintermediate.h index 9b92244..3992e26 100644 --- a/glslang/MachineIndependent/localintermediate.h +++ b/glslang/MachineIndependent/localintermediate.h @@ -87,9 +87,9 @@ public: TIntermTyped* addSelection(TIntermTyped* cond, TIntermTyped* trueBlock, TIntermTyped* falseBlock, TSourceLoc); TIntermTyped* addComma(TIntermTyped* left, TIntermTyped* right, TSourceLoc); TIntermTyped* addMethod(TIntermTyped*, const TType&, const TString*, TSourceLoc); - TIntermConstantUnion* addConstantUnion(TConstUnion*, const TType&, TSourceLoc); + TIntermConstantUnion* addConstantUnion(const TConstUnionArray&, const TType&, TSourceLoc); TIntermTyped* promoteConstantUnion(TBasicType, TIntermConstantUnion*) ; - bool parseConstTree(TSourceLoc, TIntermNode*, TConstUnion*, TOperator, const TType&, bool singleConstantParam = false); + bool parseConstTree(TSourceLoc, TIntermNode*, TConstUnionArray, TOperator, const TType&, bool singleConstantParam = false); TIntermNode* addLoop(TIntermNode*, TIntermTyped*, TIntermTyped*, bool testFirst, TSourceLoc); TIntermBranch* addBranch(TOperator, TSourceLoc); TIntermBranch* addBranch(TOperator, TIntermTyped*, TSourceLoc); diff --git a/glslang/MachineIndependent/parseConst.cpp b/glslang/MachineIndependent/parseConst.cpp index 54ee791..a5280db 100644 --- a/glslang/MachineIndependent/parseConst.cpp +++ b/glslang/MachineIndependent/parseConst.cpp @@ -43,11 +43,11 @@ namespace glslang { class TConstTraverser : public TIntermTraverser { public: - TConstTraverser(TConstUnion* cUnion, bool singleConstParam, TOperator constructType, const TType& t) : unionArray(cUnion), type(t), + TConstTraverser(const TConstUnionArray& cUnion, bool singleConstParam, TOperator constructType, const TType& t) : unionArray(cUnion), type(t), constructorType(constructType), singleConstantParam(singleConstParam), error(false), isMatrix(false), matrixCols(0), matrixRows(0) { index = 0; tOp = EOpNull;} - int index ; - TConstUnion *unionArray; + int index; + TConstUnionArray unionArray; TOperator tOp; const TType& type; TOperator constructorType; @@ -112,7 +112,7 @@ bool ParseAggregate(bool /* preVisit */, TIntermAggregate* node, TIntermTraverse void ParseConstantUnion(TIntermConstantUnion* node, TIntermTraverser* it) { TConstTraverser* oit = static_cast(it); - TConstUnion* leftUnionArray = oit->unionArray; + TConstUnionArray leftUnionArray(oit->unionArray); int instanceSize = oit->type.getObjectSize(); if (oit->index >= instanceSize) @@ -121,7 +121,7 @@ void ParseConstantUnion(TIntermConstantUnion* node, TIntermTraverser* it) if (!oit->singleConstantParam) { int size = node->getType().getObjectSize(); - TConstUnion *rightUnionArray = node->getUnionArrayPointer(); + const TConstUnionArray& rightUnionArray = node->getConstArray(); for (int i=0; i < size; i++) { if (oit->index >= instanceSize) return; @@ -137,7 +137,7 @@ void ParseConstantUnion(TIntermConstantUnion* node, TIntermTraverser* it) matrixRows = oit->matrixRows; isMatrix = oit->isMatrix; totalSize = oit->index + size; - TConstUnion *rightUnionArray = node->getUnionArrayPointer(); + const TConstUnionArray& rightUnionArray = node->getConstArray(); if (! isMatrix) { int count = 0; for (int i = oit->index; i < totalSize; i++) { @@ -171,7 +171,7 @@ void ParseConstantUnion(TIntermConstantUnion* node, TIntermTraverser* it) } } -bool TIntermediate::parseConstTree(TSourceLoc line, TIntermNode* root, TConstUnion* unionArray, TOperator constructorType, const TType& t, bool singleConstantParam) +bool TIntermediate::parseConstTree(TSourceLoc line, TIntermNode* root, TConstUnionArray unionArray, TOperator constructorType, const TType& t, bool singleConstantParam) { if (root == 0) return false; -- 2.7.4