mesa: Remove the non-required ARB_imaging extension.
authorEric Anholt <eric@anholt.net>
Thu, 9 Sep 2010 22:53:55 +0000 (15:53 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 23 Sep 2010 20:25:45 +0000 (13:25 -0700)
Many of the EXT_ extensions in the subset have significant code
overhead with no users.  It is not a required part of GL -- though
text describing the extension is part of the core spec since 1.2, it
is always conditional on the ARB_imaging extension.

src/mesa/main/blend.c
src/mesa/main/extensions.c
src/mesa/main/get.c
src/mesa/main/histogram.c
src/mesa/main/mtypes.h
src/mesa/state_tracker/st_cb_texture.c

index d022770f24c9a3405c33a50967bfdfc755b8a867..736a94c052a5b7f3f626677fe5e95cceb7ff7eb8 100644 (file)
@@ -215,8 +215,7 @@ _mesa_validate_blend_equation( GLcontext *ctx,
          break;
       case GL_MIN:
       case GL_MAX:
-         if (!ctx->Extensions.EXT_blend_minmax &&
-             !ctx->Extensions.ARB_imaging) {
+         if (!ctx->Extensions.EXT_blend_minmax) {
             return GL_FALSE;
          }
          break;
@@ -229,8 +228,7 @@ _mesa_validate_blend_equation( GLcontext *ctx,
          break;
       case GL_FUNC_SUBTRACT:
       case GL_FUNC_REVERSE_SUBTRACT:
-         if (!ctx->Extensions.EXT_blend_subtract &&
-             !ctx->Extensions.ARB_imaging) {
+         if (!ctx->Extensions.EXT_blend_subtract) {
             return GL_FALSE;
          }
          break;
index 080fa98dfc6b4d3328fb494152fb20a308f0ec87..b6500b9c4e60e933beffe8c705c2044c55b55017 100644 (file)
@@ -62,7 +62,6 @@ static const struct {
    /* { OFF, "GL_ARB_geometry_shader4",           F(ARB_geometry_shader4) }, */
    { OFF, "GL_ARB_half_float_pixel",           F(ARB_half_float_pixel) },
    { OFF, "GL_ARB_half_float_vertex",          F(ARB_half_float_vertex) },
-   { OFF, "GL_ARB_imaging",                    F(ARB_imaging) },
    { OFF, "GL_ARB_instanced_arrays",           F(ARB_instanced_arrays) },
    { OFF, "GL_ARB_map_buffer_range",           F(ARB_map_buffer_range) },
    { ON,  "GL_ARB_multisample",                F(ARB_multisample) },
@@ -255,7 +254,6 @@ _mesa_enable_sw_extensions(GLcontext *ctx)
 #endif
    ctx->Extensions.ARB_half_float_pixel = GL_TRUE;
    ctx->Extensions.ARB_half_float_vertex = GL_TRUE;
-   ctx->Extensions.ARB_imaging = GL_TRUE;
    ctx->Extensions.ARB_map_buffer_range = GL_TRUE;
    ctx->Extensions.ARB_multitexture = GL_TRUE;
 #if FEATURE_queryobj
@@ -392,12 +390,11 @@ _mesa_enable_sw_extensions(GLcontext *ctx)
 
 
 /**
- * Enable GL_ARB_imaging and all the EXT extensions that are subsets of it.
+ * Enable common EXT extensions in the ARB_imaging subset.
  */
 void
 _mesa_enable_imaging_extensions(GLcontext *ctx)
 {
-   ctx->Extensions.ARB_imaging = GL_TRUE;
    ctx->Extensions.EXT_blend_color = GL_TRUE;
    ctx->Extensions.EXT_blend_logic_op = GL_TRUE;
    ctx->Extensions.EXT_blend_minmax = GL_TRUE;
index 2062134a390639f663742988cf58d08269681fac..a840663f6afe1ea2352ee533781a5994bc196806 100644 (file)
@@ -938,12 +938,12 @@ static const struct value_desc values[] = {
      CONTEXT_FLOAT(Pixel.PostConvolutionBias[3]),
      extra_EXT_convolution },
 
-   /* GL_EXT_histogram / GL_ARB_imaging */
+   /* GL_EXT_histogram */
    { GL_HISTOGRAM, CONTEXT_BOOL(Pixel.HistogramEnabled),
      extra_EXT_histogram },
    { GL_MINMAX, CONTEXT_BOOL(Pixel.MinMaxEnabled), extra_EXT_histogram },
 
-   /* GL_SGI_color_table / GL_ARB_imaging */
+   /* GL_SGI_color_table */
    { GL_COLOR_TABLE_SGI,
      CONTEXT_BOOL(Pixel.ColorTableEnabled[COLORTABLE_PRECONVOLUTION]),
      extra_SGI_color_table },
index 4e482bcd54bca6d83a5def82e1b79df6a209d114..db3cbfc5a90763095e63e2133abdfb4685c5b423 100644 (file)
@@ -629,7 +629,7 @@ _mesa_GetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvo
    GET_CURRENT_CONTEXT(ctx);
    ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
 
-   if (!ctx->Extensions.EXT_histogram && !ctx->Extensions.ARB_imaging) {
+   if (!ctx->Extensions.EXT_histogram) {
       _mesa_error(ctx, GL_INVALID_OPERATION, "glGetMinmax");
       return;
    }
@@ -692,7 +692,7 @@ _mesa_GetHistogram(GLenum target, GLboolean reset, GLenum format, GLenum type, G
    GET_CURRENT_CONTEXT(ctx);
    ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
 
-   if (!ctx->Extensions.EXT_histogram && !ctx->Extensions.ARB_imaging) {
+   if (!ctx->Extensions.EXT_histogram) {
       _mesa_error(ctx, GL_INVALID_OPERATION, "glGetHistogram");
       return;
    }
@@ -752,7 +752,7 @@ _mesa_GetHistogramParameterfv(GLenum target, GLenum pname, GLfloat *params)
    GET_CURRENT_CONTEXT(ctx);
    ASSERT_OUTSIDE_BEGIN_END(ctx);
 
-   if (!ctx->Extensions.EXT_histogram && !ctx->Extensions.ARB_imaging) {
+   if (!ctx->Extensions.EXT_histogram) {
       _mesa_error(ctx, GL_INVALID_OPERATION, "glGetHistogramParameterfv");
       return;
    }
@@ -799,7 +799,7 @@ _mesa_GetHistogramParameteriv(GLenum target, GLenum pname, GLint *params)
    GET_CURRENT_CONTEXT(ctx);
    ASSERT_OUTSIDE_BEGIN_END(ctx);
 
-   if (!ctx->Extensions.EXT_histogram && !ctx->Extensions.ARB_imaging) {
+   if (!ctx->Extensions.EXT_histogram) {
       _mesa_error(ctx, GL_INVALID_OPERATION, "glGetHistogramParameteriv");
       return;
    }
@@ -846,7 +846,7 @@ _mesa_GetMinmaxParameterfv(GLenum target, GLenum pname, GLfloat *params)
    GET_CURRENT_CONTEXT(ctx);
    ASSERT_OUTSIDE_BEGIN_END(ctx);
 
-   if (!ctx->Extensions.EXT_histogram && !ctx->Extensions.ARB_imaging) {
+   if (!ctx->Extensions.EXT_histogram) {
       _mesa_error(ctx, GL_INVALID_OPERATION, "glGetMinmaxParameterfv");
       return;
    }
@@ -872,7 +872,7 @@ _mesa_GetMinmaxParameteriv(GLenum target, GLenum pname, GLint *params)
    GET_CURRENT_CONTEXT(ctx);
    ASSERT_OUTSIDE_BEGIN_END(ctx);
 
-   if (!ctx->Extensions.EXT_histogram && !ctx->Extensions.ARB_imaging) {
+   if (!ctx->Extensions.EXT_histogram) {
       _mesa_error(ctx, GL_INVALID_OPERATION, "glGetMinmaxParameteriv");
       return;
    }
@@ -900,7 +900,7 @@ _mesa_Histogram(GLenum target, GLsizei width, GLenum internalFormat, GLboolean s
    GET_CURRENT_CONTEXT(ctx);
    ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); /* sideeffects */
 
-   if (!ctx->Extensions.EXT_histogram && !ctx->Extensions.ARB_imaging) {
+   if (!ctx->Extensions.EXT_histogram) {
       _mesa_error(ctx, GL_INVALID_OPERATION, "glHistogram");
       return;
    }
@@ -981,7 +981,7 @@ _mesa_Minmax(GLenum target, GLenum internalFormat, GLboolean sink)
    GET_CURRENT_CONTEXT(ctx);
    ASSERT_OUTSIDE_BEGIN_END(ctx);
 
-   if (!ctx->Extensions.EXT_histogram && !ctx->Extensions.ARB_imaging) {
+   if (!ctx->Extensions.EXT_histogram) {
       _mesa_error(ctx, GL_INVALID_OPERATION, "glMinmax");
       return;
    }
@@ -1010,7 +1010,7 @@ _mesa_ResetHistogram(GLenum target)
    GET_CURRENT_CONTEXT(ctx);
    ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); /* sideeffects */
 
-   if (!ctx->Extensions.EXT_histogram && !ctx->Extensions.ARB_imaging) {
+   if (!ctx->Extensions.EXT_histogram) {
       _mesa_error(ctx, GL_INVALID_OPERATION, "glResetHistogram");
       return;
    }
@@ -1035,7 +1035,7 @@ _mesa_ResetMinmax(GLenum target)
    GET_CURRENT_CONTEXT(ctx);
    ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
 
-   if (!ctx->Extensions.EXT_histogram && !ctx->Extensions.ARB_imaging) {
+   if (!ctx->Extensions.EXT_histogram) {
       _mesa_error(ctx, GL_INVALID_OPERATION, "glResetMinmax");
       return;
    }
index 5494be8f4231615623d587d3addd76ff4ab544ee..0bb8734e4bfeec752406ac3142e93378c7862e2c 100644 (file)
@@ -2658,7 +2658,6 @@ struct gl_extensions
    GLboolean ARB_geometry_shader4;
    GLboolean ARB_half_float_pixel;
    GLboolean ARB_half_float_vertex;
-   GLboolean ARB_imaging;
    GLboolean ARB_instanced_arrays;
    GLboolean ARB_map_buffer_range;
    GLboolean ARB_multisample;
index cd5001475c919bfd4e4011bee61fa58c448c3c0f..0a4f8508ec2f3fa7ed1c8610718261a330d2aaa2 100644 (file)
@@ -548,7 +548,6 @@ st_TexImage(GLcontext * ctx,
    /* The Mesa/Gallium state tracker does not implement the imaging extensions
     * such as convolution.
     */
-   assert(!ctx->Extensions.ARB_imaging);
    assert(!ctx->Extensions.EXT_convolution);
 
    /* switch to "normal" */