mesa: Add extension tracking for GL_OES_shader_io_blocks
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 11 May 2016 20:05:22 +0000 (13:05 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Thu, 26 May 2016 23:24:25 +0000 (16:24 -0700)
v2: Also support GL_EXT_shader_io_blocks.  It's pretty much identical to
the OES extension.  Suggested by Ilia.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
src/compiler/glsl/glcpp/glcpp-parse.y
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 ee0d8f1942f09769b143b72994c9c0e17ee1a14c..402272796d07e795efb7cba7c61d822f950a0c30 100644 (file)
@@ -2329,6 +2329,11 @@ _glcpp_parser_handle_version_declaration(glcpp_parser_t *parser, intmax_t versio
                add_builtin_define(parser, "GL_EXT_texture_buffer", 1);
                add_builtin_define(parser, "GL_OES_texture_buffer", 1);
             }
+
+            if (extensions->OES_shader_io_blocks) {
+               add_builtin_define(parser, "GL_EXT_shader_io_blocks", 1);
+               add_builtin_define(parser, "GL_OES_shader_io_blocks", 1);
+            }
          }
       }
    } else {
index 1d9b4c56808f4186766f5a3fcf2c87738aa72986..916fca83e22180c0acefd5f255336915ed67dc5a 100644 (file)
@@ -626,6 +626,7 @@ static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = {
    EXT(OES_gpu_shader5,                false, true,      ARB_gpu_shader5),
    EXT(OES_sample_variables,           false, true,      OES_sample_variables),
    EXT(OES_shader_image_atomic,        false, true,      ARB_shader_image_load_store),
+   EXT(OES_shader_io_blocks,           false, true,      OES_shader_io_blocks),
    EXT(OES_shader_multisample_interpolation, false, true, OES_sample_variables),
    EXT(OES_standard_derivatives,       false, true,      OES_standard_derivatives),
    EXT(OES_texture_3D,                 false, true,      dummy_true),
@@ -645,6 +646,7 @@ static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = {
    EXT(EXT_gpu_shader5,                false, true,      ARB_gpu_shader5),
    EXT(EXT_separate_shader_objects,    false, true,      dummy_true),
    EXT(EXT_shader_integer_mix,         true,  true,      EXT_shader_integer_mix),
+   EXT(EXT_shader_io_blocks,           false, true,      OES_shader_io_blocks),
    EXT(EXT_shader_samples_identical,   true,  true,      EXT_shader_samples_identical),
    EXT(EXT_texture_array,              true,  false,     EXT_texture_array),
    EXT(EXT_texture_buffer,             false, true,      OES_texture_buffer),
index 0c8405d02fc474b3e0101631007d8c2d56802447..d70a31b32b53662f1662e99cfb545c24d2189740 100644 (file)
@@ -626,6 +626,8 @@ struct _mesa_glsl_parse_state {
    bool OES_sample_variables_warn;
    bool OES_shader_image_atomic_enable;
    bool OES_shader_image_atomic_warn;
+   bool OES_shader_io_blocks_enable;
+   bool OES_shader_io_blocks_warn;
    bool OES_shader_multisample_interpolation_enable;
    bool OES_shader_multisample_interpolation_warn;
    bool OES_standard_derivatives_enable;
@@ -661,6 +663,8 @@ struct _mesa_glsl_parse_state {
    bool EXT_separate_shader_objects_warn;
    bool EXT_shader_integer_mix_enable;
    bool EXT_shader_integer_mix_warn;
+   bool EXT_shader_io_blocks_enable;
+   bool EXT_shader_io_blocks_warn;
    bool EXT_shader_samples_identical_enable;
    bool EXT_shader_samples_identical_warn;
    bool EXT_texture_array_enable;
index e3c91ef427b4ed91229f89c1545dcd414e91d6a6..b715f7c4f368dd888709487cc4d4fa26128fbf89 100644 (file)
@@ -227,6 +227,7 @@ EXT(EXT_secondary_color                     , dummy_true
 EXT(EXT_separate_shader_objects             , dummy_true                             ,  x ,  x ,  x , ES2, 2013)
 EXT(EXT_separate_specular_color             , dummy_true                             , GLL,  x ,  x ,  x , 1997)
 EXT(EXT_shader_integer_mix                  , EXT_shader_integer_mix                 , GLL, GLC,  x ,  30, 2013)
+EXT(EXT_shader_io_blocks                    , OES_shader_io_blocks                   ,  x ,  x ,  x ,  31, 2014)
 EXT(EXT_shader_samples_identical            , EXT_shader_samples_identical           , GLL, GLC,  x ,  31, 2015)
 EXT(EXT_shadow_funcs                        , ARB_shadow                             , GLL,  x ,  x ,  x , 2002)
 EXT(EXT_stencil_two_side                    , EXT_stencil_two_side                   , GLL,  x ,  x ,  x , 2001)
@@ -345,6 +346,7 @@ EXT(OES_rgb8_rgba8                          , dummy_true
 EXT(OES_sample_shading                      , OES_sample_variables                   ,  x ,  x ,  x ,  30, 2014)
 EXT(OES_sample_variables                    , OES_sample_variables                   ,  x ,  x ,  x ,  30, 2014)
 EXT(OES_shader_image_atomic                 , ARB_shader_image_load_store            ,  x ,  x ,  x ,  31, 2015)
+EXT(OES_shader_io_blocks                    , OES_shader_io_blocks                   ,  x ,  x ,  x ,  31, 2014)
 EXT(OES_shader_multisample_interpolation    , OES_sample_variables                   ,  x ,  x ,  x ,  30, 2014)
 EXT(OES_single_precision                    , dummy_true                             ,  x ,  x , ES1,  x , 2003)
 EXT(OES_standard_derivatives                , OES_standard_derivatives               ,  x ,  x ,  x , ES2, 2005)
index e8ab195a91b25830d59a7aac207837ec24ba1db6..22335261fb43e882f43624567a3c018268cfc187 100644 (file)
@@ -3914,6 +3914,7 @@ struct gl_extensions
    GLboolean EXT_vertex_array_bgra;
    GLboolean OES_copy_image;
    GLboolean OES_sample_variables;
+   GLboolean OES_shader_io_blocks;
    GLboolean OES_standard_derivatives;
    GLboolean OES_texture_buffer;
    /* vendor extensions */