Use correct OriginUpperLeft when linking more than one shader.

This commit is contained in:
Markus Tavenrath 2017-01-23 16:53:16 -08:00
parent 2043da90df
commit 7b89e75213
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;
}