Proper support for fragment output variables for GLSL ES shader version 300.
TRAC #22704
Signed-off-by: Geoff Lang
Signed-off-by: Nicolas Capens
Authored-by: Jamie Madill
diff --git a/src/compiler/ParseHelper.cpp b/src/compiler/ParseHelper.cpp
index 31af70d..e49ae7c 100644
--- a/src/compiler/ParseHelper.cpp
+++ b/src/compiler/ParseHelper.cpp
@@ -2028,6 +2028,11 @@
error(location, "", "[", "array indexes for interface blocks arrays must be constant integeral expressions");
recover();
}
+ else if (baseExpression->getQualifier() == EvqFragmentOutput)
+ {
+ error(location, "", "[", "array indexes for output variables must be constant integeral expressions");
+ recover();
+ }
indexedExpression = intermediate.addIndex(EOpIndexIndirect, baseExpression, indexExpression, location);
}