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:
@@ -173,12 +173,12 @@ gl_FragCoord origin is upper left
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 95
|
||||
// Id's are bound by 91
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 93
|
||||
EntryPoint Fragment 4 "main" 89
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Source HLSL 500
|
||||
Name 4 "main"
|
||||
@@ -193,14 +193,14 @@ gl_FragCoord origin is upper left
|
||||
MemberName 39($Global) 2 "f3"
|
||||
Name 41 ""
|
||||
Name 57 "@finitetmp"
|
||||
Name 73 "@finitetmp"
|
||||
Name 93 "@entryPointOutput"
|
||||
Name 71 "@finitetmp"
|
||||
Name 89 "@entryPointOutput"
|
||||
MemberDecorate 39($Global) 0 Offset 0
|
||||
MemberDecorate 39($Global) 1 Offset 4
|
||||
MemberDecorate 39($Global) 2 Offset 16
|
||||
Decorate 39($Global) Block
|
||||
Decorate 41 DescriptorSet 0
|
||||
Decorate 93(@entryPointOutput) Location 0
|
||||
Decorate 89(@entryPointOutput) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
@@ -221,18 +221,18 @@ gl_FragCoord origin is upper left
|
||||
58: 42(int) Constant 1
|
||||
59: TypePointer Uniform 37(fvec2)
|
||||
63: TypeVector 8(bool) 2
|
||||
72: TypePointer Function 38(fvec3)
|
||||
74: 42(int) Constant 2
|
||||
75: TypePointer Uniform 38(fvec3)
|
||||
79: TypeVector 8(bool) 3
|
||||
88: 6(float) Constant 0
|
||||
89: 13(fvec4) ConstantComposite 88 88 88 88
|
||||
92: TypePointer Output 13(fvec4)
|
||||
93(@entryPointOutput): 92(ptr) Variable Output
|
||||
70: TypePointer Function 38(fvec3)
|
||||
72: 42(int) Constant 2
|
||||
73: TypePointer Uniform 38(fvec3)
|
||||
77: TypeVector 8(bool) 3
|
||||
84: 6(float) Constant 0
|
||||
85: 13(fvec4) ConstantComposite 84 84 84 84
|
||||
88: TypePointer Output 13(fvec4)
|
||||
89(@entryPointOutput): 88(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
94: 13(fvec4) FunctionCall 15(@main()
|
||||
Store 93(@entryPointOutput) 94
|
||||
90: 13(fvec4) FunctionCall 15(@main()
|
||||
Store 89(@entryPointOutput) 90
|
||||
Return
|
||||
FunctionEnd
|
||||
11(test1(f1;): 8(bool) Function None 9
|
||||
@@ -268,7 +268,7 @@ gl_FragCoord origin is upper left
|
||||
16: Label
|
||||
36(@finitetmp): 7(ptr) Variable Function
|
||||
57(@finitetmp): 56(ptr) Variable Function
|
||||
73(@finitetmp): 72(ptr) Variable Function
|
||||
71(@finitetmp): 70(ptr) Variable Function
|
||||
45: 44(ptr) AccessChain 41 43
|
||||
46: 6(float) Load 45
|
||||
Store 36(@finitetmp) 46
|
||||
@@ -290,29 +290,19 @@ gl_FragCoord origin is upper left
|
||||
62: 37(fvec2) Load 57(@finitetmp)
|
||||
64: 63(bvec2) IsNan 62
|
||||
65: 63(bvec2) LogicalNot 64
|
||||
SelectionMerge 67 None
|
||||
BranchConditional 65 66 67
|
||||
66: Label
|
||||
68: 37(fvec2) Load 57(@finitetmp)
|
||||
69: 63(bvec2) IsInf 68
|
||||
70: 63(bvec2) LogicalNot 69
|
||||
Branch 67
|
||||
67: Label
|
||||
71: 8(bool) Phi 65 51 70 66
|
||||
76: 75(ptr) AccessChain 41 74
|
||||
77: 38(fvec3) Load 76
|
||||
Store 73(@finitetmp) 77
|
||||
78: 38(fvec3) Load 73(@finitetmp)
|
||||
80: 79(bvec3) IsNan 78
|
||||
81: 79(bvec3) LogicalNot 80
|
||||
SelectionMerge 83 None
|
||||
BranchConditional 81 82 83
|
||||
82: Label
|
||||
84: 38(fvec3) Load 73(@finitetmp)
|
||||
85: 79(bvec3) IsInf 84
|
||||
86: 79(bvec3) LogicalNot 85
|
||||
Branch 83
|
||||
83: Label
|
||||
87: 8(bool) Phi 81 67 86 82
|
||||
ReturnValue 89
|
||||
66: 37(fvec2) Load 57(@finitetmp)
|
||||
67: 63(bvec2) IsInf 66
|
||||
68: 63(bvec2) LogicalNot 67
|
||||
69: 63(bvec2) LogicalAnd 65 68
|
||||
74: 73(ptr) AccessChain 41 72
|
||||
75: 38(fvec3) Load 74
|
||||
Store 71(@finitetmp) 75
|
||||
76: 38(fvec3) Load 71(@finitetmp)
|
||||
78: 77(bvec3) IsNan 76
|
||||
79: 77(bvec3) LogicalNot 78
|
||||
80: 38(fvec3) Load 71(@finitetmp)
|
||||
81: 77(bvec3) IsInf 80
|
||||
82: 77(bvec3) LogicalNot 81
|
||||
83: 77(bvec3) LogicalAnd 79 82
|
||||
ReturnValue 85
|
||||
FunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user