Merge pull request #694 from mtavenrath/fix_origin_link
Use correct OriginUpperLeft when linking more than one shader.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user