fix error message for vertex struct input

Vertex shaders can have pipeline inputs that are arrays, but not structure
inputs. (GLSL 4.5 section 4.3.4)

But the error message for struct inputs says "cannot be a structure or array".
This PR removes the "or array" part.

Note: The array case is handled immediately after the check for
structure type.

Co-authored-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
This commit is contained in:
David Neto
2021-06-28 09:43:02 -04:00
committed by kd-11
parent 37f39ece5d
commit 941df35580
2 changed files with 2 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
300layout.vert
ERROR: 0:7: 'vertex input arrays' : not supported with this profile: es
ERROR: 0:8: 'in' : cannot be a structure or array
ERROR: 0:8: 'in' : cannot be a structure
ERROR: 0:8: 's' : A structure containing an array is not allowed as input in ES
ERROR: 0:8: 'vertex input arrays' : not supported with this profile: es
ERROR: 0:8: 'location' : overlapping use of location 10

View File

@@ -4013,7 +4013,7 @@ void TParseContext::globalQualifierTypeCheck(const TSourceLoc& loc, const TQuali
switch (language) {
case EShLangVertex:
if (publicType.basicType == EbtStruct) {
error(loc, "cannot be a structure or array", GetStorageQualifierString(qualifier.storage), "");
error(loc, "cannot be a structure", GetStorageQualifierString(qualifier.storage), "");
return;
}
if (publicType.arraySizes) {