Non-functional. Rationalizations enabling future generalizations:

- Use much simpler method to update implicit array sizes.
  The previous overly complicated method was error prone.
- Rationalize all use of unsized arrays.
- Combine decorations when generating SPIR-V, to simplify
  adding extensions.
This commit is contained in:
John Kessenich
2018-03-28 18:01:20 -06:00
parent 2316924b09
commit ead8622484
25 changed files with 563 additions and 583 deletions

View File

@@ -2,7 +2,7 @@ array.frag
ERROR: 0:21: '[' : array index out of range '2'
ERROR: 0:27: '[' : array must be redeclared with a size before being indexed with a variable
ERROR: 0:30: 'assign' : cannot convert from ' global 4-element array of float' to ' global 5-element array of float'
ERROR: 0:31: 'assign' : cannot convert from ' global 4-element array of float' to ' global unsized 4-element array of float'
ERROR: 0:31: 'assign' : cannot convert from ' global 4-element array of float' to ' global runtime-sized array of float'
ERROR: 0:33: 'foo' : no matching overloaded function found
ERROR: 0:42: '[' : array index out of range '5'
ERROR: 0:45: '[' : array index out of range '1000'
@@ -25,7 +25,9 @@ ERROR: 0:101: '[' : array index out of range '5'
ERROR: 0:104: 'constructor' : array constructor must have at least one argument
ERROR: 0:104: '=' : cannot convert from ' const float' to ' global unsized 1-element array of int'
ERROR: 0:106: 'constructor' : array argument must be sized
ERROR: 26 compilation errors. No code generated.
ERROR: 0:111: '[' : array must be redeclared with a size before being indexed with a variable
ERROR: 0:111: 'variable indexing sampler array' : not supported with this profile: none
ERROR: 28 compilation errors. No code generated.
Shader version: 130
@@ -68,21 +70,21 @@ ERROR: node is still EOpNull!
0:21 4.000000
0:24 move second child to first child ( temp float)
0:24 direct index ( temp float)
0:24 'gu' ( global unsized 4-element array of float)
0:24 'gu' ( global runtime-sized array of float)
0:24 Constant:
0:24 2 (const int)
0:24 Constant:
0:24 4.000000
0:26 move second child to first child ( temp float)
0:26 direct index ( temp float)
0:26 'gu' ( global unsized 4-element array of float)
0:26 'gu' ( global runtime-sized array of float)
0:26 Constant:
0:26 3 (const int)
0:26 Constant:
0:26 3.000000
0:27 move second child to first child ( temp float)
0:27 indirect index ( temp float)
0:27 'gu' ( global unsized 4-element array of float)
0:27 'gu' ( global runtime-sized array of float)
0:27 'a' ( uniform int)
0:27 Constant:
0:27 5.000000
@@ -91,7 +93,7 @@ ERROR: node is still EOpNull!
0:29 Function Call: foo(f1[5]; ( global 4-element array of float)
0:29 'g5' ( global 5-element array of float)
0:30 'g5' ( global 5-element array of float)
0:31 'gu' ( global unsized 4-element array of float)
0:31 'gu' ( global runtime-sized array of float)
0:33 Constant:
0:33 0.000000
0:34 Function Call: bar(f1[5]; ( global void)
@@ -108,7 +110,7 @@ ERROR: node is still EOpNull!
0:36 true case
0:37 move second child to first child ( temp float)
0:37 direct index ( temp float)
0:37 'gu' ( global unsized 4-element array of float)
0:37 'gu' ( global runtime-sized array of float)
0:37 Constant:
0:37 0 (const int)
0:37 Constant:
@@ -264,8 +266,14 @@ ERROR: node is still EOpNull!
0:106 'b' ( global float)
0:106 Constant:
0:106 0.000000
0:109 Function Definition: foo4( ( global void)
0:109 Function Parameters:
0:111 Sequence
0:111 indirect index ( temp sampler2D)
0:111 's2d' ( uniform runtime-sized array of sampler2D)
0:111 'a' ( uniform int)
0:? Linker Objects
0:? 'gu' ( global unsized 4-element array of float)
0:? 'gu' ( global runtime-sized array of float)
0:? 'g4' ( global 4-element array of float)
0:? 'g5' ( global 5-element array of float)
0:? 'a' ( uniform int)
@@ -275,6 +283,7 @@ ERROR: node is still EOpNull!
0:? 'i' ( global unsized 1-element array of int)
0:? 'emptyA' ( global unsized 1-element array of float)
0:? 'b' ( global float)
0:? 's2d' ( uniform runtime-sized array of sampler2D)
Linked fragment stage:
@@ -320,21 +329,21 @@ ERROR: node is still EOpNull!
0:21 4.000000
0:24 move second child to first child ( temp float)
0:24 direct index ( temp float)
0:24 'gu' ( global 4-element array of float)
0:24 'gu' ( global runtime-sized array of float)
0:24 Constant:
0:24 2 (const int)
0:24 Constant:
0:24 4.000000
0:26 move second child to first child ( temp float)
0:26 direct index ( temp float)
0:26 'gu' ( global 4-element array of float)
0:26 'gu' ( global runtime-sized array of float)
0:26 Constant:
0:26 3 (const int)
0:26 Constant:
0:26 3.000000
0:27 move second child to first child ( temp float)
0:27 indirect index ( temp float)
0:27 'gu' ( global 4-element array of float)
0:27 'gu' ( global runtime-sized array of float)
0:27 'a' ( uniform int)
0:27 Constant:
0:27 5.000000
@@ -343,7 +352,7 @@ ERROR: node is still EOpNull!
0:29 Function Call: foo(f1[5]; ( global 4-element array of float)
0:29 'g5' ( global 5-element array of float)
0:30 'g5' ( global 5-element array of float)
0:31 'gu' ( global 4-element array of float)
0:31 'gu' ( global runtime-sized array of float)
0:33 Constant:
0:33 0.000000
0:34 Function Call: bar(f1[5]; ( global void)
@@ -360,7 +369,7 @@ ERROR: node is still EOpNull!
0:36 true case
0:37 move second child to first child ( temp float)
0:37 direct index ( temp float)
0:37 'gu' ( global 4-element array of float)
0:37 'gu' ( global runtime-sized array of float)
0:37 Constant:
0:37 0 (const int)
0:37 Constant:
@@ -452,7 +461,7 @@ ERROR: node is still EOpNull!
0:106 Constant:
0:106 0.000000
0:? Linker Objects
0:? 'gu' ( global 4-element array of float)
0:? 'gu' ( global runtime-sized array of float)
0:? 'g4' ( global 4-element array of float)
0:? 'g5' ( global 5-element array of float)
0:? 'a' ( uniform int)
@@ -462,4 +471,5 @@ ERROR: node is still EOpNull!
0:? 'i' ( global 1-element array of int)
0:? 'emptyA' ( global 1-element array of float)
0:? 'b' ( global float)
0:? 's2d' ( uniform runtime-sized array of sampler2D)