Merge pull request #187 from amdrexu/bugfix

SPV: Continue to fix the issue of bool -> uint32
This commit is contained in:
John Kessenich
2016-03-03 21:59:21 -07:00
3 changed files with 54 additions and 4 deletions

View File

@@ -3878,7 +3878,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;
@@ -3901,7 +3901,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);