Array of array: Implement the core functionality: types, constructors, operations.

There will be subsequent commits to refine semantics, esp. version-specific semantics,
as well as I/O functionality and restrictions.

Note: I'm getting white-space differences in the preprocessor test results,
which I'm not checking in.  I think they need to be tagged as binary or something.
This commit is contained in:
John Kessenich 2015-08-10 17:08:55 -06:00
parent b35483587f
commit 65c78a0b62
23 changed files with 1344 additions and 185 deletions

108
Test/430AofA.frag Normal file
View file

@ -0,0 +1,108 @@
#version 430
float[4][5][6] many[1][2][3];
float gu[][7];
float gimp[][]; // ERROR, implicit inner
float g4[4][7];
float g5[5][7];
float[4][7] foo(float a[5][7])
{
float r[7];
r = a[2];
float[](a[0], a[1], r, a[3]); // ERROR, too few dims
float[4][7][4](a[0], a[1], r, a[3]); // ERROR, too many dims
return float[4][7](a[0], a[1], r, a[3]);
return float[][](a[0], a[1], r, a[3]);
return float[][7](a[0], a[1], a[2], a[3]);
}
void bar(float[5][7]) {}
void main()
{
{
float gu[3][4][2];
gu[2][4][1] = 4.0; // ERROR, overflow
}
vec4 ca4[3][2] = vec4[][](vec4[2](vec4(0.0), vec4(1.0)),
vec4[2](vec4(0.0), vec4(1.0)),
vec4[2](vec4(0.0), vec4(1.0)));
vec4 caim[][2] = vec4[][](vec4[2](vec4(4.0), vec4(2.0)),
vec4[2](vec4(4.0), vec4(2.0)),
vec4[2](vec4(4.0), vec4(2.0)));
vec4 caim2[][] = vec4[][](vec4[2](vec4(4.0), vec4(2.0)),
vec4[2](vec4(4.0), vec4(2.0)),
vec4[2](vec4(4.0), vec4(2.0)));
vec4 caim3[3][] = vec4[][](vec4[2](vec4(4.0), vec4(2.0)),
vec4[2](vec4(4.0), vec4(2.0)),
vec4[2](vec4(4.0), vec4(2.0)));
vec4 a4[3][2] = {vec4[](vec4(0.0), vec4(1.0)),
vec4[2](vec4(0.0), vec4(1.0)),
vec4[2](vec4(0.0), vec4(1.0)) };
vec4 aim[][2] = {vec4[2](vec4(4.0), vec4(2.0)),
vec4[](vec4(4.0), vec4(2.0)),
vec4[2](vec4(4.0), vec4(2.0)) };
vec4 aim2[][] = {vec4[2](vec4(4.0), vec4(2.0)),
vec4[2](vec4(4.0), vec4(2.0)),
vec4[](vec4(4.0), vec4(2.0)) };
vec4 aim3[3][] = {vec4[2](vec4(4.0), vec4(2.0)),
vec4[2](vec4(4.0), vec4(2.0)),
vec4[2](vec4(4.0), vec4(2.0)) };
vec4 bad2[3][] = {vec4[2](vec4(4.0), vec4(2.0)), // ERROR
vec4[3](vec4(4.0), vec4(2.0), vec4(5.0)),
vec4[2](vec4(4.0), vec4(2.0)) };
vec4 bad3[3][] = {vec4[3](vec4(4.0), vec4(2.0), vec4(5.0)), // ERROR
vec4[2](vec4(4.0), vec4(2.0)),
vec4[2](vec4(4.0), vec4(2.0)) };
vec4 bad4[4][] = {vec4[2](vec4(4.0), vec4(2.0)), // ERROR
vec4[2](vec4(4.0), vec4(2.0)),
vec4[2](vec4(4.0), vec4(2.0)) };
g4 = foo(g5);
g5 = g4; // ERROR, wrong types
gu = g4; // ERROR, not yet sized
foo(gu); // ERROR, not yet sized
bar(g5);
if (foo(g5) == g4)
;
if (foo(g5) == g5) // ERROR, different types
;
float u[][7];
u[2][2] = 3.0;
float u[5][7];
u[5][2] = 5.0; // ERROR
foo(u);
}
void foo3()
{
float resize1[][5][7];
resize1.length(); // ERROR
resize1[1][4][5] = 2.0;
resize1.length(); // ERROR
float resize1[3][5][7];
resize1.length(); // 3 in AST
resize1[1].length(); // 5 in AST
resize1[1][1].length(); // 7 in AST
resize1[1][1][1].length(); // ERROR
float resize2[][5][7];
float resize2[3][4][7]; // ERROR, inner dim change
float resize3[][5][7];
float resize3[3][5][9]; // ERROR, inner dim changed
float resize4[][5][7];
int resize4[3][5][7]; // ERROR, element type
}

View file

@ -17,7 +17,6 @@ ERROR: 0:34: '.' : cannot apply to an array: flizbit
ERROR: 0:34: 'f' : can't use function syntax on variable
ERROR: 0:34: 'a4' : redefinition
ERROR: 0:35: 'arrays of arrays' : not supported with this profile: none
WARNING: 0:35: 'Not supported yet.' : arrays of arrays
ERROR: 0:36: 'arrays of arrays' : not supported with this profile: none
ERROR: 0:37: 'arrays of arrays' : not supported with this profile: none
ERROR: 0:38: 'arrays of arrays' : not supported with this profile: none

View file

@ -21,7 +21,6 @@ ERROR: 0:85: 'double vector' : not supported with this profile: es
ERROR: 0:86: 'dvec4' : Reserved word.
ERROR: 0:86: 'double vector' : not supported with this profile: es
ERROR: 0:101: 'arrays of arrays' : not supported for this version or the enabled extensions
WARNING: 0:101: 'Not supported yet.' : arrays of arrays
ERROR: 0:102: 'arrays of arrays' : not supported for this version or the enabled extensions
ERROR: 0:102: 'arrays of arrays' : not supported for this version or the enabled extensions
ERROR: 0:103: 'arrays of arrays' : not supported for this version or the enabled extensions

View file

@ -37,7 +37,6 @@ ERROR: 0:111: '' : image variables not declared 'writeonly' must have a format l
ERROR: 0:112: 'out' : cannot be a matrix
ERROR: 0:114: 'in' : cannot be bool
ERROR: 0:115: 'sampler2D' : sampler/image types can only be used in uniform variables or function parameters: ino
WARNING: 0:117: 'Not supported yet.' : arrays of arrays
ERROR: 0:117: 'fragment-shader array-of-array input' : not supported with this profile: es
ERROR: 0:120: 'fragment-shader array-of-struct input' : not supported with this profile: es
ERROR: 0:121: 'fragment-shader array-of-struct input' : not supported with this profile: es

View file

@ -9,7 +9,6 @@ ERROR: 0:58: 'sampler/image' : type requires declaration of default precision qu
ERROR: 0:67: 'textureSamples' : no matching overloaded function found
ERROR: 0:72: 'out' : cannot be bool
ERROR: 0:73: 'sampler2D' : sampler/image types can only be used in uniform variables or function parameters: outo
WARNING: 0:75: 'Not supported yet.' : arrays of arrays
ERROR: 0:75: 'vertex-shader array-of-array output' : not supported with this profile: es
ERROR: 0:78: 'vertex-shader array-of-struct output' : not supported with this profile: es
ERROR: 0:79: 'vertex-shader array-of-struct output' : not supported with this profile: es

View file

@ -1,6 +1,5 @@
310AofA.vert
Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
WARNING: 0:8: 'Not supported yet.' : arrays of arrays
Shader version: 310
0:? Sequence

View file

@ -0,0 +1,803 @@
430AofA.frag
Warning, version 430 is not yet complete; most version-specific features are present, but some are missing.
ERROR: 0:6: '[]' : only outermost dimension of an array of arrays can be implicitly sized
ERROR: 0:14: 'constructor' : constructing non-array constituent from array argument
ERROR: 0:15: 'constructior' : array constructor argument not correct type to construct array element
ERROR: 0:28: '[' : array index out of range '4'
ERROR: 0:56: 'constructor' : cannot convert parameter 2 from 'const 3-element array of 4-component vector of float' to 'temp 2-element array of 4-component vector of float'
ERROR: 0:60: 'constructor' : cannot convert parameter 2 from 'const 2-element array of 4-component vector of float' to 'temp 3-element array of 4-component vector of float'
ERROR: 0:64: '=' : cannot convert from 'temp 3-element array of 2-element array of 4-component vector of float' to 'temp 4-element array of 2-element array of 4-component vector of float'
ERROR: 0:70: 'assign' : cannot convert from 'global 4-element array of 7-element array of float' to 'global 5-element array of 7-element array of float'
ERROR: 0:71: 'assign' : cannot convert from 'global 4-element array of 7-element array of float' to 'global implicitly-sized array of 7-element array of float'
ERROR: 0:73: 'foo' : no matching overloaded function found
ERROR: 0:78: '==' : wrong operand types: no operation '==' exists that takes a left-hand operand of type 'global 4-element array of 7-element array of float' and a right operand of type 'global 5-element array of 7-element array of float' (or there is no acceptable conversion)
ERROR: 0:84: '[' : array index out of range '5'
ERROR: 0:91: 'length' : array must be declared with a size before using this method
ERROR: 0:93: 'length' : array must be declared with a size before using this method
ERROR: 0:98: 'length' : does not operate on this type: temp float
ERROR: 0:98: '' : function call, method, or subroutine call expected
ERROR: 0:98: '' : no matching overloaded function found
ERROR: 0:101: 'resize2' : redeclaration of array with a different array dimensions or sizes
ERROR: 0:104: 'resize3' : redeclaration of array with a different array dimensions or sizes
ERROR: 0:107: 'resize4' : redeclaration of array with a different element type
ERROR: 20 compilation errors. No code generated.
Shader version: 430
ERROR: node is still EOpNull!
0:10 Function Definition: foo(f1[5][7]; (global 4-element array of 7-element array of float)
0:10 Function Parameters:
0:10 'a' (in 5-element array of 7-element array of float)
0:? Sequence
0:13 move second child to first child (temp 7-element array of float)
0:13 'r' (temp 7-element array of float)
0:13 direct index (temp 7-element array of float)
0:13 'a' (in 5-element array of 7-element array of float)
0:13 Constant:
0:13 2 (const int)
0:14 Constant:
0:14 0.000000
0:15 Constant:
0:15 0.000000
0:16 Branch: Return with expression
0:16 Construct float (temp 4-element array of 7-element array of float)
0:16 direct index (temp 7-element array of float)
0:16 'a' (in 5-element array of 7-element array of float)
0:16 Constant:
0:16 0 (const int)
0:16 direct index (temp 7-element array of float)
0:16 'a' (in 5-element array of 7-element array of float)
0:16 Constant:
0:16 1 (const int)
0:16 'r' (temp 7-element array of float)
0:16 direct index (temp 7-element array of float)
0:16 'a' (in 5-element array of 7-element array of float)
0:16 Constant:
0:16 3 (const int)
0:17 Branch: Return with expression
0:17 Construct float (temp 4-element array of 7-element array of float)
0:17 direct index (temp 7-element array of float)
0:17 'a' (in 5-element array of 7-element array of float)
0:17 Constant:
0:17 0 (const int)
0:17 direct index (temp 7-element array of float)
0:17 'a' (in 5-element array of 7-element array of float)
0:17 Constant:
0:17 1 (const int)
0:17 'r' (temp 7-element array of float)
0:17 direct index (temp 7-element array of float)
0:17 'a' (in 5-element array of 7-element array of float)
0:17 Constant:
0:17 3 (const int)
0:18 Branch: Return with expression
0:18 Construct float (temp 4-element array of 7-element array of float)
0:18 direct index (temp 7-element array of float)
0:18 'a' (in 5-element array of 7-element array of float)
0:18 Constant:
0:18 0 (const int)
0:18 direct index (temp 7-element array of float)
0:18 'a' (in 5-element array of 7-element array of float)
0:18 Constant:
0:18 1 (const int)
0:18 direct index (temp 7-element array of float)
0:18 'a' (in 5-element array of 7-element array of float)
0:18 Constant:
0:18 2 (const int)
0:18 direct index (temp 7-element array of float)
0:18 'a' (in 5-element array of 7-element array of float)
0:18 Constant:
0:18 3 (const int)
0:21 Function Definition: bar(f1[5][7]; (global void)
0:21 Function Parameters:
0:21 '' (in 5-element array of 7-element array of float)
0:23 Function Definition: main( (global void)
0:23 Function Parameters:
0:? Sequence
0:? Sequence
0:28 move second child to first child (temp float)
0:28 direct index (temp float)
0:28 direct index (temp 2-element array of float)
0:28 direct index (temp 4-element array of 2-element array of float)
0:28 'gu' (temp 3-element array of 4-element array of 2-element array of float)
0:28 Constant:
0:28 2 (const int)
0:28 Constant:
0:28 4 (const int)
0:28 Constant:
0:28 1 (const int)
0:28 Constant:
0:28 4.000000
0:30 Sequence
0:30 move second child to first child (temp 3-element array of 2-element array of 4-component vector of float)
0:30 'ca4' (temp 3-element array of 2-element array of 4-component vector of float)
0:32 Constant:
0:32 0.000000
0:32 0.000000
0:32 0.000000
0:32 0.000000
0:32 1.000000
0:32 1.000000
0:32 1.000000
0:32 1.000000
0:32 0.000000
0:32 0.000000
0:32 0.000000
0:32 0.000000
0:32 1.000000
0:32 1.000000
0:32 1.000000
0:32 1.000000
0:32 0.000000
0:32 0.000000
0:32 0.000000
0:32 0.000000
0:32 1.000000
0:32 1.000000
0:32 1.000000
0:32 1.000000
0:33 Sequence
0:33 move second child to first child (temp 3-element array of 2-element array of 4-component vector of float)
0:33 'caim' (temp 3-element array of 2-element array of 4-component vector of float)
0:35 Constant:
0:35 4.000000
0:35 4.000000
0:35 4.000000
0:35 4.000000
0:35 2.000000
0:35 2.000000
0:35 2.000000
0:35 2.000000
0:35 4.000000
0:35 4.000000
0:35 4.000000
0:35 4.000000
0:35 2.000000
0:35 2.000000
0:35 2.000000
0:35 2.000000
0:35 4.000000
0:35 4.000000
0:35 4.000000
0:35 4.000000
0:35 2.000000
0:35 2.000000
0:35 2.000000
0:35 2.000000
0:36 Sequence
0:36 move second child to first child (temp 3-element array of 2-element array of 4-component vector of float)
0:36 'caim2' (temp 3-element array of 2-element array of 4-component vector of float)
0:38 Constant:
0:38 4.000000
0:38 4.000000
0:38 4.000000
0:38 4.000000
0:38 2.000000
0:38 2.000000
0:38 2.000000
0:38 2.000000
0:38 4.000000
0:38 4.000000
0:38 4.000000
0:38 4.000000
0:38 2.000000
0:38 2.000000
0:38 2.000000
0:38 2.000000
0:38 4.000000
0:38 4.000000
0:38 4.000000
0:38 4.000000
0:38 2.000000
0:38 2.000000
0:38 2.000000
0:38 2.000000
0:39 Sequence
0:39 move second child to first child (temp 3-element array of 2-element array of 4-component vector of float)
0:39 'caim3' (temp 3-element array of 2-element array of 4-component vector of float)
0:41 Constant:
0:41 4.000000
0:41 4.000000
0:41 4.000000
0:41 4.000000
0:41 2.000000
0:41 2.000000
0:41 2.000000
0:41 2.000000
0:41 4.000000
0:41 4.000000
0:41 4.000000
0:41 4.000000
0:41 2.000000
0:41 2.000000
0:41 2.000000
0:41 2.000000
0:41 4.000000
0:41 4.000000
0:41 4.000000
0:41 4.000000
0:41 2.000000
0:41 2.000000
0:41 2.000000
0:41 2.000000
0:43 Sequence
0:43 move second child to first child (temp 3-element array of 2-element array of 4-component vector of float)
0:43 'a4' (temp 3-element array of 2-element array of 4-component vector of float)
0:43 Constant:
0:43 0.000000
0:43 0.000000
0:43 0.000000
0:43 0.000000
0:43 1.000000
0:43 1.000000
0:43 1.000000
0:43 1.000000
0:43 0.000000
0:43 0.000000
0:43 0.000000
0:43 0.000000
0:43 1.000000
0:43 1.000000
0:43 1.000000
0:43 1.000000
0:43 0.000000
0:43 0.000000
0:43 0.000000
0:43 0.000000
0:43 1.000000
0:43 1.000000
0:43 1.000000
0:43 1.000000
0:46 Sequence
0:46 move second child to first child (temp 3-element array of 2-element array of 4-component vector of float)
0:46 'aim' (temp 3-element array of 2-element array of 4-component vector of float)
0:46 Constant:
0:46 4.000000
0:46 4.000000
0:46 4.000000
0:46 4.000000
0:46 2.000000
0:46 2.000000
0:46 2.000000
0:46 2.000000
0:46 4.000000
0:46 4.000000
0:46 4.000000
0:46 4.000000
0:46 2.000000
0:46 2.000000
0:46 2.000000
0:46 2.000000
0:46 4.000000
0:46 4.000000
0:46 4.000000
0:46 4.000000
0:46 2.000000
0:46 2.000000
0:46 2.000000
0:46 2.000000
0:49 Sequence
0:49 move second child to first child (temp 3-element array of 2-element array of 4-component vector of float)
0:49 'aim2' (temp 3-element array of 2-element array of 4-component vector of float)
0:49 Constant:
0:49 4.000000
0:49 4.000000
0:49 4.000000
0:49 4.000000
0:49 2.000000
0:49 2.000000
0:49 2.000000
0:49 2.000000
0:49 4.000000
0:49 4.000000
0:49 4.000000
0:49 4.000000
0:49 2.000000
0:49 2.000000
0:49 2.000000
0:49 2.000000
0:49 4.000000
0:49 4.000000
0:49 4.000000
0:49 4.000000
0:49 2.000000
0:49 2.000000
0:49 2.000000
0:49 2.000000
0:52 Sequence
0:52 move second child to first child (temp 3-element array of 2-element array of 4-component vector of float)
0:52 'aim3' (temp 3-element array of 2-element array of 4-component vector of float)
0:52 Constant:
0:52 4.000000
0:52 4.000000
0:52 4.000000
0:52 4.000000
0:52 2.000000
0:52 2.000000
0:52 2.000000
0:52 2.000000
0:52 4.000000
0:52 4.000000
0:52 4.000000
0:52 4.000000
0:52 2.000000
0:52 2.000000
0:52 2.000000
0:52 2.000000
0:52 4.000000
0:52 4.000000
0:52 4.000000
0:52 4.000000
0:52 2.000000
0:52 2.000000
0:52 2.000000
0:52 2.000000
0:69 move second child to first child (temp 4-element array of 7-element array of float)
0:69 'g4' (global 4-element array of 7-element array of float)
0:69 Function Call: foo(f1[5][7]; (global 4-element array of 7-element array of float)
0:69 'g5' (global 5-element array of 7-element array of float)
0:70 'g5' (global 5-element array of 7-element array of float)
0:71 'gu' (global implicitly-sized array of 7-element array of float)
0:73 Constant:
0:73 0.000000
0:74 Function Call: bar(f1[5][7]; (global void)
0:74 'g5' (global 5-element array of 7-element array of float)
0:76 Test condition and select (temp void)
0:76 Condition
0:76 Compare Equal (temp bool)
0:76 Function Call: foo(f1[5][7]; (global 4-element array of 7-element array of float)
0:76 'g5' (global 5-element array of 7-element array of float)
0:76 'g4' (global 4-element array of 7-element array of float)
0:76 true case is null
0:78 Test condition and select (temp void)
0:78 Condition
0:78 Constant:
0:78 false (const bool)
0:78 true case is null
0:82 move second child to first child (temp float)
0:82 direct index (temp float)
0:82 direct index (temp 7-element array of float)
0:82 'u' (temp 5-element array of 7-element array of float)
0:82 Constant:
0:82 2 (const int)
0:82 Constant:
0:82 2 (const int)
0:82 Constant:
0:82 3.000000
0:84 move second child to first child (temp float)
0:84 direct index (temp float)
0:84 direct index (temp 7-element array of float)
0:84 'u' (temp 5-element array of 7-element array of float)
0:84 Constant:
0:84 5 (const int)
0:84 Constant:
0:84 2 (const int)
0:84 Constant:
0:84 5.000000
0:85 Function Call: foo(f1[5][7]; (global 4-element array of 7-element array of float)
0:85 'u' (temp 5-element array of 7-element array of float)
0:88 Function Definition: foo3( (global void)
0:88 Function Parameters:
0:? Sequence
0:91 Constant:
0:91 1 (const int)
0:92 move second child to first child (temp float)
0:92 direct index (temp float)
0:92 direct index (temp 7-element array of float)
0:92 direct index (temp 5-element array of 7-element array of float)
0:92 'resize1' (temp 3-element array of 5-element array of 7-element array of float)
0:92 Constant:
0:92 1 (const int)
0:92 Constant:
0:92 4 (const int)
0:92 Constant:
0:92 5 (const int)
0:92 Constant:
0:92 2.000000
0:93 Constant:
0:93 1 (const int)
0:95 Constant:
0:95 3 (const int)
0:96 Constant:
0:96 5 (const int)
0:97 Constant:
0:97 7 (const int)
0:98 Constant:
0:98 0.000000
0:? Linker Objects
0:? 'many' (global 1-element array of 2-element array of 3-element array of 4-element array of 5-element array of 6-element array of float)
0:? 'gu' (global implicitly-sized array of 7-element array of float)
0:? 'gimp' (global implicitly-sized array of implicitly-sized array of float)
0:? 'g4' (global 4-element array of 7-element array of float)
0:? 'g5' (global 5-element array of 7-element array of float)
Linked fragment stage:
Shader version: 430
ERROR: node is still EOpNull!
0:10 Function Definition: foo(f1[5][7]; (global 4-element array of 7-element array of float)
0:10 Function Parameters:
0:10 'a' (in 5-element array of 7-element array of float)
0:? Sequence
0:13 move second child to first child (temp 7-element array of float)
0:13 'r' (temp 7-element array of float)
0:13 direct index (temp 7-element array of float)
0:13 'a' (in 5-element array of 7-element array of float)
0:13 Constant:
0:13 2 (const int)
0:14 Constant:
0:14 0.000000
0:15 Constant:
0:15 0.000000
0:16 Branch: Return with expression
0:16 Construct float (temp 4-element array of 7-element array of float)
0:16 direct index (temp 7-element array of float)
0:16 'a' (in 5-element array of 7-element array of float)
0:16 Constant:
0:16 0 (const int)
0:16 direct index (temp 7-element array of float)
0:16 'a' (in 5-element array of 7-element array of float)
0:16 Constant:
0:16 1 (const int)
0:16 'r' (temp 7-element array of float)
0:16 direct index (temp 7-element array of float)
0:16 'a' (in 5-element array of 7-element array of float)
0:16 Constant:
0:16 3 (const int)
0:17 Branch: Return with expression
0:17 Construct float (temp 4-element array of 7-element array of float)
0:17 direct index (temp 7-element array of float)
0:17 'a' (in 5-element array of 7-element array of float)
0:17 Constant:
0:17 0 (const int)
0:17 direct index (temp 7-element array of float)
0:17 'a' (in 5-element array of 7-element array of float)
0:17 Constant:
0:17 1 (const int)
0:17 'r' (temp 7-element array of float)
0:17 direct index (temp 7-element array of float)
0:17 'a' (in 5-element array of 7-element array of float)
0:17 Constant:
0:17 3 (const int)
0:18 Branch: Return with expression
0:18 Construct float (temp 4-element array of 7-element array of float)
0:18 direct index (temp 7-element array of float)
0:18 'a' (in 5-element array of 7-element array of float)
0:18 Constant:
0:18 0 (const int)
0:18 direct index (temp 7-element array of float)
0:18 'a' (in 5-element array of 7-element array of float)
0:18 Constant:
0:18 1 (const int)
0:18 direct index (temp 7-element array of float)
0:18 'a' (in 5-element array of 7-element array of float)
0:18 Constant:
0:18 2 (const int)
0:18 direct index (temp 7-element array of float)
0:18 'a' (in 5-element array of 7-element array of float)
0:18 Constant:
0:18 3 (const int)
0:21 Function Definition: bar(f1[5][7]; (global void)
0:21 Function Parameters:
0:21 '' (in 5-element array of 7-element array of float)
0:23 Function Definition: main( (global void)
0:23 Function Parameters:
0:? Sequence
0:? Sequence
0:28 move second child to first child (temp float)
0:28 direct index (temp float)
0:28 direct index (temp 2-element array of float)
0:28 direct index (temp 4-element array of 2-element array of float)
0:28 'gu' (temp 3-element array of 4-element array of 2-element array of float)
0:28 Constant:
0:28 2 (const int)
0:28 Constant:
0:28 4 (const int)
0:28 Constant:
0:28 1 (const int)
0:28 Constant:
0:28 4.000000
0:30 Sequence
0:30 move second child to first child (temp 3-element array of 2-element array of 4-component vector of float)
0:30 'ca4' (temp 3-element array of 2-element array of 4-component vector of float)
0:32 Constant:
0:32 0.000000
0:32 0.000000
0:32 0.000000
0:32 0.000000
0:32 1.000000
0:32 1.000000
0:32 1.000000
0:32 1.000000
0:32 0.000000
0:32 0.000000
0:32 0.000000
0:32 0.000000
0:32 1.000000
0:32 1.000000
0:32 1.000000
0:32 1.000000
0:32 0.000000
0:32 0.000000
0:32 0.000000
0:32 0.000000
0:32 1.000000
0:32 1.000000
0:32 1.000000
0:32 1.000000
0:33 Sequence
0:33 move second child to first child (temp 3-element array of 2-element array of 4-component vector of float)
0:33 'caim' (temp 3-element array of 2-element array of 4-component vector of float)
0:35 Constant:
0:35 4.000000
0:35 4.000000
0:35 4.000000
0:35 4.000000
0:35 2.000000
0:35 2.000000
0:35 2.000000
0:35 2.000000
0:35 4.000000
0:35 4.000000
0:35 4.000000
0:35 4.000000
0:35 2.000000
0:35 2.000000
0:35 2.000000
0:35 2.000000
0:35 4.000000
0:35 4.000000
0:35 4.000000
0:35 4.000000
0:35 2.000000
0:35 2.000000
0:35 2.000000
0:35 2.000000
0:36 Sequence
0:36 move second child to first child (temp 3-element array of 2-element array of 4-component vector of float)
0:36 'caim2' (temp 3-element array of 2-element array of 4-component vector of float)
0:38 Constant:
0:38 4.000000
0:38 4.000000
0:38 4.000000
0:38 4.000000
0:38 2.000000
0:38 2.000000
0:38 2.000000
0:38 2.000000
0:38 4.000000
0:38 4.000000
0:38 4.000000
0:38 4.000000
0:38 2.000000
0:38 2.000000
0:38 2.000000
0:38 2.000000
0:38 4.000000
0:38 4.000000
0:38 4.000000
0:38 4.000000
0:38 2.000000
0:38 2.000000
0:38 2.000000
0:38 2.000000
0:39 Sequence
0:39 move second child to first child (temp 3-element array of 2-element array of 4-component vector of float)
0:39 'caim3' (temp 3-element array of 2-element array of 4-component vector of float)
0:41 Constant:
0:41 4.000000
0:41 4.000000
0:41 4.000000
0:41 4.000000
0:41 2.000000
0:41 2.000000
0:41 2.000000
0:41 2.000000
0:41 4.000000
0:41 4.000000
0:41 4.000000
0:41 4.000000
0:41 2.000000
0:41 2.000000
0:41 2.000000
0:41 2.000000
0:41 4.000000
0:41 4.000000
0:41 4.000000
0:41 4.000000
0:41 2.000000
0:41 2.000000
0:41 2.000000
0:41 2.000000
0:43 Sequence
0:43 move second child to first child (temp 3-element array of 2-element array of 4-component vector of float)
0:43 'a4' (temp 3-element array of 2-element array of 4-component vector of float)
0:43 Constant:
0:43 0.000000
0:43 0.000000
0:43 0.000000
0:43 0.000000
0:43 1.000000
0:43 1.000000
0:43 1.000000
0:43 1.000000
0:43 0.000000
0:43 0.000000
0:43 0.000000
0:43 0.000000
0:43 1.000000
0:43 1.000000
0:43 1.000000
0:43 1.000000
0:43 0.000000
0:43 0.000000
0:43 0.000000
0:43 0.000000
0:43 1.000000
0:43 1.000000
0:43 1.000000
0:43 1.000000
0:46 Sequence
0:46 move second child to first child (temp 3-element array of 2-element array of 4-component vector of float)
0:46 'aim' (temp 3-element array of 2-element array of 4-component vector of float)
0:46 Constant:
0:46 4.000000
0:46 4.000000
0:46 4.000000
0:46 4.000000
0:46 2.000000
0:46 2.000000
0:46 2.000000
0:46 2.000000
0:46 4.000000
0:46 4.000000
0:46 4.000000
0:46 4.000000
0:46 2.000000
0:46 2.000000
0:46 2.000000
0:46 2.000000
0:46 4.000000
0:46 4.000000
0:46 4.000000
0:46 4.000000
0:46 2.000000
0:46 2.000000
0:46 2.000000
0:46 2.000000
0:49 Sequence
0:49 move second child to first child (temp 3-element array of 2-element array of 4-component vector of float)
0:49 'aim2' (temp 3-element array of 2-element array of 4-component vector of float)
0:49 Constant:
0:49 4.000000
0:49 4.000000
0:49 4.000000
0:49 4.000000
0:49 2.000000
0:49 2.000000
0:49 2.000000
0:49 2.000000
0:49 4.000000
0:49 4.000000
0:49 4.000000
0:49 4.000000
0:49 2.000000
0:49 2.000000
0:49 2.000000
0:49 2.000000
0:49 4.000000
0:49 4.000000
0:49 4.000000
0:49 4.000000
0:49 2.000000
0:49 2.000000
0:49 2.000000
0:49 2.000000
0:52 Sequence
0:52 move second child to first child (temp 3-element array of 2-element array of 4-component vector of float)
0:52 'aim3' (temp 3-element array of 2-element array of 4-component vector of float)
0:52 Constant:
0:52 4.000000
0:52 4.000000
0:52 4.000000
0:52 4.000000
0:52 2.000000
0:52 2.000000
0:52 2.000000
0:52 2.000000
0:52 4.000000
0:52 4.000000
0:52 4.000000
0:52 4.000000
0:52 2.000000
0:52 2.000000
0:52 2.000000
0:52 2.000000
0:52 4.000000
0:52 4.000000
0:52 4.000000
0:52 4.000000
0:52 2.000000
0:52 2.000000
0:52 2.000000
0:52 2.000000
0:69 move second child to first child (temp 4-element array of 7-element array of float)
0:69 'g4' (global 4-element array of 7-element array of float)
0:69 Function Call: foo(f1[5][7]; (global 4-element array of 7-element array of float)
0:69 'g5' (global 5-element array of 7-element array of float)
0:70 'g5' (global 5-element array of 7-element array of float)
0:71 'gu' (global 1-element array of 7-element array of float)
0:73 Constant:
0:73 0.000000
0:74 Function Call: bar(f1[5][7]; (global void)
0:74 'g5' (global 5-element array of 7-element array of float)
0:76 Test condition and select (temp void)
0:76 Condition
0:76 Compare Equal (temp bool)
0:76 Function Call: foo(f1[5][7]; (global 4-element array of 7-element array of float)
0:76 'g5' (global 5-element array of 7-element array of float)
0:76 'g4' (global 4-element array of 7-element array of float)
0:76 true case is null
0:78 Test condition and select (temp void)
0:78 Condition
0:78 Constant:
0:78 false (const bool)
0:78 true case is null
0:82 move second child to first child (temp float)
0:82 direct index (temp float)
0:82 direct index (temp 7-element array of float)
0:82 'u' (temp 5-element array of 7-element array of float)
0:82 Constant:
0:82 2 (const int)
0:82 Constant:
0:82 2 (const int)
0:82 Constant:
0:82 3.000000
0:84 move second child to first child (temp float)
0:84 direct index (temp float)
0:84 direct index (temp 7-element array of float)
0:84 'u' (temp 5-element array of 7-element array of float)
0:84 Constant:
0:84 5 (const int)
0:84 Constant:
0:84 2 (const int)
0:84 Constant:
0:84 5.000000
0:85 Function Call: foo(f1[5][7]; (global 4-element array of 7-element array of float)
0:85 'u' (temp 5-element array of 7-element array of float)
0:88 Function Definition: foo3( (global void)
0:88 Function Parameters:
0:? Sequence
0:91 Constant:
0:91 1 (const int)
0:92 move second child to first child (temp float)
0:92 direct index (temp float)
0:92 direct index (temp 7-element array of float)
0:92 direct index (temp 5-element array of 7-element array of float)
0:92 'resize1' (temp 3-element array of 5-element array of 7-element array of float)
0:92 Constant:
0:92 1 (const int)
0:92 Constant:
0:92 4 (const int)
0:92 Constant:
0:92 5 (const int)
0:92 Constant:
0:92 2.000000
0:93 Constant:
0:93 1 (const int)
0:95 Constant:
0:95 3 (const int)
0:96 Constant:
0:96 5 (const int)
0:97 Constant:
0:97 7 (const int)
0:98 Constant:
0:98 0.000000
0:? Linker Objects
0:? 'many' (global 1-element array of 2-element array of 3-element array of 4-element array of 5-element array of 6-element array of float)
0:? 'gu' (global 1-element array of 7-element array of float)
0:? 'gimp' (global 1-element array of implicitly-sized array of float)
0:? 'g4' (global 4-element array of 7-element array of float)
0:? 'g5' (global 5-element array of 7-element array of float)

View file

@ -2,7 +2,6 @@
Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
ERROR: 0:12: 'out' : cannot be bool
ERROR: 0:13: 'sampler2D' : sampler/image types can only be used in uniform variables or function parameters: outo
WARNING: 0:15: 'Not supported yet.' : arrays of arrays
ERROR: 2 compilation errors. No code generated.

View file

@ -17,10 +17,6 @@ ERROR: 0:102: 'color' : redefinition
ERROR: 0:112: 'redeclaration' : all redeclarations must use the same depth layout on gl_FragDepth
ERROR: 0:118: 'redeclaration' : all redeclarations must use the same depth layout on gl_FragDepth
ERROR: 0:121: 'redeclaration' : all redeclarations must use the same depth layout on gl_FragDepth
WARNING: 0:146: 'Not supported yet.' : arrays of arrays
ERROR: 0:150: 'constructor' : constructing from a non-dereferenced array
ERROR: 0:150: '=' : cannot convert from 'const float' to 'temp 3-element array of 2-element array of 4-component vector of float'
ERROR: 0:152: 'constructor' : cannot convert parameter 1 from 'const 2-element array of 4-component vector of float' to 'temp 4-component vector of float'
ERROR: 0:172: 'x' : undeclared identifier
ERROR: 0:172: '[]' : scalar integer expression required
ERROR: 0:175: 'x' : undeclared identifier
@ -42,7 +38,7 @@ ERROR: 0:226: 'in' : not allowed in nested scope
ERROR: 0:227: 'in' : not allowed in nested scope
ERROR: 0:228: 'in' : not allowed in nested scope
ERROR: 0:232: 'out' : not allowed in nested scope
ERROR: 41 compilation errors. No code generated.
ERROR: 38 compilation errors. No code generated.
Shader version: 430
@ -164,6 +160,41 @@ ERROR: node is still EOpNull!
0:149 0.100000
0:149 0.100000
0:149 0.100000
0:150 Sequence
0:150 move second child to first child (temp 3-element array of 2-element array of 4-component vector of float)
0:150 'a3' (temp 3-element array of 2-element array of 4-component vector of float)
0:150 Construct vec4 (temp 3-element array of 2-element array of 4-component vector of float)
0:150 'b' (temp 2-element array of 4-component vector of float)
0:150 'b' (temp 2-element array of 4-component vector of float)
0:150 'b' (temp 2-element array of 4-component vector of float)
0:152 Sequence
0:152 move second child to first child (temp 3-element array of 2-element array of 4-component vector of float)
0:152 'a4' (temp 3-element array of 2-element array of 4-component vector of float)
0:152 Constant:
0:152 0.000000
0:152 0.000000
0:152 0.000000
0:152 0.000000
0:152 1.000000
0:152 1.000000
0:152 1.000000
0:152 1.000000
0:152 0.000000
0:152 0.000000
0:152 0.000000
0:152 0.000000
0:152 1.000000
0:152 1.000000
0:152 1.000000
0:152 1.000000
0:152 0.000000
0:152 0.000000
0:152 0.000000
0:152 0.000000
0:152 1.000000
0:152 1.000000
0:152 1.000000
0:152 1.000000
0:? Sequence
0:159 Sequence
0:159 Sequence
@ -191,7 +222,7 @@ ERROR: node is still EOpNull!
0:171 Constant:
0:171 3 (const int)
0:172 Constant:
0:172 4 (const int)
0:172 2 (const int)
0:175 Constant:
0:175 0.000000
0:178 Constant:
@ -418,6 +449,41 @@ ERROR: node is still EOpNull!
0:149 0.100000
0:149 0.100000
0:149 0.100000
0:150 Sequence
0:150 move second child to first child (temp 3-element array of 2-element array of 4-component vector of float)
0:150 'a3' (temp 3-element array of 2-element array of 4-component vector of float)
0:150 Construct vec4 (temp 3-element array of 2-element array of 4-component vector of float)
0:150 'b' (temp 2-element array of 4-component vector of float)
0:150 'b' (temp 2-element array of 4-component vector of float)
0:150 'b' (temp 2-element array of 4-component vector of float)
0:152 Sequence
0:152 move second child to first child (temp 3-element array of 2-element array of 4-component vector of float)
0:152 'a4' (temp 3-element array of 2-element array of 4-component vector of float)
0:152 Constant:
0:152 0.000000
0:152 0.000000
0:152 0.000000
0:152 0.000000
0:152 1.000000
0:152 1.000000
0:152 1.000000
0:152 1.000000
0:152 0.000000
0:152 0.000000
0:152 0.000000
0:152 0.000000
0:152 1.000000
0:152 1.000000
0:152 1.000000
0:152 1.000000
0:152 0.000000
0:152 0.000000
0:152 0.000000
0:152 0.000000
0:152 1.000000
0:152 1.000000
0:152 1.000000
0:152 1.000000
0:? Sequence
0:159 Sequence
0:159 Sequence
@ -445,7 +511,7 @@ ERROR: node is still EOpNull!
0:171 Constant:
0:171 3 (const int)
0:172 Constant:
0:172 4 (const int)
0:172 2 (const int)
0:175 Constant:
0:175 0.000000
0:178 Constant:

View file

@ -1,6 +1,5 @@
specExamples.vert
Warning, version 430 is not yet complete; most version-specific features are present, but some are missing.
ERROR: 0:23: 'transforms' : redeclaration of array with size
ERROR: 0:29: 'location' : can only appy to uniform, buffer, in, or out storage qualifiers
ERROR: 0:31: 'triangles' : unrecognized layout identifier, or qualifier requires assignment (e.g., binding = 4)
ERROR: 0:31: 'invocations' : there is no such layout identifier for this stage taking an assigned value
@ -35,11 +34,7 @@ ERROR: 0:134: '' : function does not return a value: funcA
ERROR: 0:136: '' : function does not return a value: funcB
ERROR: 0:153: '' : function does not return a value: func3
ERROR: 0:170: 'coherent' : argument cannot drop memory qualifier when passed to formal parameter
WARNING: 0:192: 'Not supported yet.' : arrays of arrays
ERROR: 0:192: 'constructor' : constructing from a non-dereferenced array
ERROR: 0:193: 'constructor' : constructing from a non-dereferenced array
ERROR: 0:194: 'constructor' : constructing from a non-dereferenced array
ERROR: 37 compilation errors. No code generated.
ERROR: 33 compilation errors. No code generated.
Shader version: 430
@ -269,18 +264,25 @@ ERROR: node is still EOpNull!
0:191 1.000000
0:191 1.000000
0:191 1.000000
0:192 Constant:
0:192 0.000000
0:193 Constant:
0:193 0.000000
0:194 Constant:
0:194 0.000000
0:192 Construct vec4 (temp 3-element array of 2-element array of 4-component vector of float)
0:192 'b' (temp 2-element array of 4-component vector of float)
0:192 'b' (temp 2-element array of 4-component vector of float)
0:192 'b' (temp 2-element array of 4-component vector of float)
0:193 Construct vec4 (temp 3-element array of 2-element array of 4-component vector of float)
0:193 'b' (temp 2-element array of 4-component vector of float)
0:193 'b' (temp 2-element array of 4-component vector of float)
0:193 'b' (temp 2-element array of 4-component vector of float)
0:194 Construct vec4 (temp 3-element array of 2-element array of 4-component vector of float)
0:194 'b' (temp 2-element array of 4-component vector of float)
0:194 'b' (temp 2-element array of 4-component vector of float)
0:194 'b' (temp 2-element array of 4-component vector of float)
0:? Linker Objects
0:? 'Coords' (out block{out 4-component vector of float Position, out 2-component vector of float Texture})
0:? 'anon@0' (out block{out 4-component vector of float Color})
0:? 'transforms' (layout(column_major shared ) uniform 4-element array of block{layout(column_major shared ) uniform 4X4 matrix of float ModelViewMatrix, layout(column_major shared ) uniform 4X4 matrix of float ModelViewProjectionMatrix, layout(column_major shared ) uniform implicitly-sized array of 4-component vector of float a, layout(column_major shared ) uniform float Deformation})
0:? 'normal' (layout(location=3 ) in 4-component vector of float)
0:? 'colors' (layout(location=6 ) in 3-element array of 4-component vector of float)
0:? 'transforms2' (layout(location=9 ) in 2-element array of 4X4 matrix of float)
0:? 's' (layout(location=3 ) temp structure{global 3-component vector of float a1, global 2X2 matrix of float b, global 2-element array of 4-component vector of float c})
0:? 'var1' (smooth out 4-component vector of float)
0:? 'anon@1' (out block{out 4-component vector of float var2, out 2-component vector of float var3, out 3-component vector of float var4})
@ -546,18 +548,25 @@ ERROR: node is still EOpNull!
0:191 1.000000
0:191 1.000000
0:191 1.000000
0:192 Constant:
0:192 0.000000
0:193 Constant:
0:193 0.000000
0:194 Constant:
0:194 0.000000
0:192 Construct vec4 (temp 3-element array of 2-element array of 4-component vector of float)
0:192 'b' (temp 2-element array of 4-component vector of float)
0:192 'b' (temp 2-element array of 4-component vector of float)
0:192 'b' (temp 2-element array of 4-component vector of float)
0:193 Construct vec4 (temp 3-element array of 2-element array of 4-component vector of float)
0:193 'b' (temp 2-element array of 4-component vector of float)
0:193 'b' (temp 2-element array of 4-component vector of float)
0:193 'b' (temp 2-element array of 4-component vector of float)
0:194 Construct vec4 (temp 3-element array of 2-element array of 4-component vector of float)
0:194 'b' (temp 2-element array of 4-component vector of float)
0:194 'b' (temp 2-element array of 4-component vector of float)
0:194 'b' (temp 2-element array of 4-component vector of float)
0:? Linker Objects
0:? 'Coords' (out block{out 4-component vector of float Position, out 2-component vector of float Texture})
0:? 'anon@0' (out block{out 4-component vector of float Color})
0:? 'transforms' (layout(column_major shared ) uniform 4-element array of block{layout(column_major shared ) uniform 4X4 matrix of float ModelViewMatrix, layout(column_major shared ) uniform 4X4 matrix of float ModelViewProjectionMatrix, layout(column_major shared ) uniform 1-element array of 4-component vector of float a, layout(column_major shared ) uniform float Deformation})
0:? 'normal' (layout(location=3 ) in 4-component vector of float)
0:? 'colors' (layout(location=6 ) in 3-element array of 4-component vector of float)
0:? 'transforms2' (layout(location=9 ) in 2-element array of 4X4 matrix of float)
0:? 's' (layout(location=3 ) temp structure{global 3-component vector of float a1, global 2X2 matrix of float b, global 2-element array of 4-component vector of float c})
0:? 'var1' (smooth out 4-component vector of float)
0:? 'anon@1' (out block{out 4-component vector of float var2, out 2-component vector of float var3, out 3-component vector of float var4})

View file

@ -20,7 +20,7 @@ uniform Transform { // API uses
layout(location = 3) in vec4 normal;
layout(location = 6) in vec4 colors[3];
layout(location = 9) in mat4 transforms[2];
layout(location = 9) in mat4 transforms2[2];
layout(location = 3) struct S {
vec3 a1;

View file

@ -76,6 +76,7 @@ numeral.frag
410.geom
430.vert
430.comp
430AofA.frag
440.vert
440.frag
450.vert