// emit left operand
builder.clearAccessChain();
left.traverse(this);
- spv::Id leftId = builder.accessChainLoad(spv::NoPrecision, boolTypeId);
+ spv::Id leftId = accessChainLoad(left.getType());
// Operands to accumulate OpPhi operands
std::vector<spv::Id> phiOperands;
// emit right operand as the "then" part of the "if"
builder.clearAccessChain();
right.traverse(this);
- spv::Id rightId = builder.accessChainLoad(spv::NoPrecision, boolTypeId);
+ spv::Id rightId = accessChainLoad(right.getType());
// accumulate left operand's phi information
phiOperands.push_back(rightId);
// Module Version 10000
// Generated by (magic number): 80001
-// Id's are bound by 72
+// Id's are bound by 107
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4 "main"
+ EntryPoint Fragment 4 "main" 75
ExecutionMode 4 OriginUpperLeft
Source GLSL 450
Name 4 "main"
Name 41 ""
Name 62 "param"
Name 67 "param"
+ Name 75 "fragColor"
MemberDecorate 24(Buffer) 0 Offset 0
Decorate 24(Buffer) BufferBlock
Decorate 26 DescriptorSet 0
Decorate 39(Uniform) Block
Decorate 41 DescriptorSet 0
Decorate 41 Binding 0
+ Decorate 75(fragColor) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeBool
41: 40(ptr) Variable Uniform
42: TypePointer Uniform 38(ivec4)
65: 38(ivec4) ConstantComposite 31 31 31 31
+ 72: TypeFloat 32
+ 73: TypeVector 72(float) 4
+ 74: TypePointer Output 73(fvec4)
+ 75(fragColor): 74(ptr) Variable Output
+ 87: 72(float) Constant 0
+ 88: 72(float) Constant 1065353216
4(main): 2 Function None 3
5: Label
62(param): 8(ptr) Variable Function
Store 71 70
Branch 61
61: Label
+ 76: 42(ptr) AccessChain 41 28
+ 77: 38(ivec4) Load 76
+ 78: 22(int) CompositeExtract 77 0
+ 79: 6(bool) INotEqual 78 31
+ SelectionMerge 81 None
+ BranchConditional 79 80 81
+ 80: Label
+ 82: 42(ptr) AccessChain 41 28
+ 83: 38(ivec4) Load 82
+ 84: 22(int) CompositeExtract 83 1
+ 85: 6(bool) INotEqual 84 31
+ Branch 81
+ 81: Label
+ 86: 6(bool) Phi 79 61 85 80
+ 89: 72(float) Select 86 88 87
+ 90: 73(fvec4) CompositeConstruct 89 89 89 89
+ Store 75(fragColor) 90
+ 91: 42(ptr) AccessChain 41 28
+ 92: 38(ivec4) Load 91
+ 93: 22(int) CompositeExtract 92 0
+ 94: 6(bool) INotEqual 93 31
+ 95: 6(bool) LogicalNot 94
+ SelectionMerge 97 None
+ BranchConditional 95 96 97
+ 96: Label
+ 98: 42(ptr) AccessChain 41 28
+ 99: 38(ivec4) Load 98
+ 100: 22(int) CompositeExtract 99 1
+ 101: 6(bool) INotEqual 100 31
+ Branch 97
+ 97: Label
+ 102: 6(bool) Phi 94 81 101 96
+ 103: 72(float) Select 102 88 87
+ 104: 73(fvec4) CompositeConstruct 103 103 103 103
+ 105: 73(fvec4) Load 75(fragColor)
+ 106: 73(fvec4) FSub 105 104
+ Store 75(fragColor) 106
Return
FunctionEnd
14(foo(vb4;vb2;): 2 Function None 11