summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2015-04-28 12:13:21 -0700
committerIan Romanick <ian.d.romanick@intel.com>2015-05-04 13:49:58 -0700
commit7038370bd166a8d6f4a24db05da70f713ef7ed37 (patch)
tree6ea01502603afe5be3f56e3d5bc85f0745b60cb0
parent7efc11e071a6f80611539a1c135cc2bd65a47f8c (diff)
downloadexternal_mesa3d-7038370bd166a8d6f4a24db05da70f713ef7ed37.zip
external_mesa3d-7038370bd166a8d6f4a24db05da70f713ef7ed37.tar.gz
external_mesa3d-7038370bd166a8d6f4a24db05da70f713ef7ed37.tar.bz2
glsl/es3.1: Allow 3.10 ES shaders in a GLES 3.1 context
Currently no 3.10 ES features (beyond 3.00 ES) are enabled. That will come later. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
-rw-r--r--src/glsl/glsl_parser_extras.cpp9
-rw-r--r--src/glsl/glsl_parser_extras.h2
2 files changed, 8 insertions, 3 deletions
diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp
index a8ba89e..9e2f19f 100644
--- a/src/glsl/glsl_parser_extras.cpp
+++ b/src/glsl/glsl_parser_extras.cpp
@@ -143,9 +143,9 @@ _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *_ctx,
this->num_user_structures = 0;
/* supported_versions should be large enough to support the known desktop
- * GLSL versions plus 2 GLES versions (ES2 & ES3)
+ * GLSL versions plus 3 GLES versions (ES 1.00, ES 3.00, and ES 3.10))
*/
- STATIC_ASSERT((ARRAY_SIZE(known_desktop_glsl_versions) + 2) ==
+ STATIC_ASSERT((ARRAY_SIZE(known_desktop_glsl_versions) + 3) ==
ARRAY_SIZE(this->supported_versions));
/* Populate the list of supported GLSL versions */
@@ -175,6 +175,11 @@ _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *_ctx,
this->supported_versions[this->num_supported_versions].es = true;
this->num_supported_versions++;
}
+ if (_mesa_is_gles31(ctx)) {
+ this->supported_versions[this->num_supported_versions].ver = 310;
+ this->supported_versions[this->num_supported_versions].es = true;
+ this->num_supported_versions++;
+ }
/* Create a string for use in error messages to tell the user which GLSL
* versions are supported.
diff --git a/src/glsl/glsl_parser_extras.h b/src/glsl/glsl_parser_extras.h
index 51f2bf5..5c0ee9b 100644
--- a/src/glsl/glsl_parser_extras.h
+++ b/src/glsl/glsl_parser_extras.h
@@ -229,7 +229,7 @@ struct _mesa_glsl_parse_state {
struct {
unsigned ver;
bool es;
- } supported_versions[14];
+ } supported_versions[15];
bool es_shader;
unsigned language_version;