HLSL: fix array[1] of vec4 constant declaration.

This commit is contained in:
xavier 2017-08-20 10:44:21 +02:00 committed by John Kessenich
parent c64a9dd6a9
commit ae8af5d33e
6 changed files with 381 additions and 245 deletions

View File

@ -754,7 +754,7 @@ ERROR: 0:29: 'constructor' : cannot convert parameter 2 from ' const 2X2 matrix
ERROR: 0:29: ' const 2-element array of 4-component vector of float' : cannot construct with these arguments ERROR: 0:29: ' const 2-element array of 4-component vector of float' : cannot construct with these arguments
ERROR: 0:29: '=' : cannot convert from ' const float' to ' global 2-element array of 4-component vector of float' ERROR: 0:29: '=' : cannot convert from ' const float' to ' global 2-element array of 4-component vector of float'
ERROR: 0:30: 'initializer list' : wrong number of matrix columns: temp 4X2 matrix of float ERROR: 0:30: 'initializer list' : wrong number of matrix columns: temp 4X2 matrix of float
ERROR: 0:40: 'constructor' : cannot convert parameter 1 from ' temp float' to ' temp structure{ global float s, global float t}' ERROR: 0:40: 'constructor' : cannot convert parameter 1 from ' const structure{ global 4-component vector of float a, global 4-component vector of float b}' to ' temp structure{ global float s, global float t}'
ERROR: 0:70: 'initializer list' : wrong number of structure members ERROR: 0:70: 'initializer list' : wrong number of structure members
ERROR: 13 compilation errors. No code generated. ERROR: 13 compilation errors. No code generated.

View File

@ -10,7 +10,7 @@ ERROR: 0:29: 'constructor' : cannot convert parameter 2 from ' const 2X2 matrix
ERROR: 0:29: ' const 2-element array of 4-component vector of float' : cannot construct with these arguments ERROR: 0:29: ' const 2-element array of 4-component vector of float' : cannot construct with these arguments
ERROR: 0:29: '=' : cannot convert from ' const float' to ' global 2-element array of 4-component vector of float' ERROR: 0:29: '=' : cannot convert from ' const float' to ' global 2-element array of 4-component vector of float'
ERROR: 0:30: 'initializer list' : wrong number of matrix columns: temp 4X2 matrix of float ERROR: 0:30: 'initializer list' : wrong number of matrix columns: temp 4X2 matrix of float
ERROR: 0:40: 'constructor' : cannot convert parameter 1 from ' temp float' to ' temp structure{ global float s, global float t}' ERROR: 0:40: 'constructor' : cannot convert parameter 1 from ' const structure{ global 4-component vector of float a, global 4-component vector of float b}' to ' temp structure{ global float s, global float t}'
ERROR: 0:70: 'initializer list' : wrong number of structure members ERROR: 0:70: 'initializer list' : wrong number of structure members
ERROR: 13 compilation errors. No code generated. ERROR: 13 compilation errors. No code generated.

View File

@ -10,87 +10,134 @@ gl_FragCoord origin is upper left
0:? 2.000000 0:? 2.000000
0:? 3.000000 0:? 3.000000
0:? 4.000000 0:? 4.000000
0:10 Function Definition: @PixelShaderFunction(i1;vf4[3]; ( temp 4-component vector of float) 0:11 Sequence
0:10 Function Parameters: 0:11 move second child to first child ( temp 2-element array of 4-component vector of float)
0:10 'i' ( in int) 0:11 'c2' ( global 2-element array of 4-component vector of float)
0:10 'input' ( in 3-element array of 4-component vector of float) 0:11 Construct vec4 ( temp 2-element array of 4-component vector of float)
0:11 'C' ( global 4-component vector of float)
0:? Constant:
0:? 1.000000
0:? 2.000000
0:? 3.000000
0:? 4.000000
0:14 Function Definition: @PixelShaderFunction(i1;vf4[3]; ( temp 4-component vector of float)
0:14 Function Parameters:
0:14 'i' ( in int)
0:14 'input' ( in 3-element array of 4-component vector of float)
0:? Sequence 0:? Sequence
0:11 Sequence 0:15 Sequence
0:11 move second child to first child ( temp 10-element array of 4-component vector of float) 0:15 move second child to first child ( temp 10-element array of 4-component vector of float)
0:11 'b' ( temp 10-element array of 4-component vector of float) 0:15 'b' ( temp 10-element array of 4-component vector of float)
0:11 Construct vec4 ( temp 10-element array of 4-component vector of float) 0:15 Construct vec4 ( temp 10-element array of 4-component vector of float)
0:11 'C' ( global 4-component vector of float) 0:15 'C' ( global 4-component vector of float)
0:11 'C' ( global 4-component vector of float) 0:15 'C' ( global 4-component vector of float)
0:11 'C' ( global 4-component vector of float) 0:15 'C' ( global 4-component vector of float)
0:11 'C' ( global 4-component vector of float) 0:15 'C' ( global 4-component vector of float)
0:11 'C' ( global 4-component vector of float) 0:15 'C' ( global 4-component vector of float)
0:11 'C' ( global 4-component vector of float) 0:15 'C' ( global 4-component vector of float)
0:11 'C' ( global 4-component vector of float) 0:15 'C' ( global 4-component vector of float)
0:11 'C' ( global 4-component vector of float) 0:15 'C' ( global 4-component vector of float)
0:11 'C' ( global 4-component vector of float) 0:15 'C' ( global 4-component vector of float)
0:11 'C' ( global 4-component vector of float) 0:15 'C' ( global 4-component vector of float)
0:12 Branch: Return with expression 0:16 Sequence
0:12 add ( temp 4-component vector of float) 0:16 move second child to first child ( temp 4-component vector of float)
0:12 add ( temp 4-component vector of float) 0:16 'tmp' ( temp 4-component vector of float)
0:12 add ( temp 4-component vector of float) 0:16 add ( temp 4-component vector of float)
0:12 add ( temp 4-component vector of float) 0:16 add ( temp 4-component vector of float)
0:12 add ( temp 4-component vector of float) 0:16 add ( temp 4-component vector of float)
0:12 add ( temp 4-component vector of float) 0:16 add ( temp 4-component vector of float)
0:12 direct index ( temp 4-component vector of float) 0:16 'C' ( global 4-component vector of float)
0:12 a: direct index for structure ( uniform 4-element array of 4-component vector of float) 0:16 direct index ( temp 4-component vector of float)
0:12 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a, uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s}) 0:16 a1: direct index for structure ( uniform 1-element array of 4-component vector of float)
0:12 Constant: 0:16 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a, uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s, uniform 1-element array of 4-component vector of float a1, uniform 2-element array of 4-component vector of float a2})
0:12 0 (const uint) 0:16 Constant:
0:12 Constant: 0:16 2 (const uint)
0:12 1 (const int) 0:16 Constant:
0:12 indirect index ( temp 4-component vector of float) 0:16 0 (const int)
0:12 a: direct index for structure ( uniform 4-element array of 4-component vector of float) 0:16 Constant:
0:12 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a, uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s}) 0:16 1.000000
0:12 Constant: 0:16 2.000000
0:12 0 (const uint) 0:16 3.000000
0:12 'i' ( in int) 0:16 4.000000
0:12 direct index ( temp 4-component vector of float) 0:16 indirect index ( temp 4-component vector of float)
0:12 'input' ( in 3-element array of 4-component vector of float) 0:16 a2: direct index for structure ( uniform 2-element array of 4-component vector of float)
0:12 Constant: 0:16 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a, uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s, uniform 1-element array of 4-component vector of float a1, uniform 2-element array of 4-component vector of float a2})
0:12 2 (const int) 0:16 Constant:
0:12 indirect index ( temp 4-component vector of float) 0:16 3 (const uint)
0:12 'input' ( in 3-element array of 4-component vector of float) 0:16 'i' ( in int)
0:12 'i' ( in int) 0:16 indirect index ( temp 4-component vector of float)
0:12 direct index ( temp 4-component vector of float) 0:16 'c2' ( global 2-element array of 4-component vector of float)
0:12 'b' ( temp 10-element array of 4-component vector of float) 0:16 'i' ( in int)
0:12 Constant: 0:17 Branch: Return with expression
0:12 5 (const int) 0:17 add ( temp 4-component vector of float)
0:12 indirect index ( temp 4-component vector of float) 0:17 add ( temp 4-component vector of float)
0:12 'b' ( temp 10-element array of 4-component vector of float) 0:17 add ( temp 4-component vector of float)
0:12 'i' ( in int) 0:17 add ( temp 4-component vector of float)
0:12 indirect index ( temp 4-component vector of float) 0:17 add ( temp 4-component vector of float)
0:12 m: direct index for structure ( temp 7-element array of 4-component vector of float) 0:17 add ( temp 4-component vector of float)
0:12 indirect index ( temp structure{ temp 7-element array of 4-component vector of float m}) 0:17 add ( temp 4-component vector of float)
0:12 s: direct index for structure ( uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m}) 0:17 direct index ( temp 4-component vector of float)
0:12 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a, uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s}) 0:17 a: direct index for structure ( uniform 4-element array of 4-component vector of float)
0:12 Constant: 0:17 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a, uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s, uniform 1-element array of 4-component vector of float a1, uniform 2-element array of 4-component vector of float a2})
0:12 1 (const uint) 0:17 Constant:
0:12 'i' ( in int) 0:17 0 (const uint)
0:12 Constant: 0:17 Constant:
0:12 0 (const int) 0:17 1 (const int)
0:12 'i' ( in int) 0:17 indirect index ( temp 4-component vector of float)
0:10 Function Definition: PixelShaderFunction( ( temp void) 0:17 a: direct index for structure ( uniform 4-element array of 4-component vector of float)
0:10 Function Parameters: 0:17 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a, uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s, uniform 1-element array of 4-component vector of float a1, uniform 2-element array of 4-component vector of float a2})
0:17 Constant:
0:17 0 (const uint)
0:17 'i' ( in int)
0:17 direct index ( temp 4-component vector of float)
0:17 'input' ( in 3-element array of 4-component vector of float)
0:17 Constant:
0:17 2 (const int)
0:17 indirect index ( temp 4-component vector of float)
0:17 'input' ( in 3-element array of 4-component vector of float)
0:17 'i' ( in int)
0:17 direct index ( temp 4-component vector of float)
0:17 'b' ( temp 10-element array of 4-component vector of float)
0:17 Constant:
0:17 5 (const int)
0:17 indirect index ( temp 4-component vector of float)
0:17 'b' ( temp 10-element array of 4-component vector of float)
0:17 'i' ( in int)
0:17 indirect index ( temp 4-component vector of float)
0:17 m: direct index for structure ( temp 7-element array of 4-component vector of float)
0:17 indirect index ( temp structure{ temp 7-element array of 4-component vector of float m})
0:17 s: direct index for structure ( uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m})
0:17 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a, uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s, uniform 1-element array of 4-component vector of float a1, uniform 2-element array of 4-component vector of float a2})
0:17 Constant:
0:17 1 (const uint)
0:17 'i' ( in int)
0:17 Constant:
0:17 0 (const int)
0:17 'i' ( in int)
0:17 'tmp' ( temp 4-component vector of float)
0:14 Function Definition: PixelShaderFunction( ( temp void)
0:14 Function Parameters:
0:? Sequence 0:? Sequence
0:10 move second child to first child ( temp int) 0:14 move second child to first child ( temp int)
0:? 'i' ( temp int) 0:? 'i' ( temp int)
0:? 'i' (layout( location=0) flat in int) 0:? 'i' (layout( location=0) flat in int)
0:10 move second child to first child ( temp 3-element array of 4-component vector of float) 0:14 move second child to first child ( temp 3-element array of 4-component vector of float)
0:? 'input' ( temp 3-element array of 4-component vector of float) 0:? 'input' ( temp 3-element array of 4-component vector of float)
0:? 'input' (layout( location=1) in 3-element array of 4-component vector of float) 0:? 'input' (layout( location=1) in 3-element array of 4-component vector of float)
0:10 move second child to first child ( temp 4-component vector of float) 0:14 move second child to first child ( temp 4-component vector of float)
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
0:10 Function Call: @PixelShaderFunction(i1;vf4[3]; ( temp 4-component vector of float) 0:14 Function Call: @PixelShaderFunction(i1;vf4[3]; ( temp 4-component vector of float)
0:? 'i' ( temp int) 0:? 'i' ( temp int)
0:? 'input' ( temp 3-element array of 4-component vector of float) 0:? 'input' ( temp 3-element array of 4-component vector of float)
0:? Linker Objects 0:? Linker Objects
0:? 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a, uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s}) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a, uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s, uniform 1-element array of 4-component vector of float a1, uniform 2-element array of 4-component vector of float a2})
0:? 'C' ( global 4-component vector of float) 0:? 'C' ( global 4-component vector of float)
0:? 'c1' ( const 1-element array of 4-component vector of float)
0:? 1.000000
0:? 2.000000
0:? 3.000000
0:? 4.000000
0:? 'c2' ( global 2-element array of 4-component vector of float)
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
0:? 'i' (layout( location=0) flat in int) 0:? 'i' (layout( location=0) flat in int)
0:? 'input' (layout( location=1) in 3-element array of 4-component vector of float) 0:? 'input' (layout( location=1) in 3-element array of 4-component vector of float)
@ -110,99 +157,146 @@ gl_FragCoord origin is upper left
0:? 2.000000 0:? 2.000000
0:? 3.000000 0:? 3.000000
0:? 4.000000 0:? 4.000000
0:10 Function Definition: @PixelShaderFunction(i1;vf4[3]; ( temp 4-component vector of float) 0:11 Sequence
0:10 Function Parameters: 0:11 move second child to first child ( temp 2-element array of 4-component vector of float)
0:10 'i' ( in int) 0:11 'c2' ( global 2-element array of 4-component vector of float)
0:10 'input' ( in 3-element array of 4-component vector of float) 0:11 Construct vec4 ( temp 2-element array of 4-component vector of float)
0:11 'C' ( global 4-component vector of float)
0:? Constant:
0:? 1.000000
0:? 2.000000
0:? 3.000000
0:? 4.000000
0:14 Function Definition: @PixelShaderFunction(i1;vf4[3]; ( temp 4-component vector of float)
0:14 Function Parameters:
0:14 'i' ( in int)
0:14 'input' ( in 3-element array of 4-component vector of float)
0:? Sequence 0:? Sequence
0:11 Sequence 0:15 Sequence
0:11 move second child to first child ( temp 10-element array of 4-component vector of float) 0:15 move second child to first child ( temp 10-element array of 4-component vector of float)
0:11 'b' ( temp 10-element array of 4-component vector of float) 0:15 'b' ( temp 10-element array of 4-component vector of float)
0:11 Construct vec4 ( temp 10-element array of 4-component vector of float) 0:15 Construct vec4 ( temp 10-element array of 4-component vector of float)
0:11 'C' ( global 4-component vector of float) 0:15 'C' ( global 4-component vector of float)
0:11 'C' ( global 4-component vector of float) 0:15 'C' ( global 4-component vector of float)
0:11 'C' ( global 4-component vector of float) 0:15 'C' ( global 4-component vector of float)
0:11 'C' ( global 4-component vector of float) 0:15 'C' ( global 4-component vector of float)
0:11 'C' ( global 4-component vector of float) 0:15 'C' ( global 4-component vector of float)
0:11 'C' ( global 4-component vector of float) 0:15 'C' ( global 4-component vector of float)
0:11 'C' ( global 4-component vector of float) 0:15 'C' ( global 4-component vector of float)
0:11 'C' ( global 4-component vector of float) 0:15 'C' ( global 4-component vector of float)
0:11 'C' ( global 4-component vector of float) 0:15 'C' ( global 4-component vector of float)
0:11 'C' ( global 4-component vector of float) 0:15 'C' ( global 4-component vector of float)
0:12 Branch: Return with expression 0:16 Sequence
0:12 add ( temp 4-component vector of float) 0:16 move second child to first child ( temp 4-component vector of float)
0:12 add ( temp 4-component vector of float) 0:16 'tmp' ( temp 4-component vector of float)
0:12 add ( temp 4-component vector of float) 0:16 add ( temp 4-component vector of float)
0:12 add ( temp 4-component vector of float) 0:16 add ( temp 4-component vector of float)
0:12 add ( temp 4-component vector of float) 0:16 add ( temp 4-component vector of float)
0:12 add ( temp 4-component vector of float) 0:16 add ( temp 4-component vector of float)
0:12 direct index ( temp 4-component vector of float) 0:16 'C' ( global 4-component vector of float)
0:12 a: direct index for structure ( uniform 4-element array of 4-component vector of float) 0:16 direct index ( temp 4-component vector of float)
0:12 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a, uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s}) 0:16 a1: direct index for structure ( uniform 1-element array of 4-component vector of float)
0:12 Constant: 0:16 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a, uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s, uniform 1-element array of 4-component vector of float a1, uniform 2-element array of 4-component vector of float a2})
0:12 0 (const uint) 0:16 Constant:
0:12 Constant: 0:16 2 (const uint)
0:12 1 (const int) 0:16 Constant:
0:12 indirect index ( temp 4-component vector of float) 0:16 0 (const int)
0:12 a: direct index for structure ( uniform 4-element array of 4-component vector of float) 0:16 Constant:
0:12 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a, uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s}) 0:16 1.000000
0:12 Constant: 0:16 2.000000
0:12 0 (const uint) 0:16 3.000000
0:12 'i' ( in int) 0:16 4.000000
0:12 direct index ( temp 4-component vector of float) 0:16 indirect index ( temp 4-component vector of float)
0:12 'input' ( in 3-element array of 4-component vector of float) 0:16 a2: direct index for structure ( uniform 2-element array of 4-component vector of float)
0:12 Constant: 0:16 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a, uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s, uniform 1-element array of 4-component vector of float a1, uniform 2-element array of 4-component vector of float a2})
0:12 2 (const int) 0:16 Constant:
0:12 indirect index ( temp 4-component vector of float) 0:16 3 (const uint)
0:12 'input' ( in 3-element array of 4-component vector of float) 0:16 'i' ( in int)
0:12 'i' ( in int) 0:16 indirect index ( temp 4-component vector of float)
0:12 direct index ( temp 4-component vector of float) 0:16 'c2' ( global 2-element array of 4-component vector of float)
0:12 'b' ( temp 10-element array of 4-component vector of float) 0:16 'i' ( in int)
0:12 Constant: 0:17 Branch: Return with expression
0:12 5 (const int) 0:17 add ( temp 4-component vector of float)
0:12 indirect index ( temp 4-component vector of float) 0:17 add ( temp 4-component vector of float)
0:12 'b' ( temp 10-element array of 4-component vector of float) 0:17 add ( temp 4-component vector of float)
0:12 'i' ( in int) 0:17 add ( temp 4-component vector of float)
0:12 indirect index ( temp 4-component vector of float) 0:17 add ( temp 4-component vector of float)
0:12 m: direct index for structure ( temp 7-element array of 4-component vector of float) 0:17 add ( temp 4-component vector of float)
0:12 indirect index ( temp structure{ temp 7-element array of 4-component vector of float m}) 0:17 add ( temp 4-component vector of float)
0:12 s: direct index for structure ( uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m}) 0:17 direct index ( temp 4-component vector of float)
0:12 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a, uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s}) 0:17 a: direct index for structure ( uniform 4-element array of 4-component vector of float)
0:12 Constant: 0:17 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a, uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s, uniform 1-element array of 4-component vector of float a1, uniform 2-element array of 4-component vector of float a2})
0:12 1 (const uint) 0:17 Constant:
0:12 'i' ( in int) 0:17 0 (const uint)
0:12 Constant: 0:17 Constant:
0:12 0 (const int) 0:17 1 (const int)
0:12 'i' ( in int) 0:17 indirect index ( temp 4-component vector of float)
0:10 Function Definition: PixelShaderFunction( ( temp void) 0:17 a: direct index for structure ( uniform 4-element array of 4-component vector of float)
0:10 Function Parameters: 0:17 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a, uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s, uniform 1-element array of 4-component vector of float a1, uniform 2-element array of 4-component vector of float a2})
0:17 Constant:
0:17 0 (const uint)
0:17 'i' ( in int)
0:17 direct index ( temp 4-component vector of float)
0:17 'input' ( in 3-element array of 4-component vector of float)
0:17 Constant:
0:17 2 (const int)
0:17 indirect index ( temp 4-component vector of float)
0:17 'input' ( in 3-element array of 4-component vector of float)
0:17 'i' ( in int)
0:17 direct index ( temp 4-component vector of float)
0:17 'b' ( temp 10-element array of 4-component vector of float)
0:17 Constant:
0:17 5 (const int)
0:17 indirect index ( temp 4-component vector of float)
0:17 'b' ( temp 10-element array of 4-component vector of float)
0:17 'i' ( in int)
0:17 indirect index ( temp 4-component vector of float)
0:17 m: direct index for structure ( temp 7-element array of 4-component vector of float)
0:17 indirect index ( temp structure{ temp 7-element array of 4-component vector of float m})
0:17 s: direct index for structure ( uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m})
0:17 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a, uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s, uniform 1-element array of 4-component vector of float a1, uniform 2-element array of 4-component vector of float a2})
0:17 Constant:
0:17 1 (const uint)
0:17 'i' ( in int)
0:17 Constant:
0:17 0 (const int)
0:17 'i' ( in int)
0:17 'tmp' ( temp 4-component vector of float)
0:14 Function Definition: PixelShaderFunction( ( temp void)
0:14 Function Parameters:
0:? Sequence 0:? Sequence
0:10 move second child to first child ( temp int) 0:14 move second child to first child ( temp int)
0:? 'i' ( temp int) 0:? 'i' ( temp int)
0:? 'i' (layout( location=0) flat in int) 0:? 'i' (layout( location=0) flat in int)
0:10 move second child to first child ( temp 3-element array of 4-component vector of float) 0:14 move second child to first child ( temp 3-element array of 4-component vector of float)
0:? 'input' ( temp 3-element array of 4-component vector of float) 0:? 'input' ( temp 3-element array of 4-component vector of float)
0:? 'input' (layout( location=1) in 3-element array of 4-component vector of float) 0:? 'input' (layout( location=1) in 3-element array of 4-component vector of float)
0:10 move second child to first child ( temp 4-component vector of float) 0:14 move second child to first child ( temp 4-component vector of float)
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
0:10 Function Call: @PixelShaderFunction(i1;vf4[3]; ( temp 4-component vector of float) 0:14 Function Call: @PixelShaderFunction(i1;vf4[3]; ( temp 4-component vector of float)
0:? 'i' ( temp int) 0:? 'i' ( temp int)
0:? 'input' ( temp 3-element array of 4-component vector of float) 0:? 'input' ( temp 3-element array of 4-component vector of float)
0:? Linker Objects 0:? Linker Objects
0:? 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a, uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s}) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a, uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s, uniform 1-element array of 4-component vector of float a1, uniform 2-element array of 4-component vector of float a2})
0:? 'C' ( global 4-component vector of float) 0:? 'C' ( global 4-component vector of float)
0:? 'c1' ( const 1-element array of 4-component vector of float)
0:? 1.000000
0:? 2.000000
0:? 3.000000
0:? 4.000000
0:? 'c2' ( global 2-element array of 4-component vector of float)
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
0:? 'i' (layout( location=0) flat in int) 0:? 'i' (layout( location=0) flat in int)
0:? 'input' (layout( location=1) in 3-element array of 4-component vector of float) 0:? 'input' (layout( location=1) in 3-element array of 4-component vector of float)
// Module Version 10000 // Module Version 10000
// Generated by (magic number): 80001 // Generated by (magic number): 80001
// Id's are bound by 99 // Id's are bound by 126
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "PixelShaderFunction" 86 90 93 EntryPoint Fragment 4 "PixelShaderFunction" 112 116 119
ExecutionMode 4 OriginUpperLeft ExecutionMode 4 OriginUpperLeft
Source HLSL 500 Source HLSL 500
Name 4 "PixelShaderFunction" Name 4 "PixelShaderFunction"
@ -210,32 +304,40 @@ gl_FragCoord origin is upper left
Name 15 "i" Name 15 "i"
Name 16 "input" Name 16 "input"
Name 20 "C" Name 20 "C"
Name 29 "b" Name 29 "c2"
Name 45 "" Name 35 "b"
MemberName 45 0 "m" Name 48 "tmp"
Name 48 "$Global" Name 54 ""
MemberName 48($Global) 0 "a" MemberName 54 0 "m"
MemberName 48($Global) 1 "s" Name 60 "$Global"
Name 50 "" MemberName 60($Global) 0 "a"
Name 84 "i" MemberName 60($Global) 1 "s"
Name 86 "i" MemberName 60($Global) 2 "a1"
Name 88 "input" MemberName 60($Global) 3 "a2"
Name 90 "input" Name 62 ""
Name 93 "@entryPointOutput" Name 110 "i"
Name 94 "param" Name 112 "i"
Name 96 "param" Name 114 "input"
Decorate 42 ArrayStride 16 Name 116 "input"
Decorate 44 ArrayStride 16 Name 119 "@entryPointOutput"
MemberDecorate 45 0 Offset 0 Name 120 "param"
Decorate 47 ArrayStride 112 Name 122 "param"
MemberDecorate 48($Global) 0 Offset 0 Decorate 51 ArrayStride 16
MemberDecorate 48($Global) 1 Offset 64 Decorate 53 ArrayStride 16
Decorate 48($Global) Block MemberDecorate 54 0 Offset 0
Decorate 50 DescriptorSet 0 Decorate 56 ArrayStride 112
Decorate 86(i) Flat Decorate 58 ArrayStride 16
Decorate 86(i) Location 0 Decorate 59 ArrayStride 16
Decorate 90(input) Location 1 MemberDecorate 60($Global) 0 Offset 0
Decorate 93(@entryPointOutput) Location 0 MemberDecorate 60($Global) 1 Offset 64
MemberDecorate 60($Global) 2 Offset 1296
MemberDecorate 60($Global) 3 Offset 1312
Decorate 60($Global) Block
Decorate 62 DescriptorSet 0
Decorate 112(i) Flat
Decorate 112(i) Location 0
Decorate 116(input) Location 1
Decorate 119(@entryPointOutput) Location 0
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeInt 32 1 6: TypeInt 32 1
@ -254,91 +356,120 @@ gl_FragCoord origin is upper left
23: 8(float) Constant 1077936128 23: 8(float) Constant 1077936128
24: 8(float) Constant 1082130432 24: 8(float) Constant 1082130432
25: 9(fvec4) ConstantComposite 21 22 23 24 25: 9(fvec4) ConstantComposite 21 22 23 24
26: 10(int) Constant 10 26: 10(int) Constant 2
27: TypeArray 9(fvec4) 26 27: TypeArray 9(fvec4) 26
28: TypePointer Function 27 28: TypePointer Private 27
41: 10(int) Constant 4 29(c2): 28(ptr) Variable Private
42: TypeArray 9(fvec4) 41 32: 10(int) Constant 10
43: 10(int) Constant 7 33: TypeArray 9(fvec4) 32
44: TypeArray 9(fvec4) 43 34: TypePointer Function 33
45: TypeStruct 44 47: TypePointer Function 9(fvec4)
46: 10(int) Constant 11 50: 10(int) Constant 4
47: TypeArray 45(struct) 46 51: TypeArray 9(fvec4) 50
48($Global): TypeStruct 42 47 52: 10(int) Constant 7
49: TypePointer Uniform 48($Global) 53: TypeArray 9(fvec4) 52
50: 49(ptr) Variable Uniform 54: TypeStruct 53
51: 6(int) Constant 0 55: 10(int) Constant 11
52: 6(int) Constant 1 56: TypeArray 54(struct) 55
53: TypePointer Uniform 9(fvec4) 57: 10(int) Constant 1
60: 6(int) Constant 2 58: TypeArray 9(fvec4) 57
61: TypePointer Function 9(fvec4) 59: TypeArray 9(fvec4) 26
69: 6(int) Constant 5 60($Global): TypeStruct 51 56 58 59
85: TypePointer Input 6(int) 61: TypePointer Uniform 60($Global)
86(i): 85(ptr) Variable Input 62: 61(ptr) Variable Uniform
89: TypePointer Input 12 63: 6(int) Constant 2
90(input): 89(ptr) Variable Input 64: 6(int) Constant 0
92: TypePointer Output 9(fvec4) 65: TypePointer Uniform 9(fvec4)
93(@entryPointOutput): 92(ptr) Variable Output 70: 6(int) Constant 3
79: 6(int) Constant 1
93: 6(int) Constant 5
111: TypePointer Input 6(int)
112(i): 111(ptr) Variable Input
115: TypePointer Input 12
116(input): 115(ptr) Variable Input
118: TypePointer Output 9(fvec4)
119(@entryPointOutput): 118(ptr) Variable Output
125: 58 ConstantComposite 25
4(PixelShaderFunction): 2 Function None 3 4(PixelShaderFunction): 2 Function None 3
5: Label 5: Label
84(i): 7(ptr) Variable Function 110(i): 7(ptr) Variable Function
88(input): 13(ptr) Variable Function 114(input): 13(ptr) Variable Function
94(param): 7(ptr) Variable Function 120(param): 7(ptr) Variable Function
96(param): 13(ptr) Variable Function 122(param): 13(ptr) Variable Function
Store 20(C) 25 Store 20(C) 25
87: 6(int) Load 86(i) 30: 9(fvec4) Load 20(C)
Store 84(i) 87 31: 27 CompositeConstruct 30 25
91: 12 Load 90(input) Store 29(c2) 31
Store 88(input) 91 113: 6(int) Load 112(i)
95: 6(int) Load 84(i) Store 110(i) 113
Store 94(param) 95 117: 12 Load 116(input)
97: 12 Load 88(input) Store 114(input) 117
Store 96(param) 97 121: 6(int) Load 110(i)
98: 9(fvec4) FunctionCall 17(@PixelShaderFunction(i1;vf4[3];) 94(param) 96(param) Store 120(param) 121
Store 93(@entryPointOutput) 98 123: 12 Load 114(input)
Store 122(param) 123
124: 9(fvec4) FunctionCall 17(@PixelShaderFunction(i1;vf4[3];) 120(param) 122(param)
Store 119(@entryPointOutput) 124
Return Return
FunctionEnd FunctionEnd
17(@PixelShaderFunction(i1;vf4[3];): 9(fvec4) Function None 14 17(@PixelShaderFunction(i1;vf4[3];): 9(fvec4) Function None 14
15(i): 7(ptr) FunctionParameter 15(i): 7(ptr) FunctionParameter
16(input): 13(ptr) FunctionParameter 16(input): 13(ptr) FunctionParameter
18: Label 18: Label
29(b): 28(ptr) Variable Function 35(b): 34(ptr) Variable Function
30: 9(fvec4) Load 20(C) 48(tmp): 47(ptr) Variable Function
31: 9(fvec4) Load 20(C)
32: 9(fvec4) Load 20(C)
33: 9(fvec4) Load 20(C)
34: 9(fvec4) Load 20(C)
35: 9(fvec4) Load 20(C)
36: 9(fvec4) Load 20(C) 36: 9(fvec4) Load 20(C)
37: 9(fvec4) Load 20(C) 37: 9(fvec4) Load 20(C)
38: 9(fvec4) Load 20(C) 38: 9(fvec4) Load 20(C)
39: 9(fvec4) Load 20(C) 39: 9(fvec4) Load 20(C)
40: 27 CompositeConstruct 30 31 32 33 34 35 36 37 38 39 40: 9(fvec4) Load 20(C)
Store 29(b) 40 41: 9(fvec4) Load 20(C)
54: 53(ptr) AccessChain 50 51 52 42: 9(fvec4) Load 20(C)
55: 9(fvec4) Load 54 43: 9(fvec4) Load 20(C)
56: 6(int) Load 15(i) 44: 9(fvec4) Load 20(C)
57: 53(ptr) AccessChain 50 51 56 45: 9(fvec4) Load 20(C)
58: 9(fvec4) Load 57 46: 33 CompositeConstruct 36 37 38 39 40 41 42 43 44 45
59: 9(fvec4) FAdd 55 58 Store 35(b) 46
62: 61(ptr) AccessChain 16(input) 60 49: 9(fvec4) Load 20(C)
63: 9(fvec4) Load 62 66: 65(ptr) AccessChain 62 63 64
64: 9(fvec4) FAdd 59 63
65: 6(int) Load 15(i)
66: 61(ptr) AccessChain 16(input) 65
67: 9(fvec4) Load 66 67: 9(fvec4) Load 66
68: 9(fvec4) FAdd 64 67 68: 9(fvec4) FAdd 49 67
70: 61(ptr) AccessChain 29(b) 69 69: 9(fvec4) FAdd 68 25
71: 9(fvec4) Load 70 71: 6(int) Load 15(i)
72: 9(fvec4) FAdd 68 71 72: 65(ptr) AccessChain 62 70 71
73: 6(int) Load 15(i) 73: 9(fvec4) Load 72
74: 61(ptr) AccessChain 29(b) 73 74: 9(fvec4) FAdd 69 73
75: 9(fvec4) Load 74 75: 6(int) Load 15(i)
76: 9(fvec4) FAdd 72 75 76: 19(ptr) AccessChain 29(c2) 75
77: 6(int) Load 15(i) 77: 9(fvec4) Load 76
78: 6(int) Load 15(i) 78: 9(fvec4) FAdd 74 77
79: 53(ptr) AccessChain 50 52 77 51 78 Store 48(tmp) 78
80: 9(fvec4) Load 79 80: 65(ptr) AccessChain 62 64 79
81: 9(fvec4) FAdd 76 80 81: 9(fvec4) Load 80
ReturnValue 81 82: 6(int) Load 15(i)
83: 65(ptr) AccessChain 62 64 82
84: 9(fvec4) Load 83
85: 9(fvec4) FAdd 81 84
86: 47(ptr) AccessChain 16(input) 63
87: 9(fvec4) Load 86
88: 9(fvec4) FAdd 85 87
89: 6(int) Load 15(i)
90: 47(ptr) AccessChain 16(input) 89
91: 9(fvec4) Load 90
92: 9(fvec4) FAdd 88 91
94: 47(ptr) AccessChain 35(b) 93
95: 9(fvec4) Load 94
96: 9(fvec4) FAdd 92 95
97: 6(int) Load 15(i)
98: 47(ptr) AccessChain 35(b) 97
99: 9(fvec4) Load 98
100: 9(fvec4) FAdd 96 99
101: 6(int) Load 15(i)
102: 6(int) Load 15(i)
103: 65(ptr) AccessChain 62 79 101 64 102
104: 9(fvec4) Load 103
105: 9(fvec4) FAdd 100 104
106: 9(fvec4) Load 48(tmp)
107: 9(fvec4) FAdd 105 106
ReturnValue 107
FunctionEnd FunctionEnd

View File

@ -5,9 +5,14 @@ struct {
} s[11]; } s[11];
static float4 C = float4(1,2,3,4); static float4 C = float4(1,2,3,4);
float4 a1[1] = { float4(1,2,3,4) };
float4 a2[2] = { float4(1,2,3,4), float4(5,2,3,4), };
const float4 c1[1] = { float4(1,2,3,4) };
static const float4 c2[2] = { C, float4(1,2,3,4), };
float4 PixelShaderFunction(int i : sem1, float4 input[3] : sem2) : SV_TARGET0 float4 PixelShaderFunction(int i : sem1, float4 input[3] : sem2) : SV_TARGET0
{ {
float4 b[10] = { C, C, C, C, C, C, C, C, C, C }; float4 b[10] = { C, C, C, C, C, C, C, C, C, C };
return a[1] + a[i] + input[2] + input[i] + b[5] + b[i] + s[i].m[i]; float4 tmp = C + a1[0] + c1[0] + a2[i] + c2[i];
return a[1] + a[i] + input[2] + input[i] + b[5] + b[i] + s[i].m[i] + tmp;
} }

View File

@ -5474,7 +5474,7 @@ TIntermTyped* TParseContext::addConstructor(const TSourceLoc& loc, TIntermNode*
bool singleArg; bool singleArg;
if (aggrNode) { if (aggrNode) {
if (aggrNode->getOp() != EOpNull || aggrNode->getSequence().size() == 1) if (aggrNode->getOp() != EOpNull)
singleArg = true; singleArg = true;
else else
singleArg = false; singleArg = false;

View File

@ -7828,7 +7828,7 @@ TIntermTyped* HlslParseContext::addConstructor(const TSourceLoc& loc, TIntermTyp
bool singleArg; bool singleArg;
if (aggrNode != nullptr) { if (aggrNode != nullptr) {
if (aggrNode->getOp() != EOpNull || aggrNode->getSequence().size() == 1) if (aggrNode->getOp() != EOpNull)
singleArg = true; singleArg = true;
else else
singleArg = false; singleArg = false;