GLSL const arrays are allowed in OpenGL ES 3.0 Change-Id: I54161aaeaa29fe26c246c61f2e27ccda5ef4a5f1 Reviewed-on: https://swiftshader-review.googlesource.com/8234 Tested-by: Alexis Hétu <sugoi@google.com> Reviewed-by: Nicolas Capens <capn@google.com>
diff --git a/src/OpenGL/compiler/ParseHelper.cpp b/src/OpenGL/compiler/ParseHelper.cpp index 37d4eed..7bd7e64 100644 --- a/src/OpenGL/compiler/ParseHelper.cpp +++ b/src/OpenGL/compiler/ParseHelper.cpp
@@ -816,7 +816,7 @@ // bool TParseContext::arrayQualifierErrorCheck(const TSourceLoc &line, TPublicType type) { - if ((type.qualifier == EvqAttribute) || (type.qualifier == EvqVertexIn) || (type.qualifier == EvqConstExpr)) { + if ((type.qualifier == EvqAttribute) || (type.qualifier == EvqVertexIn) || (type.qualifier == EvqConstExpr && mShaderVersion < 300)) { error(line, "cannot declare arrays of this qualifier", TType(type).getCompleteString().c_str()); return true; }