HLSL: Non-functional: add vector ? : tests.

This commit is contained in:
John Kessenich 2017-04-11 17:30:08 -06:00
parent 13075c612c
commit 34718204e1
3 changed files with 425 additions and 362 deletions

View file

@ -2,122 +2,133 @@ hlsl.conditional.frag
Shader version: 500 Shader version: 500
gl_FragCoord origin is upper left gl_FragCoord origin is upper left
0:? Sequence 0:? Sequence
0:2 Function Definition: @PixelShaderFunction(vf4; ( temp 4-component vector of float) 0:8 Function Definition: vectorCond( ( temp 4-component vector of float)
0:2 Function Parameters: 0:8 Function Parameters:
0:2 'input' ( in 4-component vector of float) 0:? Sequence
0:9 Branch: Return with expression
0:9 f4: 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 2 (const uint)
0:14 Function Definition: @PixelShaderFunction(vf4; ( temp 4-component vector of float)
0:14 Function Parameters:
0:14 'input' ( in 4-component vector of float)
0:? Sequence
0:15 Sequence
0:15 move second child to first child ( temp int)
0:15 'a' ( temp int)
0:15 Constant:
0:15 5 (const int)
0:16 Sequence
0:16 move second child to first child ( temp int)
0:16 'b' ( temp int)
0:16 Constant:
0:16 6 (const int)
0:17 Sequence
0:17 move second child to first child ( temp int)
0:17 'c' ( temp int)
0:17 Constant:
0:17 7 (const int)
0:18 Sequence
0:18 move second child to first child ( temp int)
0:18 'd' ( temp int)
0:18 Constant:
0:18 7 (const int)
0:19 Sequence
0:19 move second child to first child ( temp 4-component vector of float)
0:19 'ret' ( temp 4-component vector of float)
0:21 add ( temp 4-component vector of float)
0:20 add ( temp 4-component vector of float)
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 'b' ( temp int)
0:24 Test condition and select ( temp int)
0:24 Condition
0:24 Convert int to bool ( temp bool)
0:24 'a' ( temp int)
0:24 true case
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 vector-scale ( temp 4-component vector of float)
0:27 Convert int to float ( temp float)
0:27 'e' ( temp int)
0:27 'ret' ( temp 4-component vector of float)
0:27 'f' ( temp 4-component vector of float)
0:27 Function Call: vectorCond( ( temp 4-component vector of float)
0:14 Function Definition: PixelShaderFunction( ( temp void)
0:14 Function Parameters:
0:? Sequence 0:? Sequence
0:3 Sequence
0:3 move second child to first child ( temp int)
0:3 'a' ( temp int)
0:3 Constant:
0:3 5 (const int)
0:4 Sequence
0:4 move second child to first child ( temp int)
0:4 'b' ( temp int)
0:4 Constant:
0:4 6 (const int)
0:5 Sequence
0:5 move second child to first child ( temp int)
0:5 'c' ( temp int)
0:5 Constant:
0:5 7 (const int)
0:6 Sequence
0:6 move second child to first child ( temp int)
0:6 'd' ( temp int)
0:6 Constant:
0:6 7 (const int)
0:7 Sequence
0:7 move second child to first child ( temp 4-component vector of float)
0:7 'ret' ( temp 4-component vector of float)
0:9 add ( temp 4-component vector of float)
0:8 add ( temp 4-component vector of float)
0:7 add ( temp 4-component vector of float)
0:7 vector-scale ( temp 4-component vector of float)
0:7 Convert int to float ( temp float)
0:7 'a' ( temp int)
0:7 'input' ( in 4-component vector of float)
0:8 vector-scale ( temp 4-component vector of float)
0:8 Convert int to float ( temp float)
0:8 'b' ( temp int)
0:8 'input' ( in 4-component vector of float)
0:9 vector-scale ( temp 4-component vector of float)
0:9 Convert int to float ( temp float)
0:9 'c' ( temp int)
0:9 'input' ( in 4-component vector of float)
0:10 vector-scale ( temp 4-component vector of float)
0:10 Convert int to float ( temp float)
0:10 'd' ( temp int)
0:10 'input' ( in 4-component vector of float)
0:12 Comma ( temp int)
0:12 move second child to first child ( temp int)
0:12 'e' ( temp int)
0:12 move second child to first child ( temp int)
0:12 'a' ( temp int)
0:12 Test condition and select ( temp int)
0:12 Condition
0:12 Convert int to bool ( temp bool)
0:12 'b' ( temp int)
0:12 true case
0:12 move second child to first child ( temp int)
0:12 'c' ( temp int)
0:12 'd' ( temp int)
0:12 false case
0:12 Constant:
0:12 10 (const int)
0:12 move second child to first child ( temp int)
0:12 'b' ( temp int)
0:12 Test condition and select ( temp int)
0:12 Condition
0:12 Convert int to bool ( temp bool)
0:12 'a' ( temp int)
0:12 true case
0:12 move second child to first child ( temp int)
0:12 'd' ( temp int)
0:12 'c' ( temp int)
0:12 false case
0:12 Constant:
0:12 11 (const int)
0:14 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:14 'f' ( temp 4-component vector of float)
0:14 Test condition and select ( temp 4-component vector of float)
0:14 Condition
0:14 Compare Less Than ( temp bool)
0:14 direct index ( temp float)
0:14 'ret' ( temp 4-component vector of float)
0:14 Constant:
0:14 0 (const int)
0:14 direct index ( temp float)
0:14 'input' ( in 4-component vector of float)
0:14 Constant:
0:14 1 (const int)
0:14 true case
0:14 vector-scale ( temp 4-component vector of float)
0:14 Convert int to float ( temp float)
0:14 'c' ( temp int)
0:14 'input' ( in 4-component vector of float)
0:14 false case
0:14 vector-scale ( temp 4-component vector of float)
0:14 Convert int to float ( temp float)
0:14 'd' ( temp int)
0:14 'input' ( in 4-component vector of float)
0:15 Branch: Return with expression
0:15 add ( temp 4-component vector of float)
0:15 vector-scale ( temp 4-component vector of float)
0:15 Convert int to float ( temp float)
0:15 'e' ( temp int)
0:15 'ret' ( temp 4-component vector of float)
0:15 'f' ( temp 4-component vector of float)
0:2 Function Definition: PixelShaderFunction( ( temp void)
0:2 Function Parameters:
0:? Sequence
0:2 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:2 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:2 Function Call: @PixelShaderFunction(vf4; ( temp 4-component vector of float) 0:14 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:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 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)
@ -128,282 +139,322 @@ Linked fragment stage:
Shader version: 500 Shader version: 500
gl_FragCoord origin is upper left gl_FragCoord origin is upper left
0:? Sequence 0:? Sequence
0:2 Function Definition: @PixelShaderFunction(vf4; ( temp 4-component vector of float) 0:8 Function Definition: vectorCond( ( temp 4-component vector of float)
0:2 Function Parameters: 0:8 Function Parameters:
0:2 'input' ( in 4-component vector of float) 0:? Sequence
0:9 Branch: Return with expression
0:9 f4: 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 2 (const uint)
0:14 Function Definition: @PixelShaderFunction(vf4; ( temp 4-component vector of float)
0:14 Function Parameters:
0:14 'input' ( in 4-component vector of float)
0:? Sequence
0:15 Sequence
0:15 move second child to first child ( temp int)
0:15 'a' ( temp int)
0:15 Constant:
0:15 5 (const int)
0:16 Sequence
0:16 move second child to first child ( temp int)
0:16 'b' ( temp int)
0:16 Constant:
0:16 6 (const int)
0:17 Sequence
0:17 move second child to first child ( temp int)
0:17 'c' ( temp int)
0:17 Constant:
0:17 7 (const int)
0:18 Sequence
0:18 move second child to first child ( temp int)
0:18 'd' ( temp int)
0:18 Constant:
0:18 7 (const int)
0:19 Sequence
0:19 move second child to first child ( temp 4-component vector of float)
0:19 'ret' ( temp 4-component vector of float)
0:21 add ( temp 4-component vector of float)
0:20 add ( temp 4-component vector of float)
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 'b' ( temp int)
0:24 Test condition and select ( temp int)
0:24 Condition
0:24 Convert int to bool ( temp bool)
0:24 'a' ( temp int)
0:24 true case
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 vector-scale ( temp 4-component vector of float)
0:27 Convert int to float ( temp float)
0:27 'e' ( temp int)
0:27 'ret' ( temp 4-component vector of float)
0:27 'f' ( temp 4-component vector of float)
0:27 Function Call: vectorCond( ( temp 4-component vector of float)
0:14 Function Definition: PixelShaderFunction( ( temp void)
0:14 Function Parameters:
0:? Sequence 0:? Sequence
0:3 Sequence
0:3 move second child to first child ( temp int)
0:3 'a' ( temp int)
0:3 Constant:
0:3 5 (const int)
0:4 Sequence
0:4 move second child to first child ( temp int)
0:4 'b' ( temp int)
0:4 Constant:
0:4 6 (const int)
0:5 Sequence
0:5 move second child to first child ( temp int)
0:5 'c' ( temp int)
0:5 Constant:
0:5 7 (const int)
0:6 Sequence
0:6 move second child to first child ( temp int)
0:6 'd' ( temp int)
0:6 Constant:
0:6 7 (const int)
0:7 Sequence
0:7 move second child to first child ( temp 4-component vector of float)
0:7 'ret' ( temp 4-component vector of float)
0:9 add ( temp 4-component vector of float)
0:8 add ( temp 4-component vector of float)
0:7 add ( temp 4-component vector of float)
0:7 vector-scale ( temp 4-component vector of float)
0:7 Convert int to float ( temp float)
0:7 'a' ( temp int)
0:7 'input' ( in 4-component vector of float)
0:8 vector-scale ( temp 4-component vector of float)
0:8 Convert int to float ( temp float)
0:8 'b' ( temp int)
0:8 'input' ( in 4-component vector of float)
0:9 vector-scale ( temp 4-component vector of float)
0:9 Convert int to float ( temp float)
0:9 'c' ( temp int)
0:9 'input' ( in 4-component vector of float)
0:10 vector-scale ( temp 4-component vector of float)
0:10 Convert int to float ( temp float)
0:10 'd' ( temp int)
0:10 'input' ( in 4-component vector of float)
0:12 Comma ( temp int)
0:12 move second child to first child ( temp int)
0:12 'e' ( temp int)
0:12 move second child to first child ( temp int)
0:12 'a' ( temp int)
0:12 Test condition and select ( temp int)
0:12 Condition
0:12 Convert int to bool ( temp bool)
0:12 'b' ( temp int)
0:12 true case
0:12 move second child to first child ( temp int)
0:12 'c' ( temp int)
0:12 'd' ( temp int)
0:12 false case
0:12 Constant:
0:12 10 (const int)
0:12 move second child to first child ( temp int)
0:12 'b' ( temp int)
0:12 Test condition and select ( temp int)
0:12 Condition
0:12 Convert int to bool ( temp bool)
0:12 'a' ( temp int)
0:12 true case
0:12 move second child to first child ( temp int)
0:12 'd' ( temp int)
0:12 'c' ( temp int)
0:12 false case
0:12 Constant:
0:12 11 (const int)
0:14 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:14 'f' ( temp 4-component vector of float)
0:14 Test condition and select ( temp 4-component vector of float)
0:14 Condition
0:14 Compare Less Than ( temp bool)
0:14 direct index ( temp float)
0:14 'ret' ( temp 4-component vector of float)
0:14 Constant:
0:14 0 (const int)
0:14 direct index ( temp float)
0:14 'input' ( in 4-component vector of float)
0:14 Constant:
0:14 1 (const int)
0:14 true case
0:14 vector-scale ( temp 4-component vector of float)
0:14 Convert int to float ( temp float)
0:14 'c' ( temp int)
0:14 'input' ( in 4-component vector of float)
0:14 false case
0:14 vector-scale ( temp 4-component vector of float)
0:14 Convert int to float ( temp float)
0:14 'd' ( temp int)
0:14 'input' ( in 4-component vector of float)
0:15 Branch: Return with expression
0:15 add ( temp 4-component vector of float)
0:15 vector-scale ( temp 4-component vector of float)
0:15 Convert int to float ( temp float)
0:15 'e' ( temp int)
0:15 'ret' ( temp 4-component vector of float)
0:15 'f' ( temp 4-component vector of float)
0:2 Function Definition: PixelShaderFunction( ( temp void)
0:2 Function Parameters:
0:? Sequence
0:2 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:2 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:2 Function Call: @PixelShaderFunction(vf4; ( temp 4-component vector of float) 0:14 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:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 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)
// Module Version 10000 // Module Version 10000
// Generated by (magic number): 80001 // Generated by (magic number): 80001
// Id's are bound by 102 // Id's are bound by 116
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "PixelShaderFunction" 95 98 EntryPoint Fragment 4 "PixelShaderFunction" 109 112
ExecutionMode 4 OriginUpperLeft ExecutionMode 4 OriginUpperLeft
Source HLSL 500 Source HLSL 500
Name 4 "PixelShaderFunction" Name 4 "PixelShaderFunction"
Name 11 "@PixelShaderFunction(vf4;" Name 9 "vectorCond("
Name 10 "input" Name 14 "@PixelShaderFunction(vf4;"
Name 15 "a" Name 13 "input"
Name 17 "b" Name 16 "$Global"
Name 19 "c" MemberName 16($Global) 0 "c4"
Name 21 "d" MemberName 16($Global) 1 "t4"
Name 22 "ret" MemberName 16($Global) 2 "f4"
Name 42 "e" MemberName 16($Global) 3 "t"
Name 64 "f" MemberName 16($Global) 4 "f"
Name 93 "input" Name 18 ""
Name 95 "input" Name 27 "a"
Name 98 "@entryPointOutput" Name 29 "b"
Name 99 "param" Name 31 "c"
Decorate 95(input) Location 0 Name 33 "d"
Decorate 98(@entryPointOutput) Location 0 Name 34 "ret"
Name 54 "e"
Name 76 "f"
Name 107 "input"
Name 109 "input"
Name 112 "@entryPointOutput"
Name 113 "param"
MemberDecorate 16($Global) 0 Offset 0
MemberDecorate 16($Global) 1 Offset 16
MemberDecorate 16($Global) 2 Offset 32
MemberDecorate 16($Global) 3 Offset 48
MemberDecorate 16($Global) 4 Offset 52
Decorate 16($Global) Block
Decorate 18 DescriptorSet 0
Decorate 109(input) Location 0
Decorate 112(@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: TypePointer Function 7(fvec4) 8: TypeFunction 7(fvec4)
9: TypeFunction 7(fvec4) 8(ptr) 11: TypePointer Function 7(fvec4)
13: TypeInt 32 1 12: TypeFunction 7(fvec4) 11(ptr)
14: TypePointer Function 13(int) 16($Global): TypeStruct 7(fvec4) 7(fvec4) 7(fvec4) 6(float) 6(float)
16: 13(int) Constant 5 17: TypePointer Uniform 16($Global)
18: 13(int) Constant 6 18: 17(ptr) Variable Uniform
20: 13(int) Constant 7 19: TypeInt 32 1
45: TypeBool 20: 19(int) Constant 2
46: TypeInt 32 0 21: TypePointer Uniform 7(fvec4)
47: 46(int) Constant 0 26: TypePointer Function 19(int)
53: 13(int) Constant 10 28: 19(int) Constant 5
62: 13(int) Constant 11 30: 19(int) Constant 6
66: TypePointer Function 6(float) 32: 19(int) Constant 7
69: 46(int) Constant 1 57: TypeBool
94: TypePointer Input 7(fvec4) 58: TypeInt 32 0
95(input): 94(ptr) Variable Input 59: 58(int) Constant 0
97: TypePointer Output 7(fvec4) 65: 19(int) Constant 10
98(@entryPointOutput): 97(ptr) Variable Output 74: 19(int) Constant 11
78: TypePointer Function 6(float)
81: 58(int) Constant 1
108: TypePointer Input 7(fvec4)
109(input): 108(ptr) Variable Input
111: TypePointer Output 7(fvec4)
112(@entryPointOutput): 111(ptr) Variable Output
4(PixelShaderFunction): 2 Function None 3 4(PixelShaderFunction): 2 Function None 3
5: Label 5: Label
93(input): 8(ptr) Variable Function 107(input): 11(ptr) Variable Function
99(param): 8(ptr) Variable Function 113(param): 11(ptr) Variable Function
96: 7(fvec4) Load 95(input) 110: 7(fvec4) Load 109(input)
Store 93(input) 96 Store 107(input) 110
100: 7(fvec4) Load 93(input) 114: 7(fvec4) Load 107(input)
Store 99(param) 100 Store 113(param) 114
101: 7(fvec4) FunctionCall 11(@PixelShaderFunction(vf4;) 99(param) 115: 7(fvec4) FunctionCall 14(@PixelShaderFunction(vf4;) 113(param)
Store 98(@entryPointOutput) 101 Store 112(@entryPointOutput) 115
Return Return
FunctionEnd FunctionEnd
11(@PixelShaderFunction(vf4;): 7(fvec4) Function None 9 9(vectorCond(): 7(fvec4) Function None 8
10(input): 8(ptr) FunctionParameter 10: Label
12: Label 22: 21(ptr) AccessChain 18 20
15(a): 14(ptr) Variable Function 23: 7(fvec4) Load 22
17(b): 14(ptr) Variable Function ReturnValue 23
19(c): 14(ptr) Variable Function FunctionEnd
21(d): 14(ptr) Variable Function 14(@PixelShaderFunction(vf4;): 7(fvec4) Function None 12
22(ret): 8(ptr) Variable Function 13(input): 11(ptr) FunctionParameter
42(e): 14(ptr) Variable Function 15: Label
43: 14(ptr) Variable Function 27(a): 26(ptr) Variable Function
55: 14(ptr) Variable Function 29(b): 26(ptr) Variable Function
64(f): 8(ptr) Variable Function 31(c): 26(ptr) Variable Function
65: 8(ptr) Variable Function 33(d): 26(ptr) Variable Function
Store 15(a) 16 34(ret): 11(ptr) Variable Function
Store 17(b) 18 54(e): 26(ptr) Variable Function
Store 19(c) 20 55: 26(ptr) Variable Function
Store 21(d) 20 67: 26(ptr) Variable Function
23: 13(int) Load 15(a) 76(f): 11(ptr) Variable Function
24: 6(float) ConvertSToF 23 77: 11(ptr) Variable Function
25: 7(fvec4) Load 10(input) Store 27(a) 28
26: 7(fvec4) VectorTimesScalar 25 24 Store 29(b) 30
27: 13(int) Load 17(b) Store 31(c) 32
28: 6(float) ConvertSToF 27 Store 33(d) 32
29: 7(fvec4) Load 10(input) 35: 19(int) Load 27(a)
30: 7(fvec4) VectorTimesScalar 29 28 36: 6(float) ConvertSToF 35
31: 7(fvec4) FAdd 26 30 37: 7(fvec4) Load 13(input)
32: 13(int) Load 19(c) 38: 7(fvec4) VectorTimesScalar 37 36
33: 6(float) ConvertSToF 32 39: 19(int) Load 29(b)
34: 7(fvec4) Load 10(input) 40: 6(float) ConvertSToF 39
35: 7(fvec4) VectorTimesScalar 34 33 41: 7(fvec4) Load 13(input)
36: 7(fvec4) FAdd 31 35 42: 7(fvec4) VectorTimesScalar 41 40
37: 13(int) Load 21(d) 43: 7(fvec4) FAdd 38 42
38: 6(float) ConvertSToF 37 44: 19(int) Load 31(c)
39: 7(fvec4) Load 10(input) 45: 6(float) ConvertSToF 44
40: 7(fvec4) VectorTimesScalar 39 38 46: 7(fvec4) Load 13(input)
41: 7(fvec4) FAdd 36 40 47: 7(fvec4) VectorTimesScalar 46 45
Store 22(ret) 41 48: 7(fvec4) FAdd 43 47
44: 13(int) Load 17(b) 49: 19(int) Load 33(d)
48: 45(bool) INotEqual 44 47 50: 6(float) ConvertSToF 49
SelectionMerge 50 None 51: 7(fvec4) Load 13(input)
BranchConditional 48 49 52 52: 7(fvec4) VectorTimesScalar 51 50
49: Label 53: 7(fvec4) FAdd 48 52
51: 13(int) Load 21(d) Store 34(ret) 53
Store 19(c) 51 56: 19(int) Load 29(b)
Store 43 51 60: 57(bool) INotEqual 56 59
Branch 50 SelectionMerge 62 None
52: Label BranchConditional 60 61 64
Store 43 53 61: Label
Branch 50 63: 19(int) Load 33(d)
50: Label Store 31(c) 63
54: 13(int) Load 43 Store 55 63
Store 15(a) 54 Branch 62
Store 42(e) 54 64: Label
56: 13(int) Load 15(a) Store 55 65
57: 45(bool) INotEqual 56 47 Branch 62
SelectionMerge 59 None 62: Label
BranchConditional 57 58 61 66: 19(int) Load 55
58: Label Store 27(a) 66
60: 13(int) Load 19(c) Store 54(e) 66
Store 21(d) 60 68: 19(int) Load 27(a)
Store 55 60 69: 57(bool) INotEqual 68 59
Branch 59 SelectionMerge 71 None
61: Label BranchConditional 69 70 73
Store 55 62 70: Label
Branch 59 72: 19(int) Load 31(c)
59: Label Store 33(d) 72
63: 13(int) Load 55 Store 67 72
Store 17(b) 63 Branch 71
67: 66(ptr) AccessChain 22(ret) 47 73: Label
68: 6(float) Load 67 Store 67 74
70: 66(ptr) AccessChain 10(input) 69 Branch 71
71: 6(float) Load 70 71: Label
72: 45(bool) FOrdLessThan 68 71 75: 19(int) Load 67
SelectionMerge 74 None Store 29(b) 75
BranchConditional 72 73 79 79: 78(ptr) AccessChain 34(ret) 59
73: Label 80: 6(float) Load 79
75: 13(int) Load 19(c) 82: 78(ptr) AccessChain 13(input) 81
76: 6(float) ConvertSToF 75 83: 6(float) Load 82
77: 7(fvec4) Load 10(input) 84: 57(bool) FOrdLessThan 80 83
78: 7(fvec4) VectorTimesScalar 77 76 SelectionMerge 86 None
Store 65 78 BranchConditional 84 85 91
Branch 74 85: Label
79: Label 87: 19(int) Load 31(c)
80: 13(int) Load 21(d) 88: 6(float) ConvertSToF 87
81: 6(float) ConvertSToF 80 89: 7(fvec4) Load 13(input)
82: 7(fvec4) Load 10(input) 90: 7(fvec4) VectorTimesScalar 89 88
83: 7(fvec4) VectorTimesScalar 82 81 Store 77 90
Store 65 83 Branch 86
Branch 74 91: Label
74: Label 92: 19(int) Load 33(d)
84: 7(fvec4) Load 65 93: 6(float) ConvertSToF 92
Store 64(f) 84 94: 7(fvec4) Load 13(input)
85: 13(int) Load 42(e) 95: 7(fvec4) VectorTimesScalar 94 93
86: 6(float) ConvertSToF 85 Store 77 95
87: 7(fvec4) Load 22(ret) Branch 86
88: 7(fvec4) VectorTimesScalar 87 86 86: Label
89: 7(fvec4) Load 64(f) 96: 7(fvec4) Load 77
90: 7(fvec4) FAdd 88 89 Store 76(f) 96
ReturnValue 90 97: 19(int) Load 54(e)
98: 6(float) ConvertSToF 97
99: 7(fvec4) Load 34(ret)
100: 7(fvec4) VectorTimesScalar 99 98
101: 7(fvec4) Load 76(f)
102: 7(fvec4) FAdd 100 101
103: 7(fvec4) FunctionCall 9(vectorCond()
104: 7(fvec4) FAdd 102 103
ReturnValue 104
FunctionEnd FunctionEnd

View file

@ -1,3 +1,15 @@
float4 c4;
float4 t4;
float4 f4;
float t;
float f;
float4 vectorCond()
{
return f4; // return (c4 ? t4 : f4) +
// (c4 ? t : f );
}
float4 PixelShaderFunction(float4 input) : COLOR0 float4 PixelShaderFunction(float4 input) : COLOR0
{ {
int a = 1 < 2 ? 3 < 4 ? 5 : 6 : 7; int a = 1 < 2 ? 3 < 4 ? 5 : 6 : 7;
@ -12,5 +24,5 @@ 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; return e * ret + f + vectorCond();
} }

View file

@ -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.1990" #define GLSLANG_REVISION "Overload400-PrecQual.1992"
#define GLSLANG_DATE "11-Apr-2017" #define GLSLANG_DATE "11-Apr-2017"