Disallow multiple locations on output variables
GLSL ES specs from version 3.00 to 3.20 all mention that output layout
location qualifier may appear at most once within a declaration.
Enforce this rule when parsing shaders.
Also set max draw buffers to 8 when compiling GLSL ES >= 3.00 in the
qualification order tests and shader translator sample, so that
parsing locations > 0 will succeed.
BUG=angleproject:1505
TEST=angle_unittests
Change-Id: I50fe409041385f5e10e695f43dc3a572433e9772
Reviewed-on: https://chromium-review.googlesource.com/381211
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
diff --git a/src/compiler/translator/ParseContext.cpp b/src/compiler/translator/ParseContext.cpp
index fc3c2c5..9a08ddf 100644
--- a/src/compiler/translator/ParseContext.cpp
+++ b/src/compiler/translator/ParseContext.cpp
@@ -2935,6 +2935,7 @@
else
{
qualifier.location = intValue;
+ qualifier.locationsSpecified = 1;
}
}
else if (qualifierType == "local_size_x")