HLSL: Give error on unsupported buffer initializer.

This commit is contained in:
John Kessenich
2017-12-09 04:42:42 -07:00
parent 87982be1a0
commit 8116cfc9bf
2 changed files with 9 additions and 37 deletions

View File

@@ -478,6 +478,8 @@ bool HlslGrammar::acceptDeclaration(TIntermNode*& nodeList)
if (typedefDecl)
parseContext.declareTypedef(idToken.loc, *fullName, variableType);
else if (variableType.getBasicType() == EbtBlock) {
if (expressionNode)
parseContext.error(idToken.loc, "buffer aliasing not yet supported", "block initializer", "");
parseContext.declareBlock(idToken.loc, variableType, fullName,
variableType.isArray() ? &variableType.getArraySizes() : nullptr);
parseContext.declareStructBufferCounter(idToken.loc, variableType, *fullName);