Expand ShShaderOutput for different GLSL versions
BUG=angleproject:968
Change-Id: I2d4c0a8e9a91a940922da4501c22124da0c0399c
Reviewed-on: https://chromium-review.googlesource.com/264840
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/compiler/translator/VersionGLSL.cpp b/src/compiler/translator/VersionGLSL.cpp
index f6f5688..99bcf07 100644
--- a/src/compiler/translator/VersionGLSL.cpp
+++ b/src/compiler/translator/VersionGLSL.cpp
@@ -8,7 +8,9 @@
static const int GLSL_VERSION_110 = 110;
static const int GLSL_VERSION_120 = 120;
-static const int GLSL_VERSION_150 = 150;
+static const int GLSL_VERSION_130 = 130;
+static const int GLSL_VERSION_410 = 410;
+static const int GLSL_VERSION_420 = 420;
// We need to scan for the following:
// 1. "invariant" keyword: This can occur in both - vertex and fragment shaders
@@ -31,9 +33,17 @@
const TPragma &pragma,
ShShaderOutput output)
{
- if (output == SH_GLSL_CORE_OUTPUT)
+ if (output == SH_GLSL_130_OUTPUT)
{
- mVersion = GLSL_VERSION_150;
+ mVersion = GLSL_VERSION_130;
+ }
+ else if (output == SH_GLSL_410_CORE_OUTPUT)
+ {
+ mVersion = GLSL_VERSION_410;
+ }
+ else if (output == SH_GLSL_420_CORE_OUTPUT)
+ {
+ mVersion = GLSL_VERSION_420;
}
else
{