[Mesa-dev] [RFC 19/21] mesa: Replace gl_extensions::EXT_texture3D with ::dummy_true

Nanley Chery nanleychery at gmail.com
Mon Oct 19 15:44:57 PDT 2015


From: Nanley Chery <nanley.g.chery at intel.com>

Mesa unconditionally sets this driver flag to true in
_mesa_init_extensions(). There is therefore no need for
the driver to communicate support for this extension.
Replace the driver capability flag with ::dummy_true.

Signed-off-by: Nanley Chery <nanley.g.chery at intel.com>
---
 src/glsl/glsl_parser_extras.cpp     | 2 +-
 src/glsl/standalone_scaffolding.cpp | 1 -
 src/mesa/main/extensions.c          | 2 --
 src/mesa/main/extensions_table.h    | 4 ++--
 src/mesa/main/mtypes.h              | 1 -
 5 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp
index b521c5f..d3d6417 100644
--- a/src/glsl/glsl_parser_extras.cpp
+++ b/src/glsl/glsl_parser_extras.cpp
@@ -632,7 +632,7 @@ static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = {
     */
    EXT(OES_EGL_image_external,         false, true,      OES_EGL_image_external),
    EXT(OES_standard_derivatives,       false, true,      OES_standard_derivatives),
-   EXT(OES_texture_3D,                 false, true,      EXT_texture3D),
+   EXT(OES_texture_3D,                 false, true,      dummy_true),
    EXT(OES_texture_storage_multisample_2d_array, false, true, ARB_texture_multisample),
 
    /* All other extensions go here, sorted alphabetically.
diff --git a/src/glsl/standalone_scaffolding.cpp b/src/glsl/standalone_scaffolding.cpp
index eccf094..03cd90e 100644
--- a/src/glsl/standalone_scaffolding.cpp
+++ b/src/glsl/standalone_scaffolding.cpp
@@ -167,7 +167,6 @@ void initialize_context_to_defaults(struct gl_context *ctx, gl_api api)
    ctx->Extensions.OES_standard_derivatives = true;
 
    ctx->Extensions.EXT_shader_integer_mix = true;
-   ctx->Extensions.EXT_texture3D = true;
    ctx->Extensions.EXT_texture_array = true;
 
    ctx->Extensions.NV_texture_rectangle = true;
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index 6cd2b27..7373928 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -369,9 +369,7 @@ _mesa_one_time_init_extension_overrides(void)
 void
 _mesa_init_extensions(struct gl_extensions *extensions)
 {
-   /* Selectively turn default extensions on. */
    extensions->dummy_true = GL_TRUE;
-   extensions->EXT_texture3D = GL_TRUE;
 }
 
 
diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h
index 760fbe9..51eb129 100644
--- a/src/mesa/main/extensions_table.h
+++ b/src/mesa/main/extensions_table.h
@@ -177,7 +177,7 @@ EXT(EXT_shadow_funcs                        , ARB_shadow
 EXT(EXT_stencil_two_side                    , EXT_stencil_two_side                   , GLL,  x ,  x ,  x , 2001)
 EXT(EXT_stencil_wrap                        , dummy_true                             , GLL,  x ,  x ,  x , 2002)
 EXT(EXT_subtexture                          , dummy_true                             , GLL,  x ,  x ,  x , 1995)
-EXT(EXT_texture3D                           , EXT_texture3D                          , GLL,  x ,  x ,  x , 1996)
+EXT(EXT_texture3D                           , dummy_true                             , GLL,  x ,  x ,  x , 1996)
 EXT(EXT_texture_array                       , EXT_texture_array                      , GLL, GLC,  x ,  x , 2006)
 EXT(EXT_texture_compression_dxt1            , ANGLE_texture_compression_dxt          , GLL, GLC, ES1, ES2, 2004)
 EXT(ANGLE_texture_compression_dxt3          , ANGLE_texture_compression_dxt          , GLL, GLC, ES1, ES2, 2011)
@@ -247,7 +247,7 @@ EXT(OES_stencil4                            , dummy_false
 EXT(OES_stencil8                            , dummy_true                             ,  x ,  x , ES1, ES2, 2005)
 EXT(OES_stencil_wrap                        , dummy_true                             ,  x ,  x , ES1,  x , 2002)
 EXT(OES_surfaceless_context                 , dummy_true                             ,  x ,  x , ES1, ES2, 2012)
-EXT(OES_texture_3D                          , EXT_texture3D                          ,  x ,  x ,  x , ES2, 2005)
+EXT(OES_texture_3D                          , dummy_true                             ,  x ,  x ,  x , ES2, 2005)
 EXT(OES_texture_cube_map                    , ARB_texture_cube_map                   ,  x ,  x , ES1,  x , 2007)
 EXT(OES_texture_env_crossbar                , ARB_texture_env_crossbar               ,  x ,  x , ES1,  x , 2005)
 EXT(OES_texture_float                       , OES_texture_float                      ,  x ,  x ,  x , ES2, 2005)
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index a67c5c0..a89d6d1 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -3766,7 +3766,6 @@ struct gl_extensions
    GLboolean EXT_provoking_vertex;
    GLboolean EXT_shader_integer_mix;
    GLboolean EXT_stencil_two_side;
-   GLboolean EXT_texture3D;
    GLboolean EXT_texture_array;
    GLboolean EXT_texture_compression_latc;
    GLboolean EXT_texture_compression_s3tc;
-- 
2.6.1



More information about the mesa-dev mailing list