Commit 51a53c7b by Jamie Madill Committed by Shannon Woods

Properly report error when layout qualifiers are specified outside uniform blocks.

TRAC #23357 Signed-off-by: Shannon Woods Signed-off-by: Geoff Lang Authored-by: Jamie Madill
parent fd39655d
...@@ -976,18 +976,18 @@ bool TParseContext::singleDeclarationErrorCheck(TPublicType &publicType, TSource ...@@ -976,18 +976,18 @@ bool TParseContext::singleDeclarationErrorCheck(TPublicType &publicType, TSource
if (layoutQualifier.matrixPacking != EmpUnspecified) if (layoutQualifier.matrixPacking != EmpUnspecified)
{ {
error(identifierLocation, "layout qualifier", getMatrixPackingString(layoutQualifier.matrixPacking), "only valid for interface blocks"); error(identifierLocation, "layout qualifier", getMatrixPackingString(layoutQualifier.matrixPacking), "only valid for interface blocks");
return false; return true;
} }
if (layoutQualifier.blockStorage != EbsUnspecified) if (layoutQualifier.blockStorage != EbsUnspecified)
{ {
error(identifierLocation, "layout qualifier", getBlockStorageString(layoutQualifier.blockStorage), "only valid for interface blocks"); error(identifierLocation, "layout qualifier", getBlockStorageString(layoutQualifier.blockStorage), "only valid for interface blocks");
return false; return true;
} }
if (publicType.qualifier != EvqVertexInput && publicType.qualifier != EvqFragmentOutput && layoutLocationErrorCheck(identifierLocation, publicType.layoutQualifier)) if (publicType.qualifier != EvqVertexInput && publicType.qualifier != EvqFragmentOutput && layoutLocationErrorCheck(identifierLocation, publicType.layoutQualifier))
{ {
return false; return true;
} }
return false; return false;
...@@ -1226,7 +1226,7 @@ TIntermAggregate* TParseContext::parseSingleDeclaration(TPublicType &publicType, ...@@ -1226,7 +1226,7 @@ TIntermAggregate* TParseContext::parseSingleDeclaration(TPublicType &publicType,
if (identifier != "") if (identifier != "")
{ {
if (structQualifierErrorCheck(identifierLocation, publicType)) if (singleDeclarationErrorCheck(publicType, identifierLocation, identifier))
recover(); recover();
// this error check can mutate the type // this error check can mutate the type
...@@ -1249,7 +1249,7 @@ TIntermAggregate* TParseContext::parseSingleDeclaration(TPublicType &publicType, ...@@ -1249,7 +1249,7 @@ TIntermAggregate* TParseContext::parseSingleDeclaration(TPublicType &publicType,
TIntermAggregate* TParseContext::parseSingleArrayDeclaration(TPublicType &publicType, TSourceLoc identifierLocation, const TString &identifier, TSourceLoc indexLocation, TIntermTyped *indexExpression) TIntermAggregate* TParseContext::parseSingleArrayDeclaration(TPublicType &publicType, TSourceLoc identifierLocation, const TString &identifier, TSourceLoc indexLocation, TIntermTyped *indexExpression)
{ {
if (structQualifierErrorCheck(identifierLocation, publicType)) if (singleDeclarationErrorCheck(publicType, identifierLocation, identifier))
recover(); recover();
// this error check can mutate the type // this error check can mutate the type
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment