SPV: Prevent issue #415 with better semantic checking.

This commit is contained in:
John Kessenich
2016-07-31 12:39:46 -06:00
parent 11e1a073f3
commit 1176530bf5
9 changed files with 2681 additions and 2937 deletions

View File

@@ -2860,7 +2860,7 @@ spv::Id TGlslangToSpvTraverser::handleUserFunctionCall(const glslang::TIntermAgg
builder.clearAccessChain();
glslangArgs[a]->traverse(this);
argTypes.push_back(&paramType);
// keep outputs as and opaque objects l-values, evaluate input-only as r-values
// keep outputs and opaque objects as l-values, evaluate input-only as r-values
if (qualifiers[a] != glslang::EvqConstReadOnly || paramType.isOpaque()) {
// save l-value
lValues.push_back(builder.getAccessChain());