Backward incompatible: Turn on PureOperatorBuiltins: use only enum-based built-in functions in the AST.

If this breaks your AST consumer, best is to modify it to test
against the enum values instead of doing string comparisons on
built-in function names.  This is the reason the change was made.

If you need the old behavior, you should be able to get it back by changing
PureOperatorBuiltins to be false instead of true.  This path will work for
a while, but is marked deprecated.

Also, the old behavior is tagged as release 2.4.
This commit is contained in:
John Kessenich
2015-08-19 13:34:18 -06:00
parent a32d8f620d
commit fc51d284aa
41 changed files with 1092 additions and 967 deletions

View File

@@ -9,17 +9,17 @@ Shader version: 430
0:38 Sequence
0:38 move second child to first child (temp 4-component vector of float)
0:38 'v' (temp 4-component vector of float)
0:38 Function Call: texture(s21;vf2; (global 4-component vector of float)
0:38 texture (global 4-component vector of float)
0:38 's2D' (uniform sampler2D)
0:38 'c2D' (smooth in 2-component vector of float)
0:39 add second child into first child (temp 4-component vector of float)
0:39 'v' (temp 4-component vector of float)
0:39 Function Call: textureProj(s31;vf4; (global 4-component vector of float)
0:39 textureProj (global 4-component vector of float)
0:39 's3D' (uniform sampler3D)
0:39 'c4D' (smooth in 4-component vector of float)
0:40 add second child into first child (temp 4-component vector of float)
0:40 'v' (temp 4-component vector of float)
0:40 Function Call: textureLod(sA21;vf3;f1; (global 4-component vector of float)
0:40 textureLod (global 4-component vector of float)
0:40 's2DArray' (uniform sampler2DArray)
0:40 'c3D' (smooth in 3-component vector of float)
0:40 Constant:
@@ -29,7 +29,7 @@ Shader version: 430
0:41 'v' (temp 4-component vector of float)
0:41 Constant:
0:41 1 (const int)
0:41 Function Call: textureOffset(sS21;vf3;vi2;f1; (global float)
0:41 textureOffset (global float)
0:41 's2DShadow' (uniform sampler2DShadow)
0:41 'c3D' (smooth in 3-component vector of float)
0:41 Constant:
@@ -38,13 +38,13 @@ Shader version: 430
0:41 'c1D' (smooth in float)
0:42 add second child into first child (temp 4-component vector of float)
0:42 'v' (temp 4-component vector of float)
0:42 Function Call: texelFetch(s31;vi3;i1; (global 4-component vector of float)
0:42 textureFetch (global 4-component vector of float)
0:42 's3D' (uniform sampler3D)
0:42 'ic3D' (flat in 3-component vector of int)
0:42 'ic1D' (flat in int)
0:43 add second child into first child (temp 4-component vector of float)
0:43 'v' (temp 4-component vector of float)
0:43 Function Call: texelFetchOffset(s21;vi2;i1;vi2; (global 4-component vector of float)
0:43 textureFetchOffset (global 4-component vector of float)
0:43 's2D' (uniform sampler2D)
0:43 'ic2D' (flat in 2-component vector of int)
0:43 Constant:
@@ -57,7 +57,7 @@ Shader version: 430
0:44 'v' (temp 4-component vector of float)
0:44 Constant:
0:44 1 (const int)
0:44 Function Call: textureLodOffset(sS21;vf3;f1;vi2; (global float)
0:44 textureLodOffset (global float)
0:44 's2DShadow' (uniform sampler2DShadow)
0:44 'c3D' (smooth in 3-component vector of float)
0:44 'c1D' (smooth in float)
@@ -66,7 +66,7 @@ Shader version: 430
0:44 3 (const int)
0:45 add second child into first child (temp 4-component vector of float)
0:45 'v' (temp 4-component vector of float)
0:45 Function Call: textureProjLodOffset(s21;vf3;f1;vi2; (global 4-component vector of float)
0:45 textureProjLodOffset (global 4-component vector of float)
0:45 's2D' (uniform sampler2D)
0:45 'c3D' (smooth in 3-component vector of float)
0:45 'c1D' (smooth in float)
@@ -75,7 +75,7 @@ Shader version: 430
0:45 3 (const int)
0:46 add second child into first child (temp 4-component vector of float)
0:46 'v' (temp 4-component vector of float)
0:46 Function Call: textureGrad(sC1;vf3;vf3;vf3; (global 4-component vector of float)
0:46 textureGrad (global 4-component vector of float)
0:46 'sCube' (uniform samplerCube)
0:46 'c3D' (smooth in 3-component vector of float)
0:46 'c3D' (smooth in 3-component vector of float)
@@ -85,7 +85,7 @@ Shader version: 430
0:47 'v' (temp 4-component vector of float)
0:47 Constant:
0:47 0 (const int)
0:47 Function Call: textureGradOffset(sAS21;vf4;vf2;vf2;vi2; (global float)
0:47 textureGradOffset (global float)
0:47 's2DArrayShadow' (uniform sampler2DArrayShadow)
0:47 'c4D' (smooth in 4-component vector of float)
0:47 'c2D' (smooth in 2-component vector of float)
@@ -95,14 +95,14 @@ Shader version: 430
0:47 3 (const int)
0:48 add second child into first child (temp 4-component vector of float)
0:48 'v' (temp 4-component vector of float)
0:48 Function Call: textureProjGrad(s31;vf4;vf3;vf3; (global 4-component vector of float)
0:48 textureProjGrad (global 4-component vector of float)
0:48 's3D' (uniform sampler3D)
0:48 'c4D' (smooth in 4-component vector of float)
0:48 'c3D' (smooth in 3-component vector of float)
0:48 'c3D' (smooth in 3-component vector of float)
0:49 add second child into first child (temp 4-component vector of float)
0:49 'v' (temp 4-component vector of float)
0:49 Function Call: textureProjGradOffset(s21;vf3;vf2;vf2;vi2; (global 4-component vector of float)
0:49 textureProjGradOffset (global 4-component vector of float)
0:49 's2D' (uniform sampler2D)
0:49 'c3D' (smooth in 3-component vector of float)
0:49 'c2D' (smooth in 2-component vector of float)
@@ -113,7 +113,7 @@ Shader version: 430
0:51 Sequence
0:51 move second child to first child (temp 4-component vector of int)
0:51 'iv' (temp 4-component vector of int)
0:51 Function Call: texture(is21;vf2; (global 4-component vector of int)
0:51 texture (global 4-component vector of int)
0:51 'is2D' (uniform isampler2D)
0:51 'c2D' (smooth in 2-component vector of float)
0:52 add second child into first child (temp 4-component vector of float)
@@ -122,7 +122,7 @@ Shader version: 430
0:52 'iv' (temp 4-component vector of int)
0:53 move second child to first child (temp 4-component vector of int)
0:53 'iv' (temp 4-component vector of int)
0:53 Function Call: textureProjOffset(is21;vf4;vi2; (global 4-component vector of int)
0:53 textureProjOffset (global 4-component vector of int)
0:53 'is2D' (uniform isampler2D)
0:53 'c4D' (smooth in 4-component vector of float)
0:53 Constant:
@@ -134,7 +134,7 @@ Shader version: 430
0:54 'iv' (temp 4-component vector of int)
0:55 move second child to first child (temp 4-component vector of int)
0:55 'iv' (temp 4-component vector of int)
0:55 Function Call: textureProjLod(is21;vf3;f1; (global 4-component vector of int)
0:55 textureProjLod (global 4-component vector of int)
0:55 'is2D' (uniform isampler2D)
0:55 'c3D' (smooth in 3-component vector of float)
0:55 'c1D' (smooth in float)
@@ -144,7 +144,7 @@ Shader version: 430
0:56 'iv' (temp 4-component vector of int)
0:57 move second child to first child (temp 4-component vector of int)
0:57 'iv' (temp 4-component vector of int)
0:57 Function Call: textureProjGrad(is21;vf3;vf2;vf2; (global 4-component vector of int)
0:57 textureProjGrad (global 4-component vector of int)
0:57 'is2D' (uniform isampler2D)
0:57 'c3D' (smooth in 3-component vector of float)
0:57 'c2D' (smooth in 2-component vector of float)
@@ -155,7 +155,7 @@ Shader version: 430
0:58 'iv' (temp 4-component vector of int)
0:59 move second child to first child (temp 4-component vector of int)
0:59 'iv' (temp 4-component vector of int)
0:59 Function Call: texture(is31;vf3;f1; (global 4-component vector of int)
0:59 texture (global 4-component vector of int)
0:59 'is3D' (uniform isampler3D)
0:59 'c3D' (smooth in 3-component vector of float)
0:59 Constant:
@@ -166,7 +166,7 @@ Shader version: 430
0:60 'iv' (temp 4-component vector of int)
0:61 move second child to first child (temp 4-component vector of int)
0:61 'iv' (temp 4-component vector of int)
0:61 Function Call: textureLod(isC1;vf3;f1; (global 4-component vector of int)
0:61 textureLod (global 4-component vector of int)
0:61 'isCube' (uniform isamplerCube)
0:61 'c3D' (smooth in 3-component vector of float)
0:61 'c1D' (smooth in float)
@@ -176,7 +176,7 @@ Shader version: 430
0:62 'iv' (temp 4-component vector of int)
0:63 move second child to first child (temp 4-component vector of int)
0:63 'iv' (temp 4-component vector of int)
0:63 Function Call: texelFetch(isA21;vi3;i1; (global 4-component vector of int)
0:63 textureFetch (global 4-component vector of int)
0:63 'is2DArray' (uniform isampler2DArray)
0:63 'ic3D' (flat in 3-component vector of int)
0:63 'ic1D' (flat in int)
@@ -186,7 +186,7 @@ Shader version: 430
0:64 'iv' (temp 4-component vector of int)
0:66 add second child into first child (temp 4-component vector of int)
0:66 'iv' (temp 4-component vector of int)
0:66 Function Call: texelFetch(is2M1;vi2;i1; (global 4-component vector of int)
0:66 textureFetch (global 4-component vector of int)
0:66 'is2Dms' (uniform isampler2DMS)
0:66 'ic2D' (flat in 2-component vector of int)
0:66 'ic1D' (flat in int)
@@ -196,18 +196,18 @@ Shader version: 430
0:67 'iv' (temp 4-component vector of int)
0:68 add second child into first child (temp 4-component vector of float)
0:68 'v' (temp 4-component vector of float)
0:68 Function Call: texelFetch(sB1;i1; (global 4-component vector of float)
0:68 textureFetch (global 4-component vector of float)
0:68 'sb' (uniform samplerBuffer)
0:68 'ic1D' (flat in int)
0:69 add second child into first child (temp 4-component vector of float)
0:69 'v' (temp 4-component vector of float)
0:69 Function Call: texelFetch(sR21;vi2; (global 4-component vector of float)
0:69 textureFetch (global 4-component vector of float)
0:69 'sr' (uniform sampler2DRect)
0:69 'ic2D' (flat in 2-component vector of int)
0:71 Sequence
0:71 move second child to first child (temp 2-component vector of int)
0:71 'iv2' (temp 2-component vector of int)
0:71 Function Call: textureSize(sSC1;i1; (global 2-component vector of int)
0:71 textureSize (global 2-component vector of int)
0:71 'sCubeShadow' (uniform samplerCubeShadow)
0:71 Constant:
0:71 2 (const int)
@@ -263,17 +263,17 @@ Shader version: 430
0:38 Sequence
0:38 move second child to first child (temp 4-component vector of float)
0:38 'v' (temp 4-component vector of float)
0:38 Function Call: texture(s21;vf2; (global 4-component vector of float)
0:38 texture (global 4-component vector of float)
0:38 's2D' (uniform sampler2D)
0:38 'c2D' (smooth in 2-component vector of float)
0:39 add second child into first child (temp 4-component vector of float)
0:39 'v' (temp 4-component vector of float)
0:39 Function Call: textureProj(s31;vf4; (global 4-component vector of float)
0:39 textureProj (global 4-component vector of float)
0:39 's3D' (uniform sampler3D)
0:39 'c4D' (smooth in 4-component vector of float)
0:40 add second child into first child (temp 4-component vector of float)
0:40 'v' (temp 4-component vector of float)
0:40 Function Call: textureLod(sA21;vf3;f1; (global 4-component vector of float)
0:40 textureLod (global 4-component vector of float)
0:40 's2DArray' (uniform sampler2DArray)
0:40 'c3D' (smooth in 3-component vector of float)
0:40 Constant:
@@ -283,7 +283,7 @@ Shader version: 430
0:41 'v' (temp 4-component vector of float)
0:41 Constant:
0:41 1 (const int)
0:41 Function Call: textureOffset(sS21;vf3;vi2;f1; (global float)
0:41 textureOffset (global float)
0:41 's2DShadow' (uniform sampler2DShadow)
0:41 'c3D' (smooth in 3-component vector of float)
0:41 Constant:
@@ -292,13 +292,13 @@ Shader version: 430
0:41 'c1D' (smooth in float)
0:42 add second child into first child (temp 4-component vector of float)
0:42 'v' (temp 4-component vector of float)
0:42 Function Call: texelFetch(s31;vi3;i1; (global 4-component vector of float)
0:42 textureFetch (global 4-component vector of float)
0:42 's3D' (uniform sampler3D)
0:42 'ic3D' (flat in 3-component vector of int)
0:42 'ic1D' (flat in int)
0:43 add second child into first child (temp 4-component vector of float)
0:43 'v' (temp 4-component vector of float)
0:43 Function Call: texelFetchOffset(s21;vi2;i1;vi2; (global 4-component vector of float)
0:43 textureFetchOffset (global 4-component vector of float)
0:43 's2D' (uniform sampler2D)
0:43 'ic2D' (flat in 2-component vector of int)
0:43 Constant:
@@ -311,7 +311,7 @@ Shader version: 430
0:44 'v' (temp 4-component vector of float)
0:44 Constant:
0:44 1 (const int)
0:44 Function Call: textureLodOffset(sS21;vf3;f1;vi2; (global float)
0:44 textureLodOffset (global float)
0:44 's2DShadow' (uniform sampler2DShadow)
0:44 'c3D' (smooth in 3-component vector of float)
0:44 'c1D' (smooth in float)
@@ -320,7 +320,7 @@ Shader version: 430
0:44 3 (const int)
0:45 add second child into first child (temp 4-component vector of float)
0:45 'v' (temp 4-component vector of float)
0:45 Function Call: textureProjLodOffset(s21;vf3;f1;vi2; (global 4-component vector of float)
0:45 textureProjLodOffset (global 4-component vector of float)
0:45 's2D' (uniform sampler2D)
0:45 'c3D' (smooth in 3-component vector of float)
0:45 'c1D' (smooth in float)
@@ -329,7 +329,7 @@ Shader version: 430
0:45 3 (const int)
0:46 add second child into first child (temp 4-component vector of float)
0:46 'v' (temp 4-component vector of float)
0:46 Function Call: textureGrad(sC1;vf3;vf3;vf3; (global 4-component vector of float)
0:46 textureGrad (global 4-component vector of float)
0:46 'sCube' (uniform samplerCube)
0:46 'c3D' (smooth in 3-component vector of float)
0:46 'c3D' (smooth in 3-component vector of float)
@@ -339,7 +339,7 @@ Shader version: 430
0:47 'v' (temp 4-component vector of float)
0:47 Constant:
0:47 0 (const int)
0:47 Function Call: textureGradOffset(sAS21;vf4;vf2;vf2;vi2; (global float)
0:47 textureGradOffset (global float)
0:47 's2DArrayShadow' (uniform sampler2DArrayShadow)
0:47 'c4D' (smooth in 4-component vector of float)
0:47 'c2D' (smooth in 2-component vector of float)
@@ -349,14 +349,14 @@ Shader version: 430
0:47 3 (const int)
0:48 add second child into first child (temp 4-component vector of float)
0:48 'v' (temp 4-component vector of float)
0:48 Function Call: textureProjGrad(s31;vf4;vf3;vf3; (global 4-component vector of float)
0:48 textureProjGrad (global 4-component vector of float)
0:48 's3D' (uniform sampler3D)
0:48 'c4D' (smooth in 4-component vector of float)
0:48 'c3D' (smooth in 3-component vector of float)
0:48 'c3D' (smooth in 3-component vector of float)
0:49 add second child into first child (temp 4-component vector of float)
0:49 'v' (temp 4-component vector of float)
0:49 Function Call: textureProjGradOffset(s21;vf3;vf2;vf2;vi2; (global 4-component vector of float)
0:49 textureProjGradOffset (global 4-component vector of float)
0:49 's2D' (uniform sampler2D)
0:49 'c3D' (smooth in 3-component vector of float)
0:49 'c2D' (smooth in 2-component vector of float)
@@ -367,7 +367,7 @@ Shader version: 430
0:51 Sequence
0:51 move second child to first child (temp 4-component vector of int)
0:51 'iv' (temp 4-component vector of int)
0:51 Function Call: texture(is21;vf2; (global 4-component vector of int)
0:51 texture (global 4-component vector of int)
0:51 'is2D' (uniform isampler2D)
0:51 'c2D' (smooth in 2-component vector of float)
0:52 add second child into first child (temp 4-component vector of float)
@@ -376,7 +376,7 @@ Shader version: 430
0:52 'iv' (temp 4-component vector of int)
0:53 move second child to first child (temp 4-component vector of int)
0:53 'iv' (temp 4-component vector of int)
0:53 Function Call: textureProjOffset(is21;vf4;vi2; (global 4-component vector of int)
0:53 textureProjOffset (global 4-component vector of int)
0:53 'is2D' (uniform isampler2D)
0:53 'c4D' (smooth in 4-component vector of float)
0:53 Constant:
@@ -388,7 +388,7 @@ Shader version: 430
0:54 'iv' (temp 4-component vector of int)
0:55 move second child to first child (temp 4-component vector of int)
0:55 'iv' (temp 4-component vector of int)
0:55 Function Call: textureProjLod(is21;vf3;f1; (global 4-component vector of int)
0:55 textureProjLod (global 4-component vector of int)
0:55 'is2D' (uniform isampler2D)
0:55 'c3D' (smooth in 3-component vector of float)
0:55 'c1D' (smooth in float)
@@ -398,7 +398,7 @@ Shader version: 430
0:56 'iv' (temp 4-component vector of int)
0:57 move second child to first child (temp 4-component vector of int)
0:57 'iv' (temp 4-component vector of int)
0:57 Function Call: textureProjGrad(is21;vf3;vf2;vf2; (global 4-component vector of int)
0:57 textureProjGrad (global 4-component vector of int)
0:57 'is2D' (uniform isampler2D)
0:57 'c3D' (smooth in 3-component vector of float)
0:57 'c2D' (smooth in 2-component vector of float)
@@ -409,7 +409,7 @@ Shader version: 430
0:58 'iv' (temp 4-component vector of int)
0:59 move second child to first child (temp 4-component vector of int)
0:59 'iv' (temp 4-component vector of int)
0:59 Function Call: texture(is31;vf3;f1; (global 4-component vector of int)
0:59 texture (global 4-component vector of int)
0:59 'is3D' (uniform isampler3D)
0:59 'c3D' (smooth in 3-component vector of float)
0:59 Constant:
@@ -420,7 +420,7 @@ Shader version: 430
0:60 'iv' (temp 4-component vector of int)
0:61 move second child to first child (temp 4-component vector of int)
0:61 'iv' (temp 4-component vector of int)
0:61 Function Call: textureLod(isC1;vf3;f1; (global 4-component vector of int)
0:61 textureLod (global 4-component vector of int)
0:61 'isCube' (uniform isamplerCube)
0:61 'c3D' (smooth in 3-component vector of float)
0:61 'c1D' (smooth in float)
@@ -430,7 +430,7 @@ Shader version: 430
0:62 'iv' (temp 4-component vector of int)
0:63 move second child to first child (temp 4-component vector of int)
0:63 'iv' (temp 4-component vector of int)
0:63 Function Call: texelFetch(isA21;vi3;i1; (global 4-component vector of int)
0:63 textureFetch (global 4-component vector of int)
0:63 'is2DArray' (uniform isampler2DArray)
0:63 'ic3D' (flat in 3-component vector of int)
0:63 'ic1D' (flat in int)
@@ -440,7 +440,7 @@ Shader version: 430
0:64 'iv' (temp 4-component vector of int)
0:66 add second child into first child (temp 4-component vector of int)
0:66 'iv' (temp 4-component vector of int)
0:66 Function Call: texelFetch(is2M1;vi2;i1; (global 4-component vector of int)
0:66 textureFetch (global 4-component vector of int)
0:66 'is2Dms' (uniform isampler2DMS)
0:66 'ic2D' (flat in 2-component vector of int)
0:66 'ic1D' (flat in int)
@@ -450,18 +450,18 @@ Shader version: 430
0:67 'iv' (temp 4-component vector of int)
0:68 add second child into first child (temp 4-component vector of float)
0:68 'v' (temp 4-component vector of float)
0:68 Function Call: texelFetch(sB1;i1; (global 4-component vector of float)
0:68 textureFetch (global 4-component vector of float)
0:68 'sb' (uniform samplerBuffer)
0:68 'ic1D' (flat in int)
0:69 add second child into first child (temp 4-component vector of float)
0:69 'v' (temp 4-component vector of float)
0:69 Function Call: texelFetch(sR21;vi2; (global 4-component vector of float)
0:69 textureFetch (global 4-component vector of float)
0:69 'sr' (uniform sampler2DRect)
0:69 'ic2D' (flat in 2-component vector of int)
0:71 Sequence
0:71 move second child to first child (temp 2-component vector of int)
0:71 'iv2' (temp 2-component vector of int)
0:71 Function Call: textureSize(sSC1;i1; (global 2-component vector of int)
0:71 textureSize (global 2-component vector of int)
0:71 'sCubeShadow' (uniform samplerCubeShadow)
0:71 Constant:
0:71 2 (const int)