GLSL: Fix bug setting component=0 for an auto-location assignment.

Setting component=0 is later taken to mean the shader did so, which
is not always legal. It should instead set the component as not set
by the shader.
This commit is contained in:
John Kessenich 2017-06-04 13:17:20 -06:00
parent 8de7e7bf14
commit 94c18a84cd
7 changed files with 21 additions and 22 deletions

View file

@ -5893,7 +5893,7 @@ void TParseContext::fixBlockLocations(const TSourceLoc& loc, TQualifier& qualifi
if (nextLocation >= (int)TQualifier::layoutLocationEnd)
error(memberLoc, "location is too large", "location", "");
memberQualifier.layoutLocation = nextLocation;
memberQualifier.layoutComponent = 0;
memberQualifier.layoutComponent = TQualifier::layoutComponentEnd;
}
nextLocation = memberQualifier.layoutLocation + intermediate.computeTypeLocationSize(*typeList[member].type);
}