[Mesa-dev] [PATCH 2/2] glsl: add ability to use essl 3.20
Ilia Mirkin
imirkin at alum.mit.edu
Sun Apr 24 17:35:01 UTC 2016
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
src/compiler/glsl/glsl_parser_extras.cpp | 7 +++++++
src/compiler/glsl/glsl_parser_extras.h | 2 ++
src/mesa/main/extensions_table.h | 1 +
src/mesa/main/mtypes.h | 1 +
4 files changed, 11 insertions(+)
diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp
index f097469..fea378f 100644
--- a/src/compiler/glsl/glsl_parser_extras.cpp
+++ b/src/compiler/glsl/glsl_parser_extras.cpp
@@ -231,6 +231,12 @@ _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 ((ctx->API == API_OPENGLES2 && ctx->Version >= 32) ||
+ ctx->Extensions.ARB_ES3_2_compatibility) {
+ this->supported_versions[this->num_supported_versions].ver = 320;
+ 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.
@@ -567,6 +573,7 @@ static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = {
/* ARB extensions go here, sorted alphabetically.
*/
EXT(ARB_ES3_1_compatibility, true, false, ARB_ES3_1_compatibility),
+ EXT(ARB_ES3_2_compatibility, true, false, ARB_ES3_2_compatibility),
EXT(ARB_arrays_of_arrays, true, false, ARB_arrays_of_arrays),
EXT(ARB_compute_shader, true, false, ARB_compute_shader),
EXT(ARB_conservative_depth, true, false, ARB_conservative_depth),
diff --git a/src/compiler/glsl/glsl_parser_extras.h b/src/compiler/glsl/glsl_parser_extras.h
index 7d63d5b..d424b5f 100644
--- a/src/compiler/glsl/glsl_parser_extras.h
+++ b/src/compiler/glsl/glsl_parser_extras.h
@@ -512,6 +512,8 @@ struct _mesa_glsl_parse_state {
*/
bool ARB_ES3_1_compatibility_enable;
bool ARB_ES3_1_compatibility_warn;
+ bool ARB_ES3_2_compatibility_enable;
+ bool ARB_ES3_2_compatibility_warn;
bool ARB_arrays_of_arrays_enable;
bool ARB_arrays_of_arrays_warn;
bool ARB_compute_shader_enable;
diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h
index 4769e37..13bcc2e 100644
--- a/src/mesa/main/extensions_table.h
+++ b/src/mesa/main/extensions_table.h
@@ -28,6 +28,7 @@ EXT(APPLE_vertex_array_object , dummy_true
EXT(ARB_ES2_compatibility , ARB_ES2_compatibility , GLL, GLC, x , x , 2009)
EXT(ARB_ES3_1_compatibility , ARB_ES3_1_compatibility , x , GLC, x , x , 2014)
+EXT(ARB_ES3_2_compatibility , ARB_ES3_2_compatibility , x , GLC, x , x , 2015)
EXT(ARB_ES3_compatibility , ARB_ES3_compatibility , GLL, GLC, x , x , 2012)
EXT(ARB_arrays_of_arrays , ARB_arrays_of_arrays , GLL, GLC, x , x , 2012)
EXT(ARB_base_instance , ARB_base_instance , GLL, GLC, x , x , 2011)
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index ccc8610..2b35c79 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -3729,6 +3729,7 @@ struct gl_extensions
GLboolean ARB_ES2_compatibility;
GLboolean ARB_ES3_compatibility;
GLboolean ARB_ES3_1_compatibility;
+ GLboolean ARB_ES3_2_compatibility;
GLboolean ARB_arrays_of_arrays;
GLboolean ARB_base_instance;
GLboolean ARB_blend_func_extended;
--
2.7.3
More information about the mesa-dev
mailing list