[Mesa-dev] [PATCH 6/7] mesa: Remove EXT_blend_subtract extension enable flag

Ian Romanick idr at freedesktop.org
Mon Sep 26 12:38:02 PDT 2011


From: Ian Romanick <ian.d.romanick at intel.com>

All drivers remaining in Mesa support this extension.  This extension
is either required or optional features in desktop OpenGL, OpenGL ES
1.x, and OpenGL ES 2.x.

This extension was previously not supported on i810, mach64, mga,
savage, sis, and tdfx (Voodoo Banshee and Voodoo3).

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 src/mesa/drivers/dri/intel/intel_extensions.c    |    1 -
 src/mesa/drivers/dri/intel/intel_extensions_es.c |    1 -
 src/mesa/drivers/dri/nouveau/nouveau_context.c   |    1 -
 src/mesa/drivers/dri/r200/r200_context.c         |    1 -
 src/mesa/drivers/dri/r300/r300_context.c         |    1 -
 src/mesa/drivers/dri/r600/r600_context.c         |    1 -
 src/mesa/drivers/dri/radeon/radeon_context.c     |    1 -
 src/mesa/drivers/dri/swrast/swrast.c             |    1 -
 src/mesa/main/blend.c                            |    5 ++---
 src/mesa/main/extensions.c                       |    6 ++----
 src/mesa/main/mtypes.h                           |    1 -
 src/mesa/main/version.c                          |    2 --
 src/mesa/state_tracker/st_extensions.c           |    1 -
 13 files changed, 4 insertions(+), 19 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_extensions.c b/src/mesa/drivers/dri/intel/intel_extensions.c
index f797605..ba508d7 100644
--- a/src/mesa/drivers/dri/intel/intel_extensions.c
+++ b/src/mesa/drivers/dri/intel/intel_extensions.c
@@ -80,7 +80,6 @@ intelInitExtensions(struct gl_context *ctx)
    ctx->Extensions.EXT_blend_equation_separate = true;
    ctx->Extensions.EXT_blend_func_separate = true;
    ctx->Extensions.EXT_blend_minmax = true;
-   ctx->Extensions.EXT_blend_subtract = true;
    ctx->Extensions.EXT_framebuffer_blit = true;
    ctx->Extensions.EXT_framebuffer_object = true;
    ctx->Extensions.EXT_framebuffer_multisample = true;
diff --git a/src/mesa/drivers/dri/intel/intel_extensions_es.c b/src/mesa/drivers/dri/intel/intel_extensions_es.c
index 4e68d7e..4da75a1 100644
--- a/src/mesa/drivers/dri/intel/intel_extensions_es.c
+++ b/src/mesa/drivers/dri/intel/intel_extensions_es.c
@@ -89,7 +89,6 @@ static const char *es2_extensions[] = {
    "GL_EXT_blend_color",
    "GL_EXT_blend_equation_separate",
    "GL_EXT_blend_minmax",
-   "GL_EXT_blend_subtract",
    "GL_NV_blend_square",
 
    /* Optional GLES2 */
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c
index db80e44..0f2fab3 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_context.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c
@@ -120,7 +120,6 @@ nouveau_context_init(struct gl_context *ctx, struct nouveau_screen *screen,
 	ctx->Extensions.ARB_texture_mirrored_repeat = true;
 	ctx->Extensions.EXT_blend_color = true;
 	ctx->Extensions.EXT_blend_minmax = true;
-	ctx->Extensions.EXT_blend_subtract = true;
 	ctx->Extensions.EXT_fog_coord = true;
 	ctx->Extensions.EXT_framebuffer_blit = true;
 	ctx->Extensions.EXT_framebuffer_object = true;
diff --git a/src/mesa/drivers/dri/r200/r200_context.c b/src/mesa/drivers/dri/r200/r200_context.c
index dc1946f..35e1c20 100644
--- a/src/mesa/drivers/dri/r200/r200_context.c
+++ b/src/mesa/drivers/dri/r200/r200_context.c
@@ -365,7 +365,6 @@ GLboolean r200CreateContext( gl_api api,
    ctx->Extensions.EXT_blend_color =
       rmesa->radeon.radeonScreen->drmSupportsBlendColor;
    ctx->Extensions.EXT_blend_minmax = true;
-   ctx->Extensions.EXT_blend_subtract = true;
    ctx->Extensions.EXT_fog_coord = true;
    ctx->Extensions.EXT_packed_depth_stencil = true;
    ctx->Extensions.EXT_secondary_color = true;
diff --git a/src/mesa/drivers/dri/r300/r300_context.c b/src/mesa/drivers/dri/r300/r300_context.c
index 94a255a..74de16f 100644
--- a/src/mesa/drivers/dri/r300/r300_context.c
+++ b/src/mesa/drivers/dri/r300/r300_context.c
@@ -378,7 +378,6 @@ static void r300InitGLExtensions(struct gl_context *ctx)
 	ctx->Extensions.EXT_blend_equation_separate = true;
 	ctx->Extensions.EXT_blend_func_separate = true;
 	ctx->Extensions.EXT_blend_minmax = true;
-	ctx->Extensions.EXT_blend_subtract = true;
 	ctx->Extensions.EXT_fog_coord = true;
 	ctx->Extensions.EXT_gpu_program_parameters = true;
 	ctx->Extensions.EXT_point_parameters = true;
diff --git a/src/mesa/drivers/dri/r600/r600_context.c b/src/mesa/drivers/dri/r600/r600_context.c
index 6fcad94..1da53ef 100644
--- a/src/mesa/drivers/dri/r600/r600_context.c
+++ b/src/mesa/drivers/dri/r600/r600_context.c
@@ -275,7 +275,6 @@ static void r600InitGLExtensions(struct gl_context *ctx)
 	ctx->Extensions.EXT_blend_equation_separate = true;
 	ctx->Extensions.EXT_blend_func_separate = true;
 	ctx->Extensions.EXT_blend_minmax = true;
-	ctx->Extensions.EXT_blend_subtract = true;
 	ctx->Extensions.EXT_packed_depth_stencil = true;
 	ctx->Extensions.EXT_fog_coord = true;
 	ctx->Extensions.EXT_gpu_program_parameters = true;
diff --git a/src/mesa/drivers/dri/radeon/radeon_context.c b/src/mesa/drivers/dri/radeon/radeon_context.c
index 2750e83..7a2a5e8 100644
--- a/src/mesa/drivers/dri/radeon/radeon_context.c
+++ b/src/mesa/drivers/dri/radeon/radeon_context.c
@@ -318,7 +318,6 @@ r100CreateContext( gl_api api,
    ctx->Extensions.ARB_texture_env_crossbar = true;
    ctx->Extensions.ARB_texture_env_dot3 = true;
    ctx->Extensions.ARB_texture_mirrored_repeat = true;
-   ctx->Extensions.EXT_blend_subtract = true;
    ctx->Extensions.EXT_fog_coord = true;
    ctx->Extensions.EXT_packed_depth_stencil = true;
    ctx->Extensions.EXT_secondary_color = true;
diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c
index b76cd26..ce6fada 100644
--- a/src/mesa/drivers/dri/swrast/swrast.c
+++ b/src/mesa/drivers/dri/swrast/swrast.c
@@ -598,7 +598,6 @@ static const char *es2_extensions[] = {
    "GL_EXT_blend_color",
    "GL_EXT_blend_equation_separate",
    "GL_EXT_blend_minmax",
-   "GL_EXT_blend_subtract",
 
    /* Optional GLES2 */
    "GL_ARB_framebuffer_object",
diff --git a/src/mesa/main/blend.c b/src/mesa/main/blend.c
index 98c14f5..09acdf5 100644
--- a/src/mesa/main/blend.c
+++ b/src/mesa/main/blend.c
@@ -289,13 +289,12 @@ legal_blend_equation(const struct gl_context *ctx, GLenum mode)
 {
    switch (mode) {
    case GL_FUNC_ADD:
+   case GL_FUNC_SUBTRACT:
+   case GL_FUNC_REVERSE_SUBTRACT:
       return GL_TRUE;
    case GL_MIN:
    case GL_MAX:
       return ctx->Extensions.EXT_blend_minmax;
-   case GL_FUNC_SUBTRACT:
-   case GL_FUNC_REVERSE_SUBTRACT:
-      return ctx->Extensions.EXT_blend_subtract;
    default:
       return GL_FALSE;
    }
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index 0901b2d..3df8c76 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -152,7 +152,7 @@ static const struct extension extension_table[] = {
    { "GL_EXT_blend_equation_separate",             o(EXT_blend_equation_separate),             GL,             2003 },
    { "GL_EXT_blend_func_separate",                 o(EXT_blend_func_separate),                 GL,             1999 },
    { "GL_EXT_blend_minmax",                        o(EXT_blend_minmax),                        GL | ES1 | ES2, 1995 },
-   { "GL_EXT_blend_subtract",                      o(EXT_blend_subtract),                      GL,             1995 },
+   { "GL_EXT_blend_subtract",                      o(dummy_true),                              GL,             1995 },
    { "GL_EXT_clip_volume_hint",                    o(EXT_clip_volume_hint),                    GL,             1996 },
    { "GL_EXT_compiled_vertex_array",               o(EXT_compiled_vertex_array),               GL,             1996 },
    { "GL_EXT_copy_texture",                        o(dummy_true),                              GL,             1995 },
@@ -216,7 +216,7 @@ static const struct extension extension_table[] = {
    /* OES extensions */
    { "GL_OES_blend_equation_separate",             o(EXT_blend_equation_separate),                  ES1,       2009 },
    { "GL_OES_blend_func_separate",                 o(EXT_blend_func_separate),                      ES1,       2009 },
-   { "GL_OES_blend_subtract",                      o(EXT_blend_subtract),                           ES1,       2009 },
+   { "GL_OES_blend_subtract",                      o(dummy_true),                                   ES1,       2009 },
    { "GL_OES_byte_coordinates",                    o(dummy_true),                                   ES1,       2002 },
    { "GL_OES_compressed_paletted_texture",         o(dummy_true),                                   ES1,       2003 },
    { "GL_OES_depth24",                             o(EXT_framebuffer_object),                       ES1 | ES2, 2005 },
@@ -448,7 +448,6 @@ _mesa_enable_sw_extensions(struct gl_context *ctx)
    ctx->Extensions.EXT_blend_equation_separate = GL_TRUE;
    ctx->Extensions.EXT_blend_func_separate = GL_TRUE;
    ctx->Extensions.EXT_blend_minmax = GL_TRUE;
-   ctx->Extensions.EXT_blend_subtract = GL_TRUE;
    ctx->Extensions.EXT_depth_bounds_test = GL_TRUE;
    ctx->Extensions.EXT_draw_buffers2 = GL_TRUE;
    ctx->Extensions.EXT_fog_coord = GL_TRUE;
@@ -553,7 +552,6 @@ _mesa_enable_1_4_extensions(struct gl_context *ctx)
    ctx->Extensions.EXT_blend_color = GL_TRUE;
    ctx->Extensions.EXT_blend_func_separate = GL_TRUE;
    ctx->Extensions.EXT_blend_minmax = GL_TRUE;
-   ctx->Extensions.EXT_blend_subtract = GL_TRUE;
    ctx->Extensions.EXT_fog_coord = GL_TRUE;
    ctx->Extensions.EXT_point_parameters = GL_TRUE;
    ctx->Extensions.EXT_secondary_color = GL_TRUE;
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 91cbaed..63fd63d 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2804,7 +2804,6 @@ struct gl_extensions
    GLboolean EXT_blend_equation_separate;
    GLboolean EXT_blend_func_separate;
    GLboolean EXT_blend_minmax;
-   GLboolean EXT_blend_subtract;
    GLboolean EXT_clip_volume_hint;
    GLboolean EXT_compiled_vertex_array;
    GLboolean EXT_depth_bounds_test;
diff --git a/src/mesa/main/version.c b/src/mesa/main/version.c
index 5f12f80..737f66a 100644
--- a/src/mesa/main/version.c
+++ b/src/mesa/main/version.c
@@ -52,7 +52,6 @@ compute_version(struct gl_context *ctx)
                               ctx->Extensions.EXT_blend_color &&
                               ctx->Extensions.EXT_blend_func_separate &&
                               ctx->Extensions.EXT_blend_minmax &&
-                              ctx->Extensions.EXT_blend_subtract &&
                               ctx->Extensions.EXT_fog_coord &&
                               ctx->Extensions.EXT_point_parameters &&
                               ctx->Extensions.EXT_secondary_color);
@@ -227,7 +226,6 @@ compute_version_es2(struct gl_context *ctx)
                               ctx->Extensions.EXT_blend_color &&
                               ctx->Extensions.EXT_blend_func_separate &&
                               ctx->Extensions.EXT_blend_minmax &&
-                              ctx->Extensions.EXT_blend_subtract &&
                               ctx->Extensions.ARB_shader_objects &&
                               ctx->Extensions.ARB_vertex_shader &&
                               ctx->Extensions.ARB_fragment_shader &&
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index e92541f..6c3820b 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -265,7 +265,6 @@ void st_init_extensions(struct st_context *st)
    ctx->Extensions.EXT_blend_color = GL_TRUE;
    ctx->Extensions.EXT_blend_func_separate = GL_TRUE;
    ctx->Extensions.EXT_blend_minmax = GL_TRUE;
-   ctx->Extensions.EXT_blend_subtract = GL_TRUE;
    ctx->Extensions.EXT_framebuffer_blit = GL_TRUE;
    ctx->Extensions.EXT_framebuffer_object = GL_TRUE;
    ctx->Extensions.EXT_framebuffer_multisample = GL_TRUE;
-- 
1.7.6



More information about the mesa-dev mailing list