Commit b5e739c2 by John Kessenich

HLSL: Fix boolean conversion bug and add more tests for ?:.

Null-conversion needs the right sized vectors to kick out with matching types.
parent 636b62db
...@@ -5,154 +5,200 @@ gl_FragCoord origin is upper left ...@@ -5,154 +5,200 @@ gl_FragCoord origin is upper left
0:8 Function Definition: vectorCond( ( temp 4-component vector of float) 0:8 Function Definition: vectorCond( ( temp 4-component vector of float)
0:8 Function Parameters: 0:8 Function Parameters:
0:? Sequence 0:? Sequence
0:10 Branch: Return with expression 0:11 Branch: Return with expression
0:9 add ( temp 4-component vector of float) 0:10 add ( temp 4-component vector of float)
0:9 mix ( temp 4-component vector of float) 0:9 add ( temp 4-component vector of float)
0:9 f4: direct index for structure ( uniform 4-component vector of float) 0:9 mix ( temp 4-component vector of float)
0:9 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) 0:9 f4: direct index for structure ( uniform 4-component vector of float)
0:9 Constant:
0:9 2 (const uint)
0:9 t4: direct index for structure ( uniform 4-component vector of float)
0:9 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f})
0:9 Constant:
0:9 1 (const uint)
0:9 Convert float to bool ( temp 4-component vector of bool)
0:9 c4: direct index for structure ( uniform 4-component vector of float)
0:9 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) 0:9 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f})
0:9 Constant: 0:9 Constant:
0:9 0 (const uint) 0:9 2 (const uint)
0:10 mix ( temp 4-component vector of float) 0:9 t4: direct index for structure ( uniform 4-component vector of float)
0:10 Construct vec4 ( temp 4-component vector of float) 0:9 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f})
0:10 f: direct index for structure ( uniform float) 0:9 Constant:
0:10 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) 0:9 1 (const uint)
0:10 Constant: 0:9 Convert float to bool ( temp 4-component vector of bool)
0:10 4 (const uint) 0:9 c4: direct index for structure ( uniform 4-component vector of float)
0:10 Construct vec4 ( temp 4-component vector of float) 0:9 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f})
0:10 t: direct index for structure ( uniform float) 0:9 Constant:
0:10 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) 0:9 0 (const uint)
0:10 Constant: 0:10 mix ( temp 4-component vector of float)
0:10 3 (const uint) 0:10 Construct vec4 ( temp 4-component vector of float)
0:10 Convert float to bool ( temp 4-component vector of bool) 0:10 f: direct index for structure ( uniform float)
0:10 c4: direct index for structure ( uniform 4-component vector of float) 0:10 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f})
0:10 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) 0:10 Constant:
0:10 Constant: 0:10 4 (const uint)
0:10 0 (const uint) 0:10 Construct vec4 ( temp 4-component vector of float)
0:14 Function Definition: @PixelShaderFunction(vf4; ( temp 4-component vector of float) 0:10 t: direct index for structure ( uniform float)
0:14 Function Parameters: 0:10 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f})
0:14 'input' ( in 4-component vector of float) 0:10 Constant:
0:10 3 (const uint)
0:10 Convert float to bool ( temp 4-component vector of bool)
0:10 c4: direct index for structure ( uniform 4-component vector of float)
0:10 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f})
0:10 Constant:
0:10 0 (const uint)
0:11 mix ( temp 4-component vector of float)
0:11 f4: direct index for structure ( uniform 4-component vector of float)
0:11 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f})
0:11 Constant:
0:11 2 (const uint)
0:11 t4: direct index for structure ( uniform 4-component vector of float)
0:11 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f})
0:11 Constant:
0:11 1 (const uint)
0:11 Compare Less Than ( temp 4-component vector of bool)
0:11 t4: direct index for structure ( uniform 4-component vector of float)
0:11 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f})
0:11 Constant:
0:11 1 (const uint)
0:11 f4: direct index for structure ( uniform 4-component vector of float)
0:11 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f})
0:11 Constant:
0:11 2 (const uint)
0:15 Function Definition: fbSelect(vb2;vf2;vf2; ( temp 2-component vector of float)
0:15 Function Parameters:
0:15 'cnd' ( in 2-component vector of bool)
0:15 'src0' ( in 2-component vector of float)
0:15 'src1' ( in 2-component vector of float)
0:? Sequence 0:? Sequence
0:15 Sequence 0:16 Branch: Return with expression
0:15 move second child to first child ( temp int) 0:16 mix ( temp 2-component vector of float)
0:15 'a' ( temp int) 0:16 'src1' ( in 2-component vector of float)
0:15 Constant: 0:16 'src0' ( in 2-component vector of float)
0:15 5 (const int) 0:16 'cnd' ( in 2-component vector of bool)
0:16 Sequence 0:20 Function Definition: @PixelShaderFunction(vf4; ( temp 4-component vector of float)
0:16 move second child to first child ( temp int) 0:20 Function Parameters:
0:16 'b' ( temp int) 0:20 'input' ( in 4-component vector of float)
0:16 Constant: 0:? Sequence
0:16 6 (const int) 0:21 Sequence
0:17 Sequence 0:21 move second child to first child ( temp int)
0:17 move second child to first child ( temp int) 0:21 'a' ( temp int)
0:17 'c' ( temp int) 0:21 Constant:
0:17 Constant: 0:21 5 (const int)
0:17 7 (const int) 0:22 Sequence
0:18 Sequence 0:22 move second child to first child ( temp int)
0:18 move second child to first child ( temp int) 0:22 'b' ( temp int)
0:18 'd' ( temp int) 0:22 Constant:
0:18 Constant: 0:22 6 (const int)
0:18 7 (const int) 0:23 Sequence
0:19 Sequence 0:23 move second child to first child ( temp int)
0:19 move second child to first child ( temp 4-component vector of float) 0:23 'c' ( temp int)
0:19 'ret' ( temp 4-component vector of float) 0:23 Constant:
0:21 add ( temp 4-component vector of float) 0:23 7 (const int)
0:20 add ( temp 4-component vector of float) 0:24 Sequence
0:19 add ( temp 4-component vector of float)
0:19 vector-scale ( temp 4-component vector of float)
0:19 Convert int to float ( temp float)
0:19 'a' ( temp int)
0:19 'input' ( in 4-component vector of float)
0:20 vector-scale ( temp 4-component vector of float)
0:20 Convert int to float ( temp float)
0:20 'b' ( temp int)
0:20 'input' ( in 4-component vector of float)
0:21 vector-scale ( temp 4-component vector of float)
0:21 Convert int to float ( temp float)
0:21 'c' ( temp int)
0:21 'input' ( in 4-component vector of float)
0:22 vector-scale ( temp 4-component vector of float)
0:22 Convert int to float ( temp float)
0:22 'd' ( temp int)
0:22 'input' ( in 4-component vector of float)
0:24 Comma ( temp int)
0:24 move second child to first child ( temp int)
0:24 'e' ( temp int)
0:24 move second child to first child ( temp int)
0:24 'a' ( temp int)
0:24 Test condition and select ( temp int)
0:24 Condition
0:24 Convert int to bool ( temp bool)
0:24 'b' ( temp int)
0:24 true case
0:24 move second child to first child ( temp int)
0:24 'c' ( temp int)
0:24 'd' ( temp int)
0:24 false case
0:24 Constant:
0:24 10 (const int)
0:24 move second child to first child ( temp int) 0:24 move second child to first child ( temp int)
0:24 'b' ( temp int) 0:24 'd' ( temp int)
0:24 Test condition and select ( temp int) 0:24 Constant:
0:24 Condition 0:24 7 (const int)
0:24 Convert int to bool ( temp bool) 0:25 Sequence
0:24 'a' ( temp int) 0:25 move second child to first child ( temp 4-component vector of float)
0:24 true case 0:25 'ret' ( temp 4-component vector of float)
0:24 move second child to first child ( temp int)
0:24 'd' ( temp int)
0:24 'c' ( temp int)
0:24 false case
0:24 Constant:
0:24 11 (const int)
0:26 move second child to first child ( temp 4-component vector of float)
0:26 'f' ( temp 4-component vector of float)
0:26 Test condition and select ( temp 4-component vector of float)
0:26 Condition
0:26 Compare Less Than ( temp bool)
0:26 direct index ( temp float)
0:26 'ret' ( temp 4-component vector of float)
0:26 Constant:
0:26 0 (const int)
0:26 direct index ( temp float)
0:26 'input' ( in 4-component vector of float)
0:26 Constant:
0:26 1 (const int)
0:26 true case
0:26 vector-scale ( temp 4-component vector of float)
0:26 Convert int to float ( temp float)
0:26 'c' ( temp int)
0:26 'input' ( in 4-component vector of float)
0:26 false case
0:26 vector-scale ( temp 4-component vector of float)
0:26 Convert int to float ( temp float)
0:26 'd' ( temp int)
0:26 'input' ( in 4-component vector of float)
0:27 Branch: Return with expression
0:27 add ( temp 4-component vector of float)
0:27 add ( temp 4-component vector of float) 0:27 add ( temp 4-component vector of float)
0:27 vector-scale ( temp 4-component vector of float) 0:26 add ( temp 4-component vector of float)
0:27 Convert int to float ( temp float) 0:25 add ( temp 4-component vector of float)
0:27 'e' ( temp int) 0:25 vector-scale ( temp 4-component vector of float)
0:27 'ret' ( temp 4-component vector of float) 0:25 Convert int to float ( temp float)
0:27 'f' ( temp 4-component vector of float) 0:25 'a' ( temp int)
0:27 Function Call: vectorCond( ( temp 4-component vector of float) 0:25 'input' ( in 4-component vector of float)
0:14 Function Definition: PixelShaderFunction( ( temp void) 0:26 vector-scale ( temp 4-component vector of float)
0:14 Function Parameters: 0:26 Convert int to float ( temp float)
0:26 'b' ( temp int)
0:26 'input' ( in 4-component vector of float)
0:27 vector-scale ( temp 4-component vector of float)
0:27 Convert int to float ( temp float)
0:27 'c' ( temp int)
0:27 'input' ( in 4-component vector of float)
0:28 vector-scale ( temp 4-component vector of float)
0:28 Convert int to float ( temp float)
0:28 'd' ( temp int)
0:28 'input' ( in 4-component vector of float)
0:30 Comma ( temp int)
0:30 move second child to first child ( temp int)
0:30 'e' ( temp int)
0:30 move second child to first child ( temp int)
0:30 'a' ( temp int)
0:30 Test condition and select ( temp int)
0:30 Condition
0:30 Convert int to bool ( temp bool)
0:30 'b' ( temp int)
0:30 true case
0:30 move second child to first child ( temp int)
0:30 'c' ( temp int)
0:30 'd' ( temp int)
0:30 false case
0:30 Constant:
0:30 10 (const int)
0:30 move second child to first child ( temp int)
0:30 'b' ( temp int)
0:30 Test condition and select ( temp int)
0:30 Condition
0:30 Convert int to bool ( temp bool)
0:30 'a' ( temp int)
0:30 true case
0:30 move second child to first child ( temp int)
0:30 'd' ( temp int)
0:30 'c' ( temp int)
0:30 false case
0:30 Constant:
0:30 11 (const int)
0:32 move second child to first child ( temp 4-component vector of float)
0:32 'f' ( temp 4-component vector of float)
0:32 Test condition and select ( temp 4-component vector of float)
0:32 Condition
0:32 Compare Less Than ( temp bool)
0:32 direct index ( temp float)
0:32 'ret' ( temp 4-component vector of float)
0:32 Constant:
0:32 0 (const int)
0:32 direct index ( temp float)
0:32 'input' ( in 4-component vector of float)
0:32 Constant:
0:32 1 (const int)
0:32 true case
0:32 vector-scale ( temp 4-component vector of float)
0:32 Convert int to float ( temp float)
0:32 'c' ( temp int)
0:32 'input' ( in 4-component vector of float)
0:32 false case
0:32 vector-scale ( temp 4-component vector of float)
0:32 Convert int to float ( temp float)
0:32 'd' ( temp int)
0:32 'input' ( in 4-component vector of float)
0:34 Branch: Return with expression
0:33 add ( temp 4-component vector of float)
0:33 add ( temp 4-component vector of float)
0:33 add ( temp 4-component vector of float)
0:33 vector-scale ( temp 4-component vector of float)
0:33 Convert int to float ( temp float)
0:33 'e' ( temp int)
0:33 'ret' ( temp 4-component vector of float)
0:33 'f' ( temp 4-component vector of float)
0:33 Function Call: vectorCond( ( temp 4-component vector of float)
0:? Construct vec4 ( temp 4-component vector of float)
0:34 Function Call: fbSelect(vb2;vf2;vf2; ( temp 2-component vector of float)
0:? Constant:
0:? true (const bool)
0:? false (const bool)
0:? Constant:
0:? 1.000000
0:? 2.000000
0:? Constant:
0:? 3.000000
0:? 4.000000
0:34 Constant:
0:34 10.000000
0:34 Constant:
0:34 10.000000
0:20 Function Definition: PixelShaderFunction( ( temp void)
0:20 Function Parameters:
0:? Sequence 0:? Sequence
0:14 move second child to first child ( temp 4-component vector of float) 0:20 move second child to first child ( temp 4-component vector of float)
0:? 'input' ( temp 4-component vector of float) 0:? 'input' ( temp 4-component vector of float)
0:? 'input' (layout( location=0) in 4-component vector of float) 0:? 'input' (layout( location=0) in 4-component vector of float)
0:14 move second child to first child ( temp 4-component vector of float) 0:20 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:14 Function Call: @PixelShaderFunction(vf4; ( temp 4-component vector of float) 0:20 Function Call: @PixelShaderFunction(vf4; ( temp 4-component vector of float)
0:? 'input' ( temp 4-component vector of float) 0:? 'input' ( temp 4-component vector of float)
0:? Linker Objects 0:? Linker Objects
0:? 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f})
...@@ -169,154 +215,200 @@ gl_FragCoord origin is upper left ...@@ -169,154 +215,200 @@ gl_FragCoord origin is upper left
0:8 Function Definition: vectorCond( ( temp 4-component vector of float) 0:8 Function Definition: vectorCond( ( temp 4-component vector of float)
0:8 Function Parameters: 0:8 Function Parameters:
0:? Sequence 0:? Sequence
0:10 Branch: Return with expression 0:11 Branch: Return with expression
0:9 add ( temp 4-component vector of float) 0:10 add ( temp 4-component vector of float)
0:9 mix ( temp 4-component vector of float) 0:9 add ( temp 4-component vector of float)
0:9 f4: direct index for structure ( uniform 4-component vector of float) 0:9 mix ( temp 4-component vector of float)
0:9 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) 0:9 f4: direct index for structure ( uniform 4-component vector of float)
0:9 Constant:
0:9 2 (const uint)
0:9 t4: direct index for structure ( uniform 4-component vector of float)
0:9 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f})
0:9 Constant:
0:9 1 (const uint)
0:9 Convert float to bool ( temp 4-component vector of bool)
0:9 c4: direct index for structure ( uniform 4-component vector of float)
0:9 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) 0:9 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f})
0:9 Constant: 0:9 Constant:
0:9 0 (const uint) 0:9 2 (const uint)
0:10 mix ( temp 4-component vector of float) 0:9 t4: direct index for structure ( uniform 4-component vector of float)
0:10 Construct vec4 ( temp 4-component vector of float) 0:9 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f})
0:10 f: direct index for structure ( uniform float) 0:9 Constant:
0:10 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) 0:9 1 (const uint)
0:10 Constant: 0:9 Convert float to bool ( temp 4-component vector of bool)
0:10 4 (const uint) 0:9 c4: direct index for structure ( uniform 4-component vector of float)
0:10 Construct vec4 ( temp 4-component vector of float) 0:9 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f})
0:10 t: direct index for structure ( uniform float) 0:9 Constant:
0:10 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) 0:9 0 (const uint)
0:10 Constant: 0:10 mix ( temp 4-component vector of float)
0:10 3 (const uint) 0:10 Construct vec4 ( temp 4-component vector of float)
0:10 Convert float to bool ( temp 4-component vector of bool) 0:10 f: direct index for structure ( uniform float)
0:10 c4: direct index for structure ( uniform 4-component vector of float) 0:10 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f})
0:10 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) 0:10 Constant:
0:10 Constant: 0:10 4 (const uint)
0:10 0 (const uint) 0:10 Construct vec4 ( temp 4-component vector of float)
0:14 Function Definition: @PixelShaderFunction(vf4; ( temp 4-component vector of float) 0:10 t: direct index for structure ( uniform float)
0:14 Function Parameters: 0:10 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f})
0:14 'input' ( in 4-component vector of float) 0:10 Constant:
0:10 3 (const uint)
0:10 Convert float to bool ( temp 4-component vector of bool)
0:10 c4: direct index for structure ( uniform 4-component vector of float)
0:10 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f})
0:10 Constant:
0:10 0 (const uint)
0:11 mix ( temp 4-component vector of float)
0:11 f4: direct index for structure ( uniform 4-component vector of float)
0:11 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f})
0:11 Constant:
0:11 2 (const uint)
0:11 t4: direct index for structure ( uniform 4-component vector of float)
0:11 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f})
0:11 Constant:
0:11 1 (const uint)
0:11 Compare Less Than ( temp 4-component vector of bool)
0:11 t4: direct index for structure ( uniform 4-component vector of float)
0:11 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f})
0:11 Constant:
0:11 1 (const uint)
0:11 f4: direct index for structure ( uniform 4-component vector of float)
0:11 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f})
0:11 Constant:
0:11 2 (const uint)
0:15 Function Definition: fbSelect(vb2;vf2;vf2; ( temp 2-component vector of float)
0:15 Function Parameters:
0:15 'cnd' ( in 2-component vector of bool)
0:15 'src0' ( in 2-component vector of float)
0:15 'src1' ( in 2-component vector of float)
0:? Sequence 0:? Sequence
0:15 Sequence 0:16 Branch: Return with expression
0:15 move second child to first child ( temp int) 0:16 mix ( temp 2-component vector of float)
0:15 'a' ( temp int) 0:16 'src1' ( in 2-component vector of float)
0:15 Constant: 0:16 'src0' ( in 2-component vector of float)
0:15 5 (const int) 0:16 'cnd' ( in 2-component vector of bool)
0:16 Sequence 0:20 Function Definition: @PixelShaderFunction(vf4; ( temp 4-component vector of float)
0:16 move second child to first child ( temp int) 0:20 Function Parameters:
0:16 'b' ( temp int) 0:20 'input' ( in 4-component vector of float)
0:16 Constant: 0:? Sequence
0:16 6 (const int) 0:21 Sequence
0:17 Sequence 0:21 move second child to first child ( temp int)
0:17 move second child to first child ( temp int) 0:21 'a' ( temp int)
0:17 'c' ( temp int) 0:21 Constant:
0:17 Constant: 0:21 5 (const int)
0:17 7 (const int) 0:22 Sequence
0:18 Sequence 0:22 move second child to first child ( temp int)
0:18 move second child to first child ( temp int) 0:22 'b' ( temp int)
0:18 'd' ( temp int) 0:22 Constant:
0:18 Constant: 0:22 6 (const int)
0:18 7 (const int) 0:23 Sequence
0:19 Sequence 0:23 move second child to first child ( temp int)
0:19 move second child to first child ( temp 4-component vector of float) 0:23 'c' ( temp int)
0:19 'ret' ( temp 4-component vector of float) 0:23 Constant:
0:21 add ( temp 4-component vector of float) 0:23 7 (const int)
0:20 add ( temp 4-component vector of float) 0:24 Sequence
0:19 add ( temp 4-component vector of float)
0:19 vector-scale ( temp 4-component vector of float)
0:19 Convert int to float ( temp float)
0:19 'a' ( temp int)
0:19 'input' ( in 4-component vector of float)
0:20 vector-scale ( temp 4-component vector of float)
0:20 Convert int to float ( temp float)
0:20 'b' ( temp int)
0:20 'input' ( in 4-component vector of float)
0:21 vector-scale ( temp 4-component vector of float)
0:21 Convert int to float ( temp float)
0:21 'c' ( temp int)
0:21 'input' ( in 4-component vector of float)
0:22 vector-scale ( temp 4-component vector of float)
0:22 Convert int to float ( temp float)
0:22 'd' ( temp int)
0:22 'input' ( in 4-component vector of float)
0:24 Comma ( temp int)
0:24 move second child to first child ( temp int)
0:24 'e' ( temp int)
0:24 move second child to first child ( temp int)
0:24 'a' ( temp int)
0:24 Test condition and select ( temp int)
0:24 Condition
0:24 Convert int to bool ( temp bool)
0:24 'b' ( temp int)
0:24 true case
0:24 move second child to first child ( temp int)
0:24 'c' ( temp int)
0:24 'd' ( temp int)
0:24 false case
0:24 Constant:
0:24 10 (const int)
0:24 move second child to first child ( temp int) 0:24 move second child to first child ( temp int)
0:24 'b' ( temp int) 0:24 'd' ( temp int)
0:24 Test condition and select ( temp int) 0:24 Constant:
0:24 Condition 0:24 7 (const int)
0:24 Convert int to bool ( temp bool) 0:25 Sequence
0:24 'a' ( temp int) 0:25 move second child to first child ( temp 4-component vector of float)
0:24 true case 0:25 'ret' ( temp 4-component vector of float)
0:24 move second child to first child ( temp int)
0:24 'd' ( temp int)
0:24 'c' ( temp int)
0:24 false case
0:24 Constant:
0:24 11 (const int)
0:26 move second child to first child ( temp 4-component vector of float)
0:26 'f' ( temp 4-component vector of float)
0:26 Test condition and select ( temp 4-component vector of float)
0:26 Condition
0:26 Compare Less Than ( temp bool)
0:26 direct index ( temp float)
0:26 'ret' ( temp 4-component vector of float)
0:26 Constant:
0:26 0 (const int)
0:26 direct index ( temp float)
0:26 'input' ( in 4-component vector of float)
0:26 Constant:
0:26 1 (const int)
0:26 true case
0:26 vector-scale ( temp 4-component vector of float)
0:26 Convert int to float ( temp float)
0:26 'c' ( temp int)
0:26 'input' ( in 4-component vector of float)
0:26 false case
0:26 vector-scale ( temp 4-component vector of float)
0:26 Convert int to float ( temp float)
0:26 'd' ( temp int)
0:26 'input' ( in 4-component vector of float)
0:27 Branch: Return with expression
0:27 add ( temp 4-component vector of float)
0:27 add ( temp 4-component vector of float) 0:27 add ( temp 4-component vector of float)
0:27 vector-scale ( temp 4-component vector of float) 0:26 add ( temp 4-component vector of float)
0:27 Convert int to float ( temp float) 0:25 add ( temp 4-component vector of float)
0:27 'e' ( temp int) 0:25 vector-scale ( temp 4-component vector of float)
0:27 'ret' ( temp 4-component vector of float) 0:25 Convert int to float ( temp float)
0:27 'f' ( temp 4-component vector of float) 0:25 'a' ( temp int)
0:27 Function Call: vectorCond( ( temp 4-component vector of float) 0:25 'input' ( in 4-component vector of float)
0:14 Function Definition: PixelShaderFunction( ( temp void) 0:26 vector-scale ( temp 4-component vector of float)
0:14 Function Parameters: 0:26 Convert int to float ( temp float)
0:26 'b' ( temp int)
0:26 'input' ( in 4-component vector of float)
0:27 vector-scale ( temp 4-component vector of float)
0:27 Convert int to float ( temp float)
0:27 'c' ( temp int)
0:27 'input' ( in 4-component vector of float)
0:28 vector-scale ( temp 4-component vector of float)
0:28 Convert int to float ( temp float)
0:28 'd' ( temp int)
0:28 'input' ( in 4-component vector of float)
0:30 Comma ( temp int)
0:30 move second child to first child ( temp int)
0:30 'e' ( temp int)
0:30 move second child to first child ( temp int)
0:30 'a' ( temp int)
0:30 Test condition and select ( temp int)
0:30 Condition
0:30 Convert int to bool ( temp bool)
0:30 'b' ( temp int)
0:30 true case
0:30 move second child to first child ( temp int)
0:30 'c' ( temp int)
0:30 'd' ( temp int)
0:30 false case
0:30 Constant:
0:30 10 (const int)
0:30 move second child to first child ( temp int)
0:30 'b' ( temp int)
0:30 Test condition and select ( temp int)
0:30 Condition
0:30 Convert int to bool ( temp bool)
0:30 'a' ( temp int)
0:30 true case
0:30 move second child to first child ( temp int)
0:30 'd' ( temp int)
0:30 'c' ( temp int)
0:30 false case
0:30 Constant:
0:30 11 (const int)
0:32 move second child to first child ( temp 4-component vector of float)
0:32 'f' ( temp 4-component vector of float)
0:32 Test condition and select ( temp 4-component vector of float)
0:32 Condition
0:32 Compare Less Than ( temp bool)
0:32 direct index ( temp float)
0:32 'ret' ( temp 4-component vector of float)
0:32 Constant:
0:32 0 (const int)
0:32 direct index ( temp float)
0:32 'input' ( in 4-component vector of float)
0:32 Constant:
0:32 1 (const int)
0:32 true case
0:32 vector-scale ( temp 4-component vector of float)
0:32 Convert int to float ( temp float)
0:32 'c' ( temp int)
0:32 'input' ( in 4-component vector of float)
0:32 false case
0:32 vector-scale ( temp 4-component vector of float)
0:32 Convert int to float ( temp float)
0:32 'd' ( temp int)
0:32 'input' ( in 4-component vector of float)
0:34 Branch: Return with expression
0:33 add ( temp 4-component vector of float)
0:33 add ( temp 4-component vector of float)
0:33 add ( temp 4-component vector of float)
0:33 vector-scale ( temp 4-component vector of float)
0:33 Convert int to float ( temp float)
0:33 'e' ( temp int)
0:33 'ret' ( temp 4-component vector of float)
0:33 'f' ( temp 4-component vector of float)
0:33 Function Call: vectorCond( ( temp 4-component vector of float)
0:? Construct vec4 ( temp 4-component vector of float)
0:34 Function Call: fbSelect(vb2;vf2;vf2; ( temp 2-component vector of float)
0:? Constant:
0:? true (const bool)
0:? false (const bool)
0:? Constant:
0:? 1.000000
0:? 2.000000
0:? Constant:
0:? 3.000000
0:? 4.000000
0:34 Constant:
0:34 10.000000
0:34 Constant:
0:34 10.000000
0:20 Function Definition: PixelShaderFunction( ( temp void)
0:20 Function Parameters:
0:? Sequence 0:? Sequence
0:14 move second child to first child ( temp 4-component vector of float) 0:20 move second child to first child ( temp 4-component vector of float)
0:? 'input' ( temp 4-component vector of float) 0:? 'input' ( temp 4-component vector of float)
0:? 'input' (layout( location=0) in 4-component vector of float) 0:? 'input' (layout( location=0) in 4-component vector of float)
0:14 move second child to first child ( temp 4-component vector of float) 0:20 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:14 Function Call: @PixelShaderFunction(vf4; ( temp 4-component vector of float) 0:20 Function Call: @PixelShaderFunction(vf4; ( temp 4-component vector of float)
0:? 'input' ( temp 4-component vector of float) 0:? 'input' ( temp 4-component vector of float)
0:? Linker Objects 0:? Linker Objects
0:? 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f})
...@@ -325,215 +417,270 @@ gl_FragCoord origin is upper left ...@@ -325,215 +417,270 @@ gl_FragCoord origin is upper left
// Module Version 10000 // Module Version 10000
// Generated by (magic number): 80001 // Generated by (magic number): 80001
// Id's are bound by 141 // Id's are bound by 186
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "PixelShaderFunction" 134 137 EntryPoint Fragment 4 "PixelShaderFunction" 179 182
ExecutionMode 4 OriginUpperLeft ExecutionMode 4 OriginUpperLeft
Source HLSL 500 Source HLSL 500
Name 4 "PixelShaderFunction" Name 4 "PixelShaderFunction"
Name 9 "vectorCond(" Name 9 "vectorCond("
Name 14 "@PixelShaderFunction(vf4;" Name 20 "fbSelect(vb2;vf2;vf2;"
Name 13 "input" Name 17 "cnd"
Name 16 "$Global" Name 18 "src0"
MemberName 16($Global) 0 "c4" Name 19 "src1"
MemberName 16($Global) 1 "t4" Name 25 "@PixelShaderFunction(vf4;"
MemberName 16($Global) 2 "f4" Name 24 "input"
MemberName 16($Global) 3 "t" Name 27 "$Global"
MemberName 16($Global) 4 "f" MemberName 27($Global) 0 "c4"
Name 18 "" MemberName 27($Global) 1 "t4"
Name 53 "a" MemberName 27($Global) 2 "f4"
Name 55 "b" MemberName 27($Global) 3 "t"
Name 57 "c" MemberName 27($Global) 4 "f"
Name 59 "d" Name 29 ""
Name 60 "ret" Name 80 "a"
Name 80 "e" Name 82 "b"
Name 101 "f" Name 84 "c"
Name 132 "input" Name 86 "d"
Name 134 "input" Name 87 "ret"
Name 137 "@entryPointOutput" Name 107 "e"
Name 138 "param" Name 128 "f"
MemberDecorate 16($Global) 0 Offset 0 Name 166 "param"
MemberDecorate 16($Global) 1 Offset 16 Name 167 "param"
MemberDecorate 16($Global) 2 Offset 32 Name 168 "param"
MemberDecorate 16($Global) 3 Offset 48 Name 177 "input"
MemberDecorate 16($Global) 4 Offset 52 Name 179 "input"
Decorate 16($Global) Block Name 182 "@entryPointOutput"
Decorate 18 DescriptorSet 0 Name 183 "param"
Decorate 134(input) Location 0 MemberDecorate 27($Global) 0 Offset 0
Decorate 137(@entryPointOutput) Location 0 MemberDecorate 27($Global) 1 Offset 16
MemberDecorate 27($Global) 2 Offset 32
MemberDecorate 27($Global) 3 Offset 48
MemberDecorate 27($Global) 4 Offset 52
Decorate 27($Global) Block
Decorate 29 DescriptorSet 0
Decorate 179(input) Location 0
Decorate 182(@entryPointOutput) Location 0
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
7: TypeVector 6(float) 4 7: TypeVector 6(float) 4
8: TypeFunction 7(fvec4) 8: TypeFunction 7(fvec4)
11: TypePointer Function 7(fvec4) 11: TypeBool
12: TypeFunction 7(fvec4) 11(ptr) 12: TypeVector 11(bool) 2
16($Global): TypeStruct 7(fvec4) 7(fvec4) 7(fvec4) 6(float) 6(float) 13: TypePointer Function 12(bvec2)
17: TypePointer Uniform 16($Global) 14: TypeVector 6(float) 2
18: 17(ptr) Variable Uniform 15: TypePointer Function 14(fvec2)
19: TypeInt 32 1 16: TypeFunction 14(fvec2) 13(ptr) 15(ptr) 15(ptr)
20: 19(int) Constant 2 22: TypePointer Function 7(fvec4)
21: TypePointer Uniform 7(fvec4) 23: TypeFunction 7(fvec4) 22(ptr)
24: 19(int) Constant 1 27($Global): TypeStruct 7(fvec4) 7(fvec4) 7(fvec4) 6(float) 6(float)
27: 19(int) Constant 0 28: TypePointer Uniform 27($Global)
30: TypeBool 29: 28(ptr) Variable Uniform
31: TypeVector 30(bool) 4 30: TypeInt 32 1
32: 6(float) Constant 0 31: 30(int) Constant 2
33: 7(fvec4) ConstantComposite 32 32 32 32 32: TypePointer Uniform 7(fvec4)
36: 19(int) Constant 4 35: 30(int) Constant 1
37: TypePointer Uniform 6(float) 38: 30(int) Constant 0
41: 19(int) Constant 3 41: TypeVector 11(bool) 4
52: TypePointer Function 19(int) 42: 6(float) Constant 0
54: 19(int) Constant 5 43: 7(fvec4) ConstantComposite 42 42 42 42
56: 19(int) Constant 6 46: 30(int) Constant 4
58: 19(int) Constant 7 47: TypePointer Uniform 6(float)
83: TypeInt 32 0 51: 30(int) Constant 3
84: 83(int) Constant 0 79: TypePointer Function 30(int)
90: 19(int) Constant 10 81: 30(int) Constant 5
99: 19(int) Constant 11 83: 30(int) Constant 6
103: TypePointer Function 6(float) 85: 30(int) Constant 7
106: 83(int) Constant 1 110: TypeInt 32 0
133: TypePointer Input 7(fvec4) 111: 110(int) Constant 0
134(input): 133(ptr) Variable Input 117: 30(int) Constant 10
136: TypePointer Output 7(fvec4) 126: 30(int) Constant 11
137(@entryPointOutput): 136(ptr) Variable Output 130: TypePointer Function 6(float)
133: 110(int) Constant 1
157: 11(bool) ConstantTrue
158: 11(bool) ConstantFalse
159: 12(bvec2) ConstantComposite 157 158
160: 6(float) Constant 1065353216
161: 6(float) Constant 1073741824
162: 14(fvec2) ConstantComposite 160 161
163: 6(float) Constant 1077936128
164: 6(float) Constant 1082130432
165: 14(fvec2) ConstantComposite 163 164
170: 6(float) Constant 1092616192
178: TypePointer Input 7(fvec4)
179(input): 178(ptr) Variable Input
181: TypePointer Output 7(fvec4)
182(@entryPointOutput): 181(ptr) Variable Output
4(PixelShaderFunction): 2 Function None 3 4(PixelShaderFunction): 2 Function None 3
5: Label 5: Label
132(input): 11(ptr) Variable Function 177(input): 22(ptr) Variable Function
138(param): 11(ptr) Variable Function 183(param): 22(ptr) Variable Function
135: 7(fvec4) Load 134(input) 180: 7(fvec4) Load 179(input)
Store 132(input) 135 Store 177(input) 180
139: 7(fvec4) Load 132(input) 184: 7(fvec4) Load 177(input)
Store 138(param) 139 Store 183(param) 184
140: 7(fvec4) FunctionCall 14(@PixelShaderFunction(vf4;) 138(param) 185: 7(fvec4) FunctionCall 25(@PixelShaderFunction(vf4;) 183(param)
Store 137(@entryPointOutput) 140 Store 182(@entryPointOutput) 185
Return Return
FunctionEnd FunctionEnd
9(vectorCond(): 7(fvec4) Function None 8 9(vectorCond(): 7(fvec4) Function None 8
10: Label 10: Label
22: 21(ptr) AccessChain 18 20 33: 32(ptr) AccessChain 29 31
23: 7(fvec4) Load 22 34: 7(fvec4) Load 33
25: 21(ptr) AccessChain 18 24 36: 32(ptr) AccessChain 29 35
26: 7(fvec4) Load 25 37: 7(fvec4) Load 36
28: 21(ptr) AccessChain 18 27 39: 32(ptr) AccessChain 29 38
29: 7(fvec4) Load 28 40: 7(fvec4) Load 39
34: 31(bvec4) FOrdNotEqual 29 33 44: 41(bvec4) FOrdNotEqual 40 43
35: 7(fvec4) Select 34 26 23 45: 7(fvec4) Select 44 37 34
38: 37(ptr) AccessChain 18 36 48: 47(ptr) AccessChain 29 46
39: 6(float) Load 38 49: 6(float) Load 48
40: 7(fvec4) CompositeConstruct 39 39 39 39 50: 7(fvec4) CompositeConstruct 49 49 49 49
42: 37(ptr) AccessChain 18 41 52: 47(ptr) AccessChain 29 51
43: 6(float) Load 42 53: 6(float) Load 52
44: 7(fvec4) CompositeConstruct 43 43 43 43 54: 7(fvec4) CompositeConstruct 53 53 53 53
45: 21(ptr) AccessChain 18 27 55: 32(ptr) AccessChain 29 38
46: 7(fvec4) Load 45 56: 7(fvec4) Load 55
47: 31(bvec4) FOrdNotEqual 46 33 57: 41(bvec4) FOrdNotEqual 56 43
48: 7(fvec4) Select 47 44 40 58: 7(fvec4) Select 57 54 50
49: 7(fvec4) FAdd 35 48 59: 7(fvec4) FAdd 45 58
ReturnValue 49 60: 32(ptr) AccessChain 29 31
61: 7(fvec4) Load 60
62: 32(ptr) AccessChain 29 35
63: 7(fvec4) Load 62
64: 32(ptr) AccessChain 29 35
65: 7(fvec4) Load 64
66: 32(ptr) AccessChain 29 31
67: 7(fvec4) Load 66
68: 41(bvec4) FOrdLessThan 65 67
69: 7(fvec4) Select 68 63 61
70: 7(fvec4) FAdd 59 69
ReturnValue 70
FunctionEnd
20(fbSelect(vb2;vf2;vf2;): 14(fvec2) Function None 16
17(cnd): 13(ptr) FunctionParameter
18(src0): 15(ptr) FunctionParameter
19(src1): 15(ptr) FunctionParameter
21: Label
73: 14(fvec2) Load 19(src1)
74: 14(fvec2) Load 18(src0)
75: 12(bvec2) Load 17(cnd)
76: 14(fvec2) Select 75 74 73
ReturnValue 76
FunctionEnd FunctionEnd
14(@PixelShaderFunction(vf4;): 7(fvec4) Function None 12 25(@PixelShaderFunction(vf4;): 7(fvec4) Function None 23
13(input): 11(ptr) FunctionParameter 24(input): 22(ptr) FunctionParameter
15: Label 26: Label
53(a): 52(ptr) Variable Function 80(a): 79(ptr) Variable Function
55(b): 52(ptr) Variable Function 82(b): 79(ptr) Variable Function
57(c): 52(ptr) Variable Function 84(c): 79(ptr) Variable Function
59(d): 52(ptr) Variable Function 86(d): 79(ptr) Variable Function
60(ret): 11(ptr) Variable Function 87(ret): 22(ptr) Variable Function
80(e): 52(ptr) Variable Function 107(e): 79(ptr) Variable Function
81: 52(ptr) Variable Function 108: 79(ptr) Variable Function
92: 52(ptr) Variable Function 119: 79(ptr) Variable Function
101(f): 11(ptr) Variable Function 128(f): 22(ptr) Variable Function
102: 11(ptr) Variable Function 129: 22(ptr) Variable Function
Store 53(a) 54 166(param): 13(ptr) Variable Function
Store 55(b) 56 167(param): 15(ptr) Variable Function
Store 57(c) 58 168(param): 15(ptr) Variable Function
Store 59(d) 58 Store 80(a) 81
61: 19(int) Load 53(a) Store 82(b) 83
62: 6(float) ConvertSToF 61 Store 84(c) 85
63: 7(fvec4) Load 13(input) Store 86(d) 85
64: 7(fvec4) VectorTimesScalar 63 62 88: 30(int) Load 80(a)
65: 19(int) Load 55(b) 89: 6(float) ConvertSToF 88
66: 6(float) ConvertSToF 65 90: 7(fvec4) Load 24(input)
67: 7(fvec4) Load 13(input) 91: 7(fvec4) VectorTimesScalar 90 89
68: 7(fvec4) VectorTimesScalar 67 66 92: 30(int) Load 82(b)
69: 7(fvec4) FAdd 64 68 93: 6(float) ConvertSToF 92
70: 19(int) Load 57(c) 94: 7(fvec4) Load 24(input)
71: 6(float) ConvertSToF 70 95: 7(fvec4) VectorTimesScalar 94 93
72: 7(fvec4) Load 13(input) 96: 7(fvec4) FAdd 91 95
73: 7(fvec4) VectorTimesScalar 72 71 97: 30(int) Load 84(c)
74: 7(fvec4) FAdd 69 73 98: 6(float) ConvertSToF 97
75: 19(int) Load 59(d) 99: 7(fvec4) Load 24(input)
76: 6(float) ConvertSToF 75 100: 7(fvec4) VectorTimesScalar 99 98
77: 7(fvec4) Load 13(input) 101: 7(fvec4) FAdd 96 100
78: 7(fvec4) VectorTimesScalar 77 76 102: 30(int) Load 86(d)
79: 7(fvec4) FAdd 74 78 103: 6(float) ConvertSToF 102
Store 60(ret) 79 104: 7(fvec4) Load 24(input)
82: 19(int) Load 55(b) 105: 7(fvec4) VectorTimesScalar 104 103
85: 30(bool) INotEqual 82 84 106: 7(fvec4) FAdd 101 105
SelectionMerge 87 None Store 87(ret) 106
BranchConditional 85 86 89 109: 30(int) Load 82(b)
86: Label 112: 11(bool) INotEqual 109 111
88: 19(int) Load 59(d) SelectionMerge 114 None
Store 57(c) 88 BranchConditional 112 113 116
Store 81 88 113: Label
Branch 87 115: 30(int) Load 86(d)
89: Label Store 84(c) 115
Store 81 90 Store 108 115
Branch 87 Branch 114
87: Label
91: 19(int) Load 81
Store 53(a) 91
Store 80(e) 91
93: 19(int) Load 53(a)
94: 30(bool) INotEqual 93 84
SelectionMerge 96 None
BranchConditional 94 95 98
95: Label
97: 19(int) Load 57(c)
Store 59(d) 97
Store 92 97
Branch 96
98: Label
Store 92 99
Branch 96
96: Label
100: 19(int) Load 92
Store 55(b) 100
104: 103(ptr) AccessChain 60(ret) 84
105: 6(float) Load 104
107: 103(ptr) AccessChain 13(input) 106
108: 6(float) Load 107
109: 30(bool) FOrdLessThan 105 108
SelectionMerge 111 None
BranchConditional 109 110 116
110: Label
112: 19(int) Load 57(c)
113: 6(float) ConvertSToF 112
114: 7(fvec4) Load 13(input)
115: 7(fvec4) VectorTimesScalar 114 113
Store 102 115
Branch 111
116: Label 116: Label
117: 19(int) Load 59(d) Store 108 117
118: 6(float) ConvertSToF 117 Branch 114
119: 7(fvec4) Load 13(input) 114: Label
120: 7(fvec4) VectorTimesScalar 119 118 118: 30(int) Load 108
Store 102 120 Store 80(a) 118
Branch 111 Store 107(e) 118
111: Label 120: 30(int) Load 80(a)
121: 7(fvec4) Load 102 121: 11(bool) INotEqual 120 111
Store 101(f) 121 SelectionMerge 123 None
122: 19(int) Load 80(e) BranchConditional 121 122 125
123: 6(float) ConvertSToF 122 122: Label
124: 7(fvec4) Load 60(ret) 124: 30(int) Load 84(c)
125: 7(fvec4) VectorTimesScalar 124 123 Store 86(d) 124
126: 7(fvec4) Load 101(f) Store 119 124
127: 7(fvec4) FAdd 125 126 Branch 123
128: 7(fvec4) FunctionCall 9(vectorCond() 125: Label
129: 7(fvec4) FAdd 127 128 Store 119 126
ReturnValue 129 Branch 123
123: Label
127: 30(int) Load 119
Store 82(b) 127
131: 130(ptr) AccessChain 87(ret) 111
132: 6(float) Load 131
134: 130(ptr) AccessChain 24(input) 133
135: 6(float) Load 134
136: 11(bool) FOrdLessThan 132 135
SelectionMerge 138 None
BranchConditional 136 137 143
137: Label
139: 30(int) Load 84(c)
140: 6(float) ConvertSToF 139
141: 7(fvec4) Load 24(input)
142: 7(fvec4) VectorTimesScalar 141 140
Store 129 142
Branch 138
143: Label
144: 30(int) Load 86(d)
145: 6(float) ConvertSToF 144
146: 7(fvec4) Load 24(input)
147: 7(fvec4) VectorTimesScalar 146 145
Store 129 147
Branch 138
138: Label
148: 7(fvec4) Load 129
Store 128(f) 148
149: 30(int) Load 107(e)
150: 6(float) ConvertSToF 149
151: 7(fvec4) Load 87(ret)
152: 7(fvec4) VectorTimesScalar 151 150
153: 7(fvec4) Load 128(f)
154: 7(fvec4) FAdd 152 153
155: 7(fvec4) FunctionCall 9(vectorCond()
156: 7(fvec4) FAdd 154 155
Store 166(param) 159
Store 167(param) 162
Store 168(param) 165
169: 14(fvec2) FunctionCall 20(fbSelect(vb2;vf2;vf2;) 166(param) 167(param) 168(param)
171: 6(float) CompositeExtract 169 0
172: 6(float) CompositeExtract 169 1
173: 7(fvec4) CompositeConstruct 171 172 170 170
174: 7(fvec4) FAdd 156 173
ReturnValue 174
FunctionEnd FunctionEnd
...@@ -7,7 +7,13 @@ float f; ...@@ -7,7 +7,13 @@ float f;
float4 vectorCond() float4 vectorCond()
{ {
return (c4 ? t4 : f4) + return (c4 ? t4 : f4) +
(c4 ? t : f ); (c4 ? t : f ) +
(t4 < f4 ? t4 : f4);
}
float2 fbSelect(bool2 cnd, float2 src0, float2 src1)
{
return cnd ? src0 : src1;
} }
float4 PixelShaderFunction(float4 input) : COLOR0 float4 PixelShaderFunction(float4 input) : COLOR0
...@@ -24,5 +30,6 @@ float4 PixelShaderFunction(float4 input) : COLOR0 ...@@ -24,5 +30,6 @@ float4 PixelShaderFunction(float4 input) : COLOR0
e = a = b ? c = d : 10, b = a ? d = c : 11; e = a = b ? c = d : 10, b = a ? d = c : 11;
float4 f; float4 f;
f = ret.x < input.y ? c * input : d * input; f = ret.x < input.y ? c * input : d * input;
return e * ret + f + vectorCond(); return e * ret + f + vectorCond() +
float4(fbSelect(bool2(true, false), float2(1.0, 2.0), float2(3.0, 4.0)), 10.0, 10.0);
} }
...@@ -2,5 +2,5 @@ ...@@ -2,5 +2,5 @@
// For the version, it uses the latest git tag followed by the number of commits. // For the version, it uses the latest git tag followed by the number of commits.
// For the date, it uses the current date (when then script is run). // For the date, it uses the current date (when then script is run).
#define GLSLANG_REVISION "Overload400-PrecQual.1992" #define GLSLANG_REVISION "Overload400-PrecQual.1994"
#define GLSLANG_DATE "11-Apr-2017" #define GLSLANG_DATE "11-Apr-2017"
...@@ -4536,7 +4536,7 @@ TIntermTyped* HlslParseContext::convertConditionalExpression(const TSourceLoc& l ...@@ -4536,7 +4536,7 @@ TIntermTyped* HlslParseContext::convertConditionalExpression(const TSourceLoc& l
return nullptr; return nullptr;
} }
return intermediate.addConversion(EOpConstructBool, TType(EbtBool), condition); return intermediate.addConversion(EOpConstructBool, TType(EbtBool, EvqTemporary, condition->getVectorSize()), condition);
} }
// //
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment