[Mesa-dev] [PATCH 16/21] mesa: GL_NV_blend_square is not optional

Ian Romanick idr at freedesktop.org
Thu Jun 27 18:20:29 PDT 2013


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

Every driver left in Mesa enables this extension all the time.  There's
no reason to let it be optional.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 src/mesa/drivers/dri/i915/intel_extensions.c   | 1 -
 src/mesa/drivers/dri/i965/intel_extensions.c   | 1 -
 src/mesa/drivers/dri/nouveau/nouveau_context.c | 1 -
 src/mesa/drivers/dri/r200/r200_context.c       | 1 -
 src/mesa/drivers/dri/radeon/radeon_context.c   | 1 -
 src/mesa/main/blend.c                          | 2 --
 src/mesa/main/extensions.c                     | 3 +--
 src/mesa/main/mtypes.h                         | 1 -
 src/mesa/state_tracker/st_extensions.c         | 1 -
 9 files changed, 1 insertion(+), 11 deletions(-)

diff --git a/src/mesa/drivers/dri/i915/intel_extensions.c b/src/mesa/drivers/dri/i915/intel_extensions.c
index ec557a7..e6241b5 100644
--- a/src/mesa/drivers/dri/i915/intel_extensions.c
+++ b/src/mesa/drivers/dri/i915/intel_extensions.c
@@ -78,7 +78,6 @@ intelInitExtensions(struct gl_context *ctx)
    ctx->Extensions.APPLE_object_purgeable = true;
    ctx->Extensions.MESA_pack_invert = true;
    ctx->Extensions.MESA_ycbcr_texture = true;
-   ctx->Extensions.NV_blend_square = true;
    ctx->Extensions.NV_texture_rectangle = true;
    ctx->Extensions.TDFX_texture_compression_FXT1 = true;
    ctx->Extensions.OES_EGL_image = true;
diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c
index 7188358..8c61867 100644
--- a/src/mesa/drivers/dri/i965/intel_extensions.c
+++ b/src/mesa/drivers/dri/i965/intel_extensions.c
@@ -118,7 +118,6 @@ intelInitExtensions(struct gl_context *ctx)
    ctx->Extensions.MESA_pack_invert = true;
    ctx->Extensions.MESA_texture_array = true;
    ctx->Extensions.MESA_ycbcr_texture = true;
-   ctx->Extensions.NV_blend_square = true;
    ctx->Extensions.NV_conditional_render = true;
    ctx->Extensions.NV_primitive_restart = true;
    ctx->Extensions.NV_texture_env_combine4 = true;
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c
index 8002d4f..eab1aa2 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_context.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c
@@ -201,7 +201,6 @@ nouveau_context_init(struct gl_context *ctx, struct nouveau_screen *screen,
 	ctx->Extensions.EXT_framebuffer_blit = true;
 	ctx->Extensions.EXT_packed_depth_stencil = true;
 	ctx->Extensions.EXT_texture_filter_anisotropic = true;
-	ctx->Extensions.NV_blend_square = true;
 	ctx->Extensions.NV_texture_env_combine4 = true;
 
 	return GL_TRUE;
diff --git a/src/mesa/drivers/dri/r200/r200_context.c b/src/mesa/drivers/dri/r200/r200_context.c
index 529ffd0..7730566 100644
--- a/src/mesa/drivers/dri/r200/r200_context.c
+++ b/src/mesa/drivers/dri/r200/r200_context.c
@@ -392,7 +392,6 @@ GLboolean r200CreateContext( gl_api api,
    ctx->Extensions.ATI_texture_env_combine3 = true;
    ctx->Extensions.ATI_texture_mirror_once = true;
    ctx->Extensions.MESA_pack_invert = true;
-   ctx->Extensions.NV_blend_square = true;
    ctx->Extensions.NV_texture_rectangle = true;
    ctx->Extensions.OES_EGL_image = true;
    ctx->Extensions.ARB_occlusion_query = true;
diff --git a/src/mesa/drivers/dri/radeon/radeon_context.c b/src/mesa/drivers/dri/radeon/radeon_context.c
index 077674c..d9f4841 100644
--- a/src/mesa/drivers/dri/radeon/radeon_context.c
+++ b/src/mesa/drivers/dri/radeon/radeon_context.c
@@ -351,7 +351,6 @@ r100CreateContext( gl_api api,
    ctx->Extensions.ATI_texture_env_combine3 = true;
    ctx->Extensions.ATI_texture_mirror_once = true;
    ctx->Extensions.MESA_ycbcr_texture = true;
-   ctx->Extensions.NV_blend_square = true;
    ctx->Extensions.OES_EGL_image = true;
    ctx->Extensions.ARB_texture_cube_map = true;
 
diff --git a/src/mesa/main/blend.c b/src/mesa/main/blend.c
index c97c207..9e11ca7 100644
--- a/src/mesa/main/blend.c
+++ b/src/mesa/main/blend.c
@@ -48,7 +48,6 @@ legal_src_factor(const struct gl_context *ctx, GLenum factor)
    switch (factor) {
    case GL_SRC_COLOR:
    case GL_ONE_MINUS_SRC_COLOR:
-      return ctx->Extensions.NV_blend_square;
    case GL_ZERO:
    case GL_ONE:
    case GL_DST_COLOR:
@@ -86,7 +85,6 @@ legal_dst_factor(const struct gl_context *ctx, GLenum factor)
    switch (factor) {
    case GL_DST_COLOR:
    case GL_ONE_MINUS_DST_COLOR:
-      return ctx->Extensions.NV_blend_square;
    case GL_ZERO:
    case GL_ONE:
    case GL_SRC_COLOR:
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index 20f3a76..100d437 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -311,7 +311,7 @@ static const struct extension extension_table[] = {
    { "GL_MESA_texture_signed_rgba",                o(EXT_texture_snorm),                       GL,             2009 },
    { "GL_MESA_window_pos",                         o(dummy_true),                              GLL,            2000 },
    { "GL_MESA_ycbcr_texture",                      o(MESA_ycbcr_texture),                      GL,             2002 },
-   { "GL_NV_blend_square",                         o(NV_blend_square),                         GLL,            1999 },
+   { "GL_NV_blend_square",                         o(dummy_true),                              GLL,            1999 },
    { "GL_NV_conditional_render",                   o(NV_conditional_render),                   GL,             2008 },
    { "GL_NV_depth_clamp",                          o(ARB_depth_clamp),                         GL,             2001 },
    { "GL_NV_draw_buffers",                         o(dummy_true),                                         ES2, 2011 },
@@ -443,7 +443,6 @@ _mesa_enable_sw_extensions(struct gl_context *ctx)
    ctx->Extensions.MESA_pack_invert = GL_TRUE;
    ctx->Extensions.MESA_texture_array = GL_TRUE;
    ctx->Extensions.MESA_ycbcr_texture = GL_TRUE;
-   ctx->Extensions.NV_blend_square = GL_TRUE;
    ctx->Extensions.NV_conditional_render = GL_TRUE;
    ctx->Extensions.NV_point_sprite = GL_TRUE;
    ctx->Extensions.NV_texture_env_combine4 = GL_TRUE;
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index e5ef801..34cffeb 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -3098,7 +3098,6 @@ struct gl_extensions
    GLboolean MESA_pack_invert;
    GLboolean MESA_ycbcr_texture;
    GLboolean MESA_texture_array;
-   GLboolean NV_blend_square;
    GLboolean NV_conditional_render;
    GLboolean NV_fog_distance;
    GLboolean NV_fragment_program_option;
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index 41bb18b..cc25ae4 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -564,7 +564,6 @@ void st_init_extensions(struct st_context *st)
 
    ctx->Extensions.MESA_pack_invert = GL_TRUE;
 
-   ctx->Extensions.NV_blend_square = GL_TRUE;
    ctx->Extensions.NV_fog_distance = GL_TRUE;
    ctx->Extensions.NV_texture_env_combine4 = GL_TRUE;
    ctx->Extensions.NV_texture_rectangle = GL_TRUE;
-- 
1.8.1.4



More information about the mesa-dev mailing list