HLSL: Fix #903: Don't short-circuit && or ||.
This commit is contained in:
parent
6e2295d340
commit
84cc15f0d0
4 changed files with 256 additions and 294 deletions
|
|
@ -129,106 +129,95 @@ gl_FragCoord origin is upper left
|
|||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 62
|
||||
// Id's are bound by 57
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 59
|
||||
EntryPoint Fragment 4 "main" 54
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Source HLSL 500
|
||||
Name 4 "main"
|
||||
Name 8 "PS_OUTPUT"
|
||||
MemberName 8(PS_OUTPUT) 0 "Color"
|
||||
Name 10 "@main("
|
||||
Name 15 "$Global"
|
||||
MemberName 15($Global) 0 "ival"
|
||||
MemberName 15($Global) 1 "ival4"
|
||||
MemberName 15($Global) 2 "fval"
|
||||
MemberName 15($Global) 3 "fval4"
|
||||
Name 17 ""
|
||||
Name 50 "psout"
|
||||
Name 59 "Color"
|
||||
MemberDecorate 15($Global) 0 Offset 0
|
||||
MemberDecorate 15($Global) 1 Offset 16
|
||||
MemberDecorate 15($Global) 2 Offset 32
|
||||
MemberDecorate 15($Global) 3 Offset 48
|
||||
Decorate 15($Global) Block
|
||||
Decorate 17 DescriptorSet 0
|
||||
Decorate 59(Color) Location 0
|
||||
Name 14 "$Global"
|
||||
MemberName 14($Global) 0 "ival"
|
||||
MemberName 14($Global) 1 "ival4"
|
||||
MemberName 14($Global) 2 "fval"
|
||||
MemberName 14($Global) 3 "fval4"
|
||||
Name 16 ""
|
||||
Name 45 "psout"
|
||||
Name 54 "Color"
|
||||
MemberDecorate 14($Global) 0 Offset 0
|
||||
MemberDecorate 14($Global) 1 Offset 16
|
||||
MemberDecorate 14($Global) 2 Offset 32
|
||||
MemberDecorate 14($Global) 3 Offset 48
|
||||
Decorate 14($Global) Block
|
||||
Decorate 16 DescriptorSet 0
|
||||
Decorate 54(Color) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
7: TypeVector 6(float) 4
|
||||
8(PS_OUTPUT): TypeStruct 7(fvec4)
|
||||
9: TypeFunction 8(PS_OUTPUT)
|
||||
12: TypeBool
|
||||
13: TypeInt 32 1
|
||||
14: TypeVector 13(int) 4
|
||||
15($Global): TypeStruct 13(int) 14(ivec4) 6(float) 7(fvec4)
|
||||
16: TypePointer Uniform 15($Global)
|
||||
17: 16(ptr) Variable Uniform
|
||||
18: 13(int) Constant 0
|
||||
19: TypePointer Uniform 13(int)
|
||||
12: TypeInt 32 1
|
||||
13: TypeVector 12(int) 4
|
||||
14($Global): TypeStruct 12(int) 13(ivec4) 6(float) 7(fvec4)
|
||||
15: TypePointer Uniform 14($Global)
|
||||
16: 15(ptr) Variable Uniform
|
||||
17: 12(int) Constant 0
|
||||
18: TypePointer Uniform 12(int)
|
||||
21: TypeBool
|
||||
22: TypeInt 32 0
|
||||
23: 22(int) Constant 0
|
||||
27: 13(int) Constant 2
|
||||
28: TypePointer Uniform 6(float)
|
||||
49: TypePointer Function 8(PS_OUTPUT)
|
||||
51: 6(float) Constant 1065353216
|
||||
52: 7(fvec4) ConstantComposite 51 51 51 51
|
||||
53: TypePointer Function 7(fvec4)
|
||||
58: TypePointer Output 7(fvec4)
|
||||
59(Color): 58(ptr) Variable Output
|
||||
25: 12(int) Constant 2
|
||||
26: TypePointer Uniform 6(float)
|
||||
44: TypePointer Function 8(PS_OUTPUT)
|
||||
46: 6(float) Constant 1065353216
|
||||
47: 7(fvec4) ConstantComposite 46 46 46 46
|
||||
48: TypePointer Function 7(fvec4)
|
||||
53: TypePointer Output 7(fvec4)
|
||||
54(Color): 53(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
60:8(PS_OUTPUT) FunctionCall 10(@main()
|
||||
61: 7(fvec4) CompositeExtract 60 0
|
||||
Store 59(Color) 61
|
||||
55:8(PS_OUTPUT) FunctionCall 10(@main()
|
||||
56: 7(fvec4) CompositeExtract 55 0
|
||||
Store 54(Color) 56
|
||||
Return
|
||||
FunctionEnd
|
||||
10(@main():8(PS_OUTPUT) Function None 9
|
||||
11: Label
|
||||
50(psout): 49(ptr) Variable Function
|
||||
20: 19(ptr) AccessChain 17 18
|
||||
21: 13(int) Load 20
|
||||
24: 12(bool) INotEqual 21 23
|
||||
SelectionMerge 26 None
|
||||
BranchConditional 24 25 26
|
||||
25: Label
|
||||
29: 28(ptr) AccessChain 17 27
|
||||
30: 6(float) Load 29
|
||||
31: 13(int) ConvertFToS 30
|
||||
32: 12(bool) INotEqual 31 23
|
||||
Branch 26
|
||||
26: Label
|
||||
33: 12(bool) Phi 24 11 32 25
|
||||
SelectionMerge 35 None
|
||||
BranchConditional 33 34 35
|
||||
34: Label
|
||||
Branch 35
|
||||
35: Label
|
||||
36: 19(ptr) AccessChain 17 18
|
||||
37: 13(int) Load 36
|
||||
38: 12(bool) INotEqual 37 23
|
||||
39: 12(bool) LogicalNot 38
|
||||
SelectionMerge 41 None
|
||||
BranchConditional 39 40 41
|
||||
40: Label
|
||||
42: 28(ptr) AccessChain 17 27
|
||||
43: 6(float) Load 42
|
||||
44: 13(int) ConvertFToS 43
|
||||
45: 12(bool) INotEqual 44 23
|
||||
Branch 41
|
||||
41: Label
|
||||
46: 12(bool) Phi 38 35 45 40
|
||||
SelectionMerge 48 None
|
||||
BranchConditional 46 47 48
|
||||
47: Label
|
||||
Branch 48
|
||||
48: Label
|
||||
54: 53(ptr) AccessChain 50(psout) 18
|
||||
Store 54 52
|
||||
55:8(PS_OUTPUT) Load 50(psout)
|
||||
ReturnValue 55
|
||||
45(psout): 44(ptr) Variable Function
|
||||
19: 18(ptr) AccessChain 16 17
|
||||
20: 12(int) Load 19
|
||||
24: 21(bool) INotEqual 20 23
|
||||
27: 26(ptr) AccessChain 16 25
|
||||
28: 6(float) Load 27
|
||||
29: 12(int) ConvertFToS 28
|
||||
30: 21(bool) INotEqual 29 23
|
||||
31: 21(bool) LogicalAnd 24 30
|
||||
SelectionMerge 33 None
|
||||
BranchConditional 31 32 33
|
||||
32: Label
|
||||
Branch 33
|
||||
33: Label
|
||||
34: 18(ptr) AccessChain 16 17
|
||||
35: 12(int) Load 34
|
||||
36: 21(bool) INotEqual 35 23
|
||||
37: 26(ptr) AccessChain 16 25
|
||||
38: 6(float) Load 37
|
||||
39: 12(int) ConvertFToS 38
|
||||
40: 21(bool) INotEqual 39 23
|
||||
41: 21(bool) LogicalOr 36 40
|
||||
SelectionMerge 43 None
|
||||
BranchConditional 41 42 43
|
||||
42: Label
|
||||
Branch 43
|
||||
43: Label
|
||||
49: 48(ptr) AccessChain 45(psout) 17
|
||||
Store 49 47
|
||||
50:8(PS_OUTPUT) Load 45(psout)
|
||||
ReturnValue 50
|
||||
FunctionEnd
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue