Merge pull request #694 from mtavenrath/fix_origin_link

Use correct OriginUpperLeft when linking more than one shader.
This commit is contained in:
John Kessenich 2017-01-26 10:39:54 -07:00 committed by GitHub
commit 72754864c1
6 changed files with 185 additions and 0 deletions

View file

@ -1707,6 +1707,15 @@ bool TProgram::linkStage(EShLanguage stage, EShMessages messages)
intermediate[stage] = new TIntermediate(stage,
firstIntermediate->getVersion(),
firstIntermediate->getProfile());
// The new TIntermediate must use the same origin as the original TIntermediates.
// Otherwise linking will fail due to different coordinate systems.
if (firstIntermediate->getOriginUpperLeft()) {
intermediate[stage]->setOriginUpperLeft();
}
intermediate[stage]->setSpv(firstIntermediate->getSpv());
newedIntermediate[stage] = true;
}