Commit 536ffccd by Alexis Hetu Committed by Alexis Hétu

Removed error from extraneous matrix packing qualifier

Two minor changes: 1) Structs are allowed to have matrix packing qualifiers 2) Adding an extra matrix packing qualifier shouldn't make a shader fail to compile Change-Id: Icbe0178cb6017854c289db90349a17662e868095 Reviewed-on: https://swiftshader-review.googlesource.com/14228Tested-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent ea97da4a
...@@ -2387,10 +2387,9 @@ TIntermAggregate* TParseContext::addInterfaceBlock(const TPublicType& typeQualif ...@@ -2387,10 +2387,9 @@ TIntermAggregate* TParseContext::addInterfaceBlock(const TPublicType& typeQualif
{ {
fieldLayoutQualifier.matrixPacking = blockLayoutQualifier.matrixPacking; fieldLayoutQualifier.matrixPacking = blockLayoutQualifier.matrixPacking;
} }
else if(!fieldType->isMatrix()) else if(!fieldType->isMatrix() && (fieldType->getBasicType() != EbtStruct))
{ {
error(field->line(), "invalid layout qualifier:", getMatrixPackingString(fieldLayoutQualifier.matrixPacking), "can only be used on matrix types"); warning(field->line(), "extraneous layout qualifier:", getMatrixPackingString(fieldLayoutQualifier.matrixPacking), "only has an effect on matrix types");
recover();
} }
fieldType->setLayoutQualifier(fieldLayoutQualifier); fieldType->setLayoutQualifier(fieldLayoutQualifier);
......
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