HLSL: Don't do logical short-circuits when the operands are bool-vectors.
This seems a bit ill-defined, and was generating code that made OpPhi of two operands that were Boolean vectors result in a scalar bool.
This commit is contained in:
@@ -255,12 +255,12 @@ gl_FragCoord origin is upper left
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 120
|
||||
// Id's are bound by 115
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 117
|
||||
EntryPoint Fragment 4 "main" 112
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Source HLSL 500
|
||||
Name 4 "main"
|
||||
@@ -279,16 +279,16 @@ gl_FragCoord origin is upper left
|
||||
Name 47 "r10"
|
||||
Name 58 "r11"
|
||||
Name 67 "r20"
|
||||
Name 79 "r21"
|
||||
Name 92 "psout"
|
||||
Name 117 "Color"
|
||||
Name 77 "r21"
|
||||
Name 87 "psout"
|
||||
Name 112 "Color"
|
||||
MemberDecorate 18($Global) 0 Offset 0
|
||||
MemberDecorate 18($Global) 1 Offset 16
|
||||
MemberDecorate 18($Global) 2 Offset 32
|
||||
MemberDecorate 18($Global) 3 Offset 36
|
||||
Decorate 18($Global) Block
|
||||
Decorate 20 DescriptorSet 0
|
||||
Decorate 117(Color) Location 0
|
||||
Decorate 112(Color) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
@@ -311,20 +311,20 @@ gl_FragCoord origin is upper left
|
||||
34: 21(int) Constant 1
|
||||
48: 21(int) Constant 2
|
||||
49: TypePointer Uniform 16(int)
|
||||
73: 21(int) Constant 3
|
||||
91: TypePointer Function 8(PS_OUTPUT)
|
||||
106: 6(float) Constant 0
|
||||
107: 6(float) Constant 1065353216
|
||||
108: 7(fvec4) ConstantComposite 106 106 106 106
|
||||
109: 7(fvec4) ConstantComposite 107 107 107 107
|
||||
111: TypePointer Function 7(fvec4)
|
||||
116: TypePointer Output 7(fvec4)
|
||||
117(Color): 116(ptr) Variable Output
|
||||
71: 21(int) Constant 3
|
||||
86: TypePointer Function 8(PS_OUTPUT)
|
||||
101: 6(float) Constant 0
|
||||
102: 6(float) Constant 1065353216
|
||||
103: 7(fvec4) ConstantComposite 101 101 101 101
|
||||
104: 7(fvec4) ConstantComposite 102 102 102 102
|
||||
106: TypePointer Function 7(fvec4)
|
||||
111: TypePointer Output 7(fvec4)
|
||||
112(Color): 111(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
118:8(PS_OUTPUT) FunctionCall 10(@main()
|
||||
119: 7(fvec4) CompositeExtract 118 0
|
||||
Store 117(Color) 119
|
||||
113:8(PS_OUTPUT) FunctionCall 10(@main()
|
||||
114: 7(fvec4) CompositeExtract 113 0
|
||||
Store 112(Color) 114
|
||||
Return
|
||||
FunctionEnd
|
||||
10(@main():8(PS_OUTPUT) Function None 9
|
||||
@@ -335,8 +335,8 @@ gl_FragCoord origin is upper left
|
||||
47(r10): 14(ptr) Variable Function
|
||||
58(r11): 14(ptr) Variable Function
|
||||
67(r20): 14(ptr) Variable Function
|
||||
79(r21): 14(ptr) Variable Function
|
||||
92(psout): 91(ptr) Variable Function
|
||||
77(r21): 14(ptr) Variable Function
|
||||
87(psout): 86(ptr) Variable Function
|
||||
24: 23(ptr) AccessChain 20 22
|
||||
25: 17(ivec4) Load 24
|
||||
28: 13(bvec4) INotEqual 25 27
|
||||
@@ -379,48 +379,37 @@ gl_FragCoord origin is upper left
|
||||
68: 23(ptr) AccessChain 20 22
|
||||
69: 17(ivec4) Load 68
|
||||
70: 13(bvec4) INotEqual 69 27
|
||||
SelectionMerge 72 None
|
||||
BranchConditional 70 71 72
|
||||
71: Label
|
||||
74: 49(ptr) AccessChain 20 73
|
||||
75: 16(int) Load 74
|
||||
76: 12(bool) INotEqual 75 26
|
||||
77: 13(bvec4) CompositeConstruct 76 76 76 76
|
||||
Branch 72
|
||||
72: Label
|
||||
78: 12(bool) Phi 70 11 77 71
|
||||
Store 67(r20) 78
|
||||
80: 23(ptr) AccessChain 20 22
|
||||
81: 17(ivec4) Load 80
|
||||
82: 13(bvec4) INotEqual 81 27
|
||||
83: 12(bool) LogicalNot 82
|
||||
SelectionMerge 85 None
|
||||
BranchConditional 83 84 85
|
||||
84: Label
|
||||
86: 49(ptr) AccessChain 20 73
|
||||
87: 16(int) Load 86
|
||||
88: 12(bool) INotEqual 87 26
|
||||
89: 13(bvec4) CompositeConstruct 88 88 88 88
|
||||
Branch 85
|
||||
85: Label
|
||||
90: 12(bool) Phi 82 72 89 84
|
||||
Store 79(r21) 90
|
||||
93: 13(bvec4) Load 15(r00)
|
||||
94: 13(bvec4) Load 30(r01)
|
||||
95: 13(bvec4) LogicalOr 93 94
|
||||
96: 13(bvec4) Load 39(r02)
|
||||
97: 13(bvec4) LogicalOr 95 96
|
||||
98: 13(bvec4) Load 47(r10)
|
||||
99: 13(bvec4) LogicalOr 97 98
|
||||
100: 13(bvec4) Load 58(r11)
|
||||
101: 13(bvec4) LogicalOr 99 100
|
||||
102: 13(bvec4) Load 67(r20)
|
||||
103: 13(bvec4) LogicalOr 101 102
|
||||
104: 13(bvec4) Load 79(r21)
|
||||
105: 13(bvec4) LogicalOr 103 104
|
||||
110: 7(fvec4) Select 105 109 108
|
||||
112: 111(ptr) AccessChain 92(psout) 22
|
||||
Store 112 110
|
||||
113:8(PS_OUTPUT) Load 92(psout)
|
||||
ReturnValue 113
|
||||
72: 49(ptr) AccessChain 20 71
|
||||
73: 16(int) Load 72
|
||||
74: 12(bool) INotEqual 73 26
|
||||
75: 13(bvec4) CompositeConstruct 74 74 74 74
|
||||
76: 13(bvec4) LogicalAnd 70 75
|
||||
Store 67(r20) 76
|
||||
78: 23(ptr) AccessChain 20 22
|
||||
79: 17(ivec4) Load 78
|
||||
80: 13(bvec4) INotEqual 79 27
|
||||
81: 49(ptr) AccessChain 20 71
|
||||
82: 16(int) Load 81
|
||||
83: 12(bool) INotEqual 82 26
|
||||
84: 13(bvec4) CompositeConstruct 83 83 83 83
|
||||
85: 13(bvec4) LogicalOr 80 84
|
||||
Store 77(r21) 85
|
||||
88: 13(bvec4) Load 15(r00)
|
||||
89: 13(bvec4) Load 30(r01)
|
||||
90: 13(bvec4) LogicalOr 88 89
|
||||
91: 13(bvec4) Load 39(r02)
|
||||
92: 13(bvec4) LogicalOr 90 91
|
||||
93: 13(bvec4) Load 47(r10)
|
||||
94: 13(bvec4) LogicalOr 92 93
|
||||
95: 13(bvec4) Load 58(r11)
|
||||
96: 13(bvec4) LogicalOr 94 95
|
||||
97: 13(bvec4) Load 67(r20)
|
||||
98: 13(bvec4) LogicalOr 96 97
|
||||
99: 13(bvec4) Load 77(r21)
|
||||
100: 13(bvec4) LogicalOr 98 99
|
||||
105: 7(fvec4) Select 100 104 103
|
||||
107: 106(ptr) AccessChain 87(psout) 22
|
||||
Store 107 105
|
||||
108:8(PS_OUTPUT) Load 87(psout)
|
||||
ReturnValue 108
|
||||
FunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user