glsl: add ability to use essl 3.20
authorIlia Mirkin <imirkin@alum.mit.edu>
Sun, 24 Apr 2016 17:15:59 +0000 (13:15 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Tue, 26 Apr 2016 03:40:54 +0000 (23:40 -0400)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/compiler/glsl/glsl_parser_extras.cpp
src/compiler/glsl/glsl_parser_extras.h
src/mesa/main/extensions_table.h
src/mesa/main/mtypes.h

index 76321aac92105b7a556d75f5c76f6fa13252b324..fb64350ed39c067bf4c023b8f809e781b87e3331 100644 (file)
@@ -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.
@@ -566,6 +572,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),
index c774fbea05a446f71fe77e8cfb06d6f64b1114e6..70183473b9e2f72801c890831afeeaf8f93d648f 100644 (file)
@@ -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;
index 78899ecccad848911b2ada56a635c6aa02dffcb3..a094ebe5f5d8725d18630a9db7cc5377f76f45d8 100644 (file)
@@ -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)
index e4a3036437eb07a8b58d6a8ca84e9e10efffb0cf..46b1543b56c752a4566c99588c4b58c5cebeb165 100644 (file)
@@ -3724,6 +3724,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;