HLSL: Fix #1106. Support shader setting of binding/set for $Global.

This commit is contained in:
John Kessenich 2017-10-19 16:54:25 -06:00
parent fe4e572c53
commit 1b46f137f7
9 changed files with 140 additions and 2 deletions

View file

@ -569,6 +569,10 @@ void TParseContextBase::growGlobalUniformBlock(const TSourceLoc& loc, TType& mem
firstNewMember = 0;
}
// Update with binding and set
globalUniformBlock->getWritableType().getQualifier().layoutBinding = globalUniformBinding;
globalUniformBlock->getWritableType().getQualifier().layoutSet = globalUniformSet;
// Add the requested member as a member to the global block.
TType* type = new TType;
type->shallowCopy(memberType);