SPV: Continue to fix the issue of bool -> uint32
For short-circuit operator (&& and ||), the conversion is missing.
This commit is contained in:
parent
2725323bba
commit
b4fd8d10f0
3 changed files with 54 additions and 4 deletions
|
|
@ -3876,7 +3876,7 @@ spv::Id TGlslangToSpvTraverser::createShortCircuit(glslang::TOperator op, glslan
|
|||
// 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;
|
||||
|
|
@ -3899,7 +3899,7 @@ spv::Id TGlslangToSpvTraverser::createShortCircuit(glslang::TOperator op, glslan
|
|||
// 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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue