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
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user