SPV: Plumb through XFB buffer and stride information.

Also, only emit this XFB information where the SPIR-V spec says
it should be emitted: essentially, on objects.

This and the previous commit together fix #1185.
This commit is contained in:
John Kessenich 2017-12-15 06:21:46 -07:00
parent be3842f6ae
commit edaf556778
7 changed files with 88 additions and 20 deletions

View file

@ -3550,7 +3550,8 @@ void TParseContext::redeclareBuiltinBlock(const TSourceLoc& loc, TTypeList& newT
oldType.getQualifier().flat = newType.getQualifier().flat;
oldType.getQualifier().nopersp = newType.getQualifier().nopersp;
oldType.getQualifier().layoutXfbOffset = newType.getQualifier().layoutXfbOffset;
if (oldType.getQualifier().layoutXfbOffset != TQualifier::layoutXfbBufferEnd)
type.getQualifier().layoutXfbBuffer = currentBlockQualifier.layoutXfbBuffer;
if (oldType.isImplicitlySizedArray() && newType.isExplicitlySizedArray())
oldType.changeOuterArraySize(newType.getOuterArraySize());