fix structure indexing reassignment during block merging
For EOpIndexDirectStruct binaries, we want to visit the left symbol (the structure) before we visit the binary, so it gets updated first. That way we are comparing the updated structure against the target 'unitType', not the original structure.
This commit is contained in:
parent
2f5bc0b741
commit
67384dd18b
1 changed files with 1 additions and 1 deletions
|
|
@ -642,7 +642,7 @@ void TIntermediate::mergeBlockDefinitions(TInfoSink& infoSink, TIntermSymbol* bl
|
||||||
}
|
}
|
||||||
TMergeBlockTraverser(const TIntermSymbol* newSym, const glslang::TType* unitType, glslang::TIntermediate* unit,
|
TMergeBlockTraverser(const TIntermSymbol* newSym, const glslang::TType* unitType, glslang::TIntermediate* unit,
|
||||||
const std::map<unsigned int, unsigned int>* memberIdxUpdates)
|
const std::map<unsigned int, unsigned int>* memberIdxUpdates)
|
||||||
: newSymbol(newSym), unitType(unitType), unit(unit), memberIndexUpdates(memberIdxUpdates)
|
: TIntermTraverser(false, true), newSymbol(newSym), unitType(unitType), unit(unit), memberIndexUpdates(memberIdxUpdates)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
virtual ~TMergeBlockTraverser() {}
|
virtual ~TMergeBlockTraverser() {}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue