fix error message for hlslGrammar::acceptConstructor

Fix the error message for when an erroneous HLSL constructor statement
is detected.

Prior to this change, such error messages would not show correct file
path and line number information.

Additionally, update test data to account for updated error messages.
This commit is contained in:
tgfrerer
2021-05-11 09:42:11 +01:00
parent 9431c53c84
commit adfa0938a2
117 changed files with 6243 additions and 6243 deletions

View File

@@ -472,10 +472,10 @@ gl_FragCoord origin is upper left
0:117 Sequence
0:117 move second child to first child ( temp 2-component vector of int)
0:117 'r016' ( temp 2-component vector of int)
0:? bitCount ( temp 2-component vector of int)
0:? Constant:
0:? 7 (const int)
0:? 3 (const int)
0:117 bitCount ( temp 2-component vector of int)
0:117 Constant:
0:117 7 (const int)
0:117 3 (const int)
0:118 Sequence
0:118 move second child to first child ( temp 2-component vector of float)
0:118 'r017' ( temp 2-component vector of float)
@@ -543,17 +543,17 @@ gl_FragCoord origin is upper left
0:136 Sequence
0:136 move second child to first child ( temp 2-component vector of uint)
0:136 'r031' ( temp 2-component vector of uint)
0:? findMSB ( temp 2-component vector of uint)
0:? Constant:
0:? 7 (const uint)
0:? 8 (const uint)
0:136 findMSB ( temp 2-component vector of uint)
0:136 Constant:
0:136 7 (const uint)
0:136 8 (const uint)
0:137 Sequence
0:137 move second child to first child ( temp 2-component vector of uint)
0:137 'r032' ( temp 2-component vector of uint)
0:? findLSB ( temp 2-component vector of uint)
0:? Constant:
0:? 7 (const uint)
0:? 8 (const uint)
0:137 findLSB ( temp 2-component vector of uint)
0:137 Constant:
0:137 7 (const uint)
0:137 8 (const uint)
0:138 Sequence
0:138 move second child to first child ( temp 2-component vector of float)
0:138 'r033' ( temp 2-component vector of float)
@@ -673,10 +673,10 @@ gl_FragCoord origin is upper left
0:159 Sequence
0:159 move second child to first child ( temp 2-component vector of uint)
0:159 'r054' ( temp 2-component vector of uint)
0:? bitFieldReverse ( temp 2-component vector of uint)
0:? Constant:
0:? 1 (const uint)
0:? 2 (const uint)
0:159 bitFieldReverse ( temp 2-component vector of uint)
0:159 Constant:
0:159 1 (const uint)
0:159 2 (const uint)
0:160 Sequence
0:160 move second child to first child ( temp 2-component vector of float)
0:160 'r055' ( temp 2-component vector of float)
@@ -754,9 +754,9 @@ gl_FragCoord origin is upper left
0:173 trunc ( temp 2-component vector of float)
0:173 'inF0' ( in 2-component vector of float)
0:176 Branch: Return with expression
0:? Constant:
0:? 1.000000
0:? 2.000000
0:176 Constant:
0:176 1.000000
0:176 2.000000
0:180 Function Definition: PixelShaderFunction3(vf3;vf3;vf3;vu3;vu3; ( temp 3-component vector of float)
0:180 Function Parameters:
0:180 'inF0' ( in 3-component vector of float)
@@ -865,11 +865,11 @@ gl_FragCoord origin is upper left
0:200 Sequence
0:200 move second child to first child ( temp 3-component vector of uint)
0:200 'r015' ( temp 3-component vector of uint)
0:? bitCount ( temp 3-component vector of uint)
0:? Constant:
0:? 7 (const uint)
0:? 3 (const uint)
0:? 5 (const uint)
0:200 bitCount ( temp 3-component vector of uint)
0:200 Constant:
0:200 7 (const uint)
0:200 3 (const uint)
0:200 5 (const uint)
0:201 Sequence
0:201 move second child to first child ( temp 3-component vector of float)
0:201 'r016' ( temp 3-component vector of float)
@@ -943,19 +943,19 @@ gl_FragCoord origin is upper left
0:217 Sequence
0:217 move second child to first child ( temp 3-component vector of uint)
0:217 'r032' ( temp 3-component vector of uint)
0:? findMSB ( temp 3-component vector of uint)
0:? Constant:
0:? 2 (const uint)
0:? 3 (const uint)
0:? 4 (const uint)
0:217 findMSB ( temp 3-component vector of uint)
0:217 Constant:
0:217 2 (const uint)
0:217 3 (const uint)
0:217 4 (const uint)
0:218 Sequence
0:218 move second child to first child ( temp 3-component vector of uint)
0:218 'r033' ( temp 3-component vector of uint)
0:? findLSB ( temp 3-component vector of uint)
0:? Constant:
0:? 2 (const uint)
0:? 3 (const uint)
0:? 4 (const uint)
0:218 findLSB ( temp 3-component vector of uint)
0:218 Constant:
0:218 2 (const uint)
0:218 3 (const uint)
0:218 4 (const uint)
0:219 Sequence
0:219 move second child to first child ( temp 3-component vector of float)
0:219 'r034' ( temp 3-component vector of float)
@@ -1083,11 +1083,11 @@ gl_FragCoord origin is upper left
0:241 Sequence
0:241 move second child to first child ( temp 3-component vector of uint)
0:241 'r055' ( temp 3-component vector of uint)
0:? bitFieldReverse ( temp 3-component vector of uint)
0:? Constant:
0:? 1 (const uint)
0:? 2 (const uint)
0:? 3 (const uint)
0:241 bitFieldReverse ( temp 3-component vector of uint)
0:241 Constant:
0:241 1 (const uint)
0:241 2 (const uint)
0:241 3 (const uint)
0:242 Sequence
0:242 move second child to first child ( temp 3-component vector of float)
0:242 'r056' ( temp 3-component vector of float)
@@ -1165,10 +1165,10 @@ gl_FragCoord origin is upper left
0:255 trunc ( temp 3-component vector of float)
0:255 'inF0' ( in 3-component vector of float)
0:258 Branch: Return with expression
0:? Constant:
0:? 1.000000
0:? 2.000000
0:? 3.000000
0:258 Constant:
0:258 1.000000
0:258 2.000000
0:258 3.000000
0:262 Function Definition: PixelShaderFunction(vf4;vf4;vf4;vu4;vu4; ( temp 4-component vector of float)
0:262 Function Parameters:
0:262 'inF0' ( in 4-component vector of float)
@@ -1279,12 +1279,12 @@ gl_FragCoord origin is upper left
0:282 Sequence
0:282 move second child to first child ( temp 4-component vector of uint)
0:282 'r015' ( temp 4-component vector of uint)
0:? bitCount ( temp 4-component vector of uint)
0:? Constant:
0:? 7 (const uint)
0:? 3 (const uint)
0:? 5 (const uint)
0:? 2 (const uint)
0:282 bitCount ( temp 4-component vector of uint)
0:282 Constant:
0:282 7 (const uint)
0:282 3 (const uint)
0:282 5 (const uint)
0:282 2 (const uint)
0:283 Sequence
0:283 move second child to first child ( temp 4-component vector of float)
0:283 'r016' ( temp 4-component vector of float)
@@ -1375,21 +1375,21 @@ gl_FragCoord origin is upper left
0:299 Sequence
0:299 move second child to first child ( temp 4-component vector of uint)
0:299 'r032' ( temp 4-component vector of uint)
0:? findMSB ( temp 4-component vector of uint)
0:? Constant:
0:? 7 (const uint)
0:? 8 (const uint)
0:? 9 (const uint)
0:? 10 (const uint)
0:299 findMSB ( temp 4-component vector of uint)
0:299 Constant:
0:299 7 (const uint)
0:299 8 (const uint)
0:299 9 (const uint)
0:299 10 (const uint)
0:300 Sequence
0:300 move second child to first child ( temp 4-component vector of uint)
0:300 'r033' ( temp 4-component vector of uint)
0:? findLSB ( temp 4-component vector of uint)
0:? Constant:
0:? 7 (const uint)
0:? 8 (const uint)
0:? 9 (const uint)
0:? 10 (const uint)
0:300 findLSB ( temp 4-component vector of uint)
0:300 Constant:
0:300 7 (const uint)
0:300 8 (const uint)
0:300 9 (const uint)
0:300 10 (const uint)
0:301 Sequence
0:301 move second child to first child ( temp 4-component vector of float)
0:301 'r034' ( temp 4-component vector of float)
@@ -1509,12 +1509,12 @@ gl_FragCoord origin is upper left
0:322 Sequence
0:322 move second child to first child ( temp 4-component vector of uint)
0:322 'r055' ( temp 4-component vector of uint)
0:? bitFieldReverse ( temp 4-component vector of uint)
0:? Constant:
0:? 1 (const uint)
0:? 2 (const uint)
0:? 3 (const uint)
0:? 4 (const uint)
0:322 bitFieldReverse ( temp 4-component vector of uint)
0:322 Constant:
0:322 1 (const uint)
0:322 2 (const uint)
0:322 3 (const uint)
0:322 4 (const uint)
0:323 Sequence
0:323 move second child to first child ( temp 4-component vector of float)
0:323 'r056' ( temp 4-component vector of float)
@@ -1592,11 +1592,11 @@ gl_FragCoord origin is upper left
0:336 trunc ( temp 4-component vector of float)
0:336 'inF0' ( in 4-component vector of float)
0:339 Branch: Return with expression
0:? Constant:
0:? 1.000000
0:? 2.000000
0:? 3.000000
0:? 4.000000
0:339 Constant:
0:339 1.000000
0:339 2.000000
0:339 3.000000
0:339 4.000000
0:402 Function Definition: PixelShaderFunction2x2(mf22;mf22;mf22; ( temp 2X2 matrix of float)
0:402 Function Parameters:
0:402 'inF0' ( in 2X2 matrix of float)
@@ -1876,11 +1876,11 @@ gl_FragCoord origin is upper left
0:404 trunc ( temp 2X2 matrix of float)
0:404 'inF0' ( in 2X2 matrix of float)
0:407 Branch: Return with expression
0:? Constant:
0:? 2.000000
0:? 2.000000
0:? 2.000000
0:? 2.000000
0:407 Constant:
0:407 2.000000
0:407 2.000000
0:407 2.000000
0:407 2.000000
0:411 Function Definition: PixelShaderFunction3x3(mf33;mf33;mf33; ( temp 3X3 matrix of float)
0:411 Function Parameters:
0:411 'inF0' ( in 3X3 matrix of float)
@@ -2165,16 +2165,16 @@ gl_FragCoord origin is upper left
0:413 trunc ( temp 3X3 matrix of float)
0:413 'inF0' ( in 3X3 matrix of float)
0:416 Branch: Return with expression
0:? Constant:
0:? 3.000000
0:? 3.000000
0:? 3.000000
0:? 3.000000
0:? 3.000000
0:? 3.000000
0:? 3.000000
0:? 3.000000
0:? 3.000000
0:416 Constant:
0:416 3.000000
0:416 3.000000
0:416 3.000000
0:416 3.000000
0:416 3.000000
0:416 3.000000
0:416 3.000000
0:416 3.000000
0:416 3.000000
0:420 Function Definition: PixelShaderFunction4x4(mf44;mf44;mf44; ( temp 4X4 matrix of float)
0:420 Function Parameters:
0:420 'inF0' ( in 4X4 matrix of float)
@@ -2466,23 +2466,23 @@ gl_FragCoord origin is upper left
0:422 trunc ( temp 4X4 matrix of float)
0:422 'inF0' ( in 4X4 matrix of float)
0:425 Branch: Return with expression
0:? Constant:
0:? 4.000000
0:? 4.000000
0:? 4.000000
0:? 4.000000
0:? 4.000000
0:? 4.000000
0:? 4.000000
0:? 4.000000
0:? 4.000000
0:? 4.000000
0:? 4.000000
0:? 4.000000
0:? 4.000000
0:? 4.000000
0:? 4.000000
0:? 4.000000
0:425 Constant:
0:425 4.000000
0:425 4.000000
0:425 4.000000
0:425 4.000000
0:425 4.000000
0:425 4.000000
0:425 4.000000
0:425 4.000000
0:425 4.000000
0:425 4.000000
0:425 4.000000
0:425 4.000000
0:425 4.000000
0:425 4.000000
0:425 4.000000
0:425 4.000000
0:443 Function Definition: TestGenMul2(f1;f1;vf2;vf2;mf22;mf22; ( temp void)
0:443 Function Parameters:
0:443 'inF0' ( in float)
@@ -3303,10 +3303,10 @@ gl_FragCoord origin is upper left
0:117 Sequence
0:117 move second child to first child ( temp 2-component vector of int)
0:117 'r016' ( temp 2-component vector of int)
0:? bitCount ( temp 2-component vector of int)
0:? Constant:
0:? 7 (const int)
0:? 3 (const int)
0:117 bitCount ( temp 2-component vector of int)
0:117 Constant:
0:117 7 (const int)
0:117 3 (const int)
0:118 Sequence
0:118 move second child to first child ( temp 2-component vector of float)
0:118 'r017' ( temp 2-component vector of float)
@@ -3374,17 +3374,17 @@ gl_FragCoord origin is upper left
0:136 Sequence
0:136 move second child to first child ( temp 2-component vector of uint)
0:136 'r031' ( temp 2-component vector of uint)
0:? findMSB ( temp 2-component vector of uint)
0:? Constant:
0:? 7 (const uint)
0:? 8 (const uint)
0:136 findMSB ( temp 2-component vector of uint)
0:136 Constant:
0:136 7 (const uint)
0:136 8 (const uint)
0:137 Sequence
0:137 move second child to first child ( temp 2-component vector of uint)
0:137 'r032' ( temp 2-component vector of uint)
0:? findLSB ( temp 2-component vector of uint)
0:? Constant:
0:? 7 (const uint)
0:? 8 (const uint)
0:137 findLSB ( temp 2-component vector of uint)
0:137 Constant:
0:137 7 (const uint)
0:137 8 (const uint)
0:138 Sequence
0:138 move second child to first child ( temp 2-component vector of float)
0:138 'r033' ( temp 2-component vector of float)
@@ -3504,10 +3504,10 @@ gl_FragCoord origin is upper left
0:159 Sequence
0:159 move second child to first child ( temp 2-component vector of uint)
0:159 'r054' ( temp 2-component vector of uint)
0:? bitFieldReverse ( temp 2-component vector of uint)
0:? Constant:
0:? 1 (const uint)
0:? 2 (const uint)
0:159 bitFieldReverse ( temp 2-component vector of uint)
0:159 Constant:
0:159 1 (const uint)
0:159 2 (const uint)
0:160 Sequence
0:160 move second child to first child ( temp 2-component vector of float)
0:160 'r055' ( temp 2-component vector of float)
@@ -3585,9 +3585,9 @@ gl_FragCoord origin is upper left
0:173 trunc ( temp 2-component vector of float)
0:173 'inF0' ( in 2-component vector of float)
0:176 Branch: Return with expression
0:? Constant:
0:? 1.000000
0:? 2.000000
0:176 Constant:
0:176 1.000000
0:176 2.000000
0:180 Function Definition: PixelShaderFunction3(vf3;vf3;vf3;vu3;vu3; ( temp 3-component vector of float)
0:180 Function Parameters:
0:180 'inF0' ( in 3-component vector of float)
@@ -3696,11 +3696,11 @@ gl_FragCoord origin is upper left
0:200 Sequence
0:200 move second child to first child ( temp 3-component vector of uint)
0:200 'r015' ( temp 3-component vector of uint)
0:? bitCount ( temp 3-component vector of uint)
0:? Constant:
0:? 7 (const uint)
0:? 3 (const uint)
0:? 5 (const uint)
0:200 bitCount ( temp 3-component vector of uint)
0:200 Constant:
0:200 7 (const uint)
0:200 3 (const uint)
0:200 5 (const uint)
0:201 Sequence
0:201 move second child to first child ( temp 3-component vector of float)
0:201 'r016' ( temp 3-component vector of float)
@@ -3774,19 +3774,19 @@ gl_FragCoord origin is upper left
0:217 Sequence
0:217 move second child to first child ( temp 3-component vector of uint)
0:217 'r032' ( temp 3-component vector of uint)
0:? findMSB ( temp 3-component vector of uint)
0:? Constant:
0:? 2 (const uint)
0:? 3 (const uint)
0:? 4 (const uint)
0:217 findMSB ( temp 3-component vector of uint)
0:217 Constant:
0:217 2 (const uint)
0:217 3 (const uint)
0:217 4 (const uint)
0:218 Sequence
0:218 move second child to first child ( temp 3-component vector of uint)
0:218 'r033' ( temp 3-component vector of uint)
0:? findLSB ( temp 3-component vector of uint)
0:? Constant:
0:? 2 (const uint)
0:? 3 (const uint)
0:? 4 (const uint)
0:218 findLSB ( temp 3-component vector of uint)
0:218 Constant:
0:218 2 (const uint)
0:218 3 (const uint)
0:218 4 (const uint)
0:219 Sequence
0:219 move second child to first child ( temp 3-component vector of float)
0:219 'r034' ( temp 3-component vector of float)
@@ -3914,11 +3914,11 @@ gl_FragCoord origin is upper left
0:241 Sequence
0:241 move second child to first child ( temp 3-component vector of uint)
0:241 'r055' ( temp 3-component vector of uint)
0:? bitFieldReverse ( temp 3-component vector of uint)
0:? Constant:
0:? 1 (const uint)
0:? 2 (const uint)
0:? 3 (const uint)
0:241 bitFieldReverse ( temp 3-component vector of uint)
0:241 Constant:
0:241 1 (const uint)
0:241 2 (const uint)
0:241 3 (const uint)
0:242 Sequence
0:242 move second child to first child ( temp 3-component vector of float)
0:242 'r056' ( temp 3-component vector of float)
@@ -3996,10 +3996,10 @@ gl_FragCoord origin is upper left
0:255 trunc ( temp 3-component vector of float)
0:255 'inF0' ( in 3-component vector of float)
0:258 Branch: Return with expression
0:? Constant:
0:? 1.000000
0:? 2.000000
0:? 3.000000
0:258 Constant:
0:258 1.000000
0:258 2.000000
0:258 3.000000
0:262 Function Definition: PixelShaderFunction(vf4;vf4;vf4;vu4;vu4; ( temp 4-component vector of float)
0:262 Function Parameters:
0:262 'inF0' ( in 4-component vector of float)
@@ -4110,12 +4110,12 @@ gl_FragCoord origin is upper left
0:282 Sequence
0:282 move second child to first child ( temp 4-component vector of uint)
0:282 'r015' ( temp 4-component vector of uint)
0:? bitCount ( temp 4-component vector of uint)
0:? Constant:
0:? 7 (const uint)
0:? 3 (const uint)
0:? 5 (const uint)
0:? 2 (const uint)
0:282 bitCount ( temp 4-component vector of uint)
0:282 Constant:
0:282 7 (const uint)
0:282 3 (const uint)
0:282 5 (const uint)
0:282 2 (const uint)
0:283 Sequence
0:283 move second child to first child ( temp 4-component vector of float)
0:283 'r016' ( temp 4-component vector of float)
@@ -4206,21 +4206,21 @@ gl_FragCoord origin is upper left
0:299 Sequence
0:299 move second child to first child ( temp 4-component vector of uint)
0:299 'r032' ( temp 4-component vector of uint)
0:? findMSB ( temp 4-component vector of uint)
0:? Constant:
0:? 7 (const uint)
0:? 8 (const uint)
0:? 9 (const uint)
0:? 10 (const uint)
0:299 findMSB ( temp 4-component vector of uint)
0:299 Constant:
0:299 7 (const uint)
0:299 8 (const uint)
0:299 9 (const uint)
0:299 10 (const uint)
0:300 Sequence
0:300 move second child to first child ( temp 4-component vector of uint)
0:300 'r033' ( temp 4-component vector of uint)
0:? findLSB ( temp 4-component vector of uint)
0:? Constant:
0:? 7 (const uint)
0:? 8 (const uint)
0:? 9 (const uint)
0:? 10 (const uint)
0:300 findLSB ( temp 4-component vector of uint)
0:300 Constant:
0:300 7 (const uint)
0:300 8 (const uint)
0:300 9 (const uint)
0:300 10 (const uint)
0:301 Sequence
0:301 move second child to first child ( temp 4-component vector of float)
0:301 'r034' ( temp 4-component vector of float)
@@ -4340,12 +4340,12 @@ gl_FragCoord origin is upper left
0:322 Sequence
0:322 move second child to first child ( temp 4-component vector of uint)
0:322 'r055' ( temp 4-component vector of uint)
0:? bitFieldReverse ( temp 4-component vector of uint)
0:? Constant:
0:? 1 (const uint)
0:? 2 (const uint)
0:? 3 (const uint)
0:? 4 (const uint)
0:322 bitFieldReverse ( temp 4-component vector of uint)
0:322 Constant:
0:322 1 (const uint)
0:322 2 (const uint)
0:322 3 (const uint)
0:322 4 (const uint)
0:323 Sequence
0:323 move second child to first child ( temp 4-component vector of float)
0:323 'r056' ( temp 4-component vector of float)
@@ -4423,11 +4423,11 @@ gl_FragCoord origin is upper left
0:336 trunc ( temp 4-component vector of float)
0:336 'inF0' ( in 4-component vector of float)
0:339 Branch: Return with expression
0:? Constant:
0:? 1.000000
0:? 2.000000
0:? 3.000000
0:? 4.000000
0:339 Constant:
0:339 1.000000
0:339 2.000000
0:339 3.000000
0:339 4.000000
0:402 Function Definition: PixelShaderFunction2x2(mf22;mf22;mf22; ( temp 2X2 matrix of float)
0:402 Function Parameters:
0:402 'inF0' ( in 2X2 matrix of float)
@@ -4707,11 +4707,11 @@ gl_FragCoord origin is upper left
0:404 trunc ( temp 2X2 matrix of float)
0:404 'inF0' ( in 2X2 matrix of float)
0:407 Branch: Return with expression
0:? Constant:
0:? 2.000000
0:? 2.000000
0:? 2.000000
0:? 2.000000
0:407 Constant:
0:407 2.000000
0:407 2.000000
0:407 2.000000
0:407 2.000000
0:411 Function Definition: PixelShaderFunction3x3(mf33;mf33;mf33; ( temp 3X3 matrix of float)
0:411 Function Parameters:
0:411 'inF0' ( in 3X3 matrix of float)
@@ -4996,16 +4996,16 @@ gl_FragCoord origin is upper left
0:413 trunc ( temp 3X3 matrix of float)
0:413 'inF0' ( in 3X3 matrix of float)
0:416 Branch: Return with expression
0:? Constant:
0:? 3.000000
0:? 3.000000
0:? 3.000000
0:? 3.000000
0:? 3.000000
0:? 3.000000
0:? 3.000000
0:? 3.000000
0:? 3.000000
0:416 Constant:
0:416 3.000000
0:416 3.000000
0:416 3.000000
0:416 3.000000
0:416 3.000000
0:416 3.000000
0:416 3.000000
0:416 3.000000
0:416 3.000000
0:420 Function Definition: PixelShaderFunction4x4(mf44;mf44;mf44; ( temp 4X4 matrix of float)
0:420 Function Parameters:
0:420 'inF0' ( in 4X4 matrix of float)
@@ -5297,23 +5297,23 @@ gl_FragCoord origin is upper left
0:422 trunc ( temp 4X4 matrix of float)
0:422 'inF0' ( in 4X4 matrix of float)
0:425 Branch: Return with expression
0:? Constant:
0:? 4.000000
0:? 4.000000
0:? 4.000000
0:? 4.000000
0:? 4.000000
0:? 4.000000
0:? 4.000000
0:? 4.000000
0:? 4.000000
0:? 4.000000
0:? 4.000000
0:? 4.000000
0:? 4.000000
0:? 4.000000
0:? 4.000000
0:? 4.000000
0:425 Constant:
0:425 4.000000
0:425 4.000000
0:425 4.000000
0:425 4.000000
0:425 4.000000
0:425 4.000000
0:425 4.000000
0:425 4.000000
0:425 4.000000
0:425 4.000000
0:425 4.000000
0:425 4.000000
0:425 4.000000
0:425 4.000000
0:425 4.000000
0:425 4.000000
0:443 Function Definition: TestGenMul2(f1;f1;vf2;vf2;mf22;mf22; ( temp void)
0:443 Function Parameters:
0:443 'inF0' ( in float)