mesa: Remove EXT_texture_lod_bias extension enable flag
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 31 Aug 2011 00:33:51 +0000 (17:33 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Thu, 29 Sep 2011 17:40:55 +0000 (10:40 -0700)
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 mach64, mga, or r128.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
14 files changed:
src/mesa/drivers/dri/intel/intel_extensions.c
src/mesa/drivers/dri/nouveau/nouveau_context.c
src/mesa/drivers/dri/r200/r200_context.c
src/mesa/drivers/dri/r300/r300_context.c
src/mesa/drivers/dri/r600/r600_context.c
src/mesa/drivers/dri/radeon/radeon_context.c
src/mesa/main/attrib.c
src/mesa/main/extensions.c
src/mesa/main/get.c
src/mesa/main/mtypes.h
src/mesa/main/texenv.c
src/mesa/main/texparam.c
src/mesa/main/version.c
src/mesa/state_tracker/st_extensions.c

index 114750822af0e87f7ef1f833080afa7a9e35239c..550f411155e4ed2128a8984fe7c40815981dc7fd 100644 (file)
@@ -79,7 +79,6 @@ intelInitExtensions(struct gl_context *ctx)
    ctx->Extensions.EXT_stencil_wrap = true;
    ctx->Extensions.EXT_texture_env_dot3 = true;
    ctx->Extensions.EXT_texture_filter_anisotropic = true;
-   ctx->Extensions.EXT_texture_lod_bias = true;
    ctx->Extensions.APPLE_object_purgeable = true;
    ctx->Extensions.APPLE_vertex_array_object = true;
    ctx->Extensions.MESA_pack_invert = true;
index adf91bac316ef78e8a21499b9ae2f9a856e23742..09f7dffd3e61fbca62162bcf4d5ddb2ca8be9915 100644 (file)
@@ -128,7 +128,6 @@ nouveau_context_init(struct gl_context *ctx, struct nouveau_screen *screen,
        ctx->Extensions.EXT_secondary_color = true;
        ctx->Extensions.EXT_stencil_wrap = true;
        ctx->Extensions.EXT_texture_filter_anisotropic = true;
-       ctx->Extensions.EXT_texture_lod_bias = true;
        ctx->Extensions.NV_blend_square = true;
        ctx->Extensions.NV_texture_env_combine4 = true;
 
index 34ad83fa7ff9cfd04b5b03908c70c485f7d6ae6c..2a8c91a12807aa8ff4f67359963d9f9ef6df104a 100644 (file)
@@ -372,7 +372,6 @@ GLboolean r200CreateContext( gl_api api,
    ctx->Extensions.EXT_stencil_wrap = true;
    ctx->Extensions.EXT_texture_env_dot3 = true;
    ctx->Extensions.EXT_texture_filter_anisotropic = true;
-   ctx->Extensions.EXT_texture_lod_bias = true;
    ctx->Extensions.EXT_texture_mirror_clamp = true;
    ctx->Extensions.APPLE_vertex_array_object = true;
    ctx->Extensions.ATI_texture_env_combine3 = true;
index c2d9a4c3f1b0964b09e591d40eff349f0fe54f7f..cbc2fdc9029a5b61e64dccd90ee1c3236b20326c 100644 (file)
@@ -388,7 +388,6 @@ static void r300InitGLExtensions(struct gl_context *ctx)
        ctx->Extensions.EXT_stencil_wrap = true;
        ctx->Extensions.EXT_texture_env_dot3 = true;
        ctx->Extensions.EXT_texture_filter_anisotropic = true;
-       ctx->Extensions.EXT_texture_lod_bias = true;
        ctx->Extensions.EXT_texture_mirror_clamp = true;
        ctx->Extensions.EXT_texture_sRGB = true;
        ctx->Extensions.EXT_vertex_array_bgra = true;
index 05f9836f02324262dfa5e5402b58eff71e930537..62af2498713910f74053658ee26fcf9b0c8df483 100644 (file)
@@ -289,7 +289,6 @@ static void r600InitGLExtensions(struct gl_context *ctx)
        ctx->Extensions.EXT_stencil_wrap = true;
        ctx->Extensions.EXT_texture_env_dot3 = true;
        ctx->Extensions.EXT_texture_filter_anisotropic = true;
-       ctx->Extensions.EXT_texture_lod_bias = true;
        ctx->Extensions.EXT_texture_mirror_clamp = true;
        ctx->Extensions.EXT_vertex_array_bgra = true;
        ctx->Extensions.EXT_texture_sRGB = true;
index d8ec331a3877517e4e35e357036aa54679c2399b..13cd720a040bbe0ce1f759214f5f0c6850af6325 100644 (file)
@@ -325,7 +325,6 @@ r100CreateContext( gl_api api,
    ctx->Extensions.EXT_stencil_wrap = true;
    ctx->Extensions.EXT_texture_env_dot3 = true;
    ctx->Extensions.EXT_texture_filter_anisotropic = true;
-   ctx->Extensions.EXT_texture_lod_bias = true;
    ctx->Extensions.EXT_texture_mirror_clamp = true;
    ctx->Extensions.ATI_texture_env_combine3 = true;
    ctx->Extensions.ATI_texture_mirror_once = true;
index 94ced42045e10283ca30bfe58ad411e86c60b292..6f427e008bd25aa4acbde5ae6864d49d9a956937 100644 (file)
@@ -727,10 +727,8 @@ pop_texture_group(struct gl_context *ctx, struct texture_state *texstate)
                        ((unit->TexGenEnabled & R_BIT) ? GL_TRUE : GL_FALSE));
       _mesa_set_enable(ctx, GL_TEXTURE_GEN_Q,
                        ((unit->TexGenEnabled & Q_BIT) ? GL_TRUE : GL_FALSE));
-      if (ctx->Extensions.EXT_texture_lod_bias) {
-         _mesa_TexEnvf(GL_TEXTURE_FILTER_CONTROL_EXT,
-                       GL_TEXTURE_LOD_BIAS_EXT, unit->LodBias);
-      }
+      _mesa_TexEnvf(GL_TEXTURE_FILTER_CONTROL, GL_TEXTURE_LOD_BIAS,
+                   unit->LodBias);
       _mesa_TexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB,
                    unit->Combine.ModeRGB);
       _mesa_TexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA,
index 7d1956e7c34fd06136d18b61ccdc5f0427640701..380e47c98ff8e90e67aa92c40f21c425757a61b6 100644 (file)
@@ -197,7 +197,7 @@ static const struct extension extension_table[] = {
    { "GL_EXT_texture_filter_anisotropic",          o(EXT_texture_filter_anisotropic),          GL | ES1 | ES2, 1999 },
    { "GL_EXT_texture_format_BGRA8888",             o(dummy_true),                                   ES1 | ES2, 2005 },
    { "GL_EXT_texture_integer",                     o(EXT_texture_integer),                     GL,             2006 },
-   { "GL_EXT_texture_lod_bias",                    o(EXT_texture_lod_bias),                    GL | ES1,       1999 },
+   { "GL_EXT_texture_lod_bias",                    o(dummy_true),                              GL | ES1,       1999 },
    { "GL_EXT_texture_mirror_clamp",                o(EXT_texture_mirror_clamp),                GL,             2004 },
    { "GL_EXT_texture_object",                      o(dummy_true),                              GL,             1995 },
    { "GL_EXT_texture",                             o(dummy_true),                              GL,             1996 },
@@ -476,7 +476,6 @@ _mesa_enable_sw_extensions(struct gl_context *ctx)
    ctx->Extensions.EXT_texture_env_dot3 = GL_TRUE;
    ctx->Extensions.EXT_texture_filter_anisotropic = GL_TRUE;
    ctx->Extensions.EXT_texture_mirror_clamp = GL_TRUE;
-   ctx->Extensions.EXT_texture_lod_bias = GL_TRUE;
    ctx->Extensions.EXT_texture_shared_exponent = GL_TRUE;
 #if FEATURE_EXT_texture_sRGB
    ctx->Extensions.EXT_texture_sRGB = GL_TRUE;
@@ -560,7 +559,6 @@ _mesa_enable_1_4_extensions(struct gl_context *ctx)
    ctx->Extensions.EXT_point_parameters = GL_TRUE;
    ctx->Extensions.EXT_secondary_color = GL_TRUE;
    ctx->Extensions.EXT_stencil_wrap = GL_TRUE;
-   ctx->Extensions.EXT_texture_lod_bias = GL_TRUE;
 }
 
 
index e67e77b557ed60fe07b4d9945ddaf8057078ba80..9c1771e165e30a7da080ef1b4ac2ef96ac1ad58c 100644 (file)
@@ -294,7 +294,6 @@ EXTRA_EXT(MESA_texture_array);
 EXTRA_EXT2(EXT_secondary_color, ARB_vertex_program);
 EXTRA_EXT(EXT_secondary_color);
 EXTRA_EXT(EXT_fog_coord);
-EXTRA_EXT(EXT_texture_lod_bias);
 EXTRA_EXT(EXT_texture_filter_anisotropic);
 EXTRA_EXT(IBM_rasterpos_clip);
 EXTRA_EXT(NV_point_sprite);
@@ -651,7 +650,7 @@ static const struct value_desc values[] = {
 
    /* GL_EXT_texture_lod_bias */
    { GL_MAX_TEXTURE_LOD_BIAS_EXT, CONTEXT_FLOAT(Const.MaxTextureLodBias),
-        extra_EXT_texture_lod_bias },
+     NO_EXTRA },
 
    /* GL_EXT_texture_filter_anisotropic */
    { GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT,
index 676cc5e62b8771a155738ce392eb083ccf201c94..250d1d29503b69b3ff75c40f15ce5ba984395fe2 100644 (file)
@@ -2837,7 +2837,6 @@ struct gl_extensions
    GLboolean EXT_texture_env_dot3;
    GLboolean EXT_texture_filter_anisotropic;
    GLboolean EXT_texture_integer;
-   GLboolean EXT_texture_lod_bias;
    GLboolean EXT_texture_mirror_clamp;
    GLboolean EXT_texture_shared_exponent;
    GLboolean EXT_texture_snorm;
index 9848dd4c9bedaa631e6a42a02b7835da446856bf..e5f1bd39ee74ddb56a5b22c192971643aeb95674 100644 (file)
@@ -460,11 +460,6 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param )
       }
    }
    else if (target == GL_TEXTURE_FILTER_CONTROL_EXT) {
-      /* GL_EXT_texture_lod_bias */
-      if (!ctx->Extensions.EXT_texture_lod_bias) {
-        _mesa_error( ctx, GL_INVALID_ENUM, "glTexEnv(target=0x%x)", target );
-        return;
-      }
       if (pname == GL_TEXTURE_LOD_BIAS_EXT) {
         if (texUnit->LodBias == param[0])
            return;
@@ -693,11 +688,6 @@ _mesa_GetTexEnvfv( GLenum target, GLenum pname, GLfloat *params )
       }
    }
    else if (target == GL_TEXTURE_FILTER_CONTROL_EXT) {
-      /* GL_EXT_texture_lod_bias */
-      if (!ctx->Extensions.EXT_texture_lod_bias) {
-        _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexEnvfv(target)" );
-        return;
-      }
       if (pname == GL_TEXTURE_LOD_BIAS_EXT) {
          *params = texUnit->LodBias;
       }
@@ -760,11 +750,6 @@ _mesa_GetTexEnviv( GLenum target, GLenum pname, GLint *params )
       }
    }
    else if (target == GL_TEXTURE_FILTER_CONTROL_EXT) {
-      /* GL_EXT_texture_lod_bias */
-      if (!ctx->Extensions.EXT_texture_lod_bias) {
-        _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexEnviv(target)" );
-        return;
-      }
       if (pname == GL_TEXTURE_LOD_BIAS_EXT) {
          *params = (GLint) texUnit->LodBias;
       }
index 44dabe6de2c41ef09a62fa98c75f516991f8eb1d..d2df44d13ffb8302525b014fa64bb91f2929a2f2 100644 (file)
@@ -534,13 +534,10 @@ set_tex_parameterf(struct gl_context *ctx,
 
    case GL_TEXTURE_LOD_BIAS:
       /* NOTE: this is really part of OpenGL 1.4, not EXT_texture_lod_bias */
-      if (ctx->Extensions.EXT_texture_lod_bias) {
-         if (texObj->Sampler.LodBias != params[0]) {
-            flush(ctx);
-            texObj->Sampler.LodBias = params[0];
-            return GL_TRUE;
-         }
-         return GL_FALSE;
+      if (texObj->Sampler.LodBias != params[0]) {
+        flush(ctx);
+        texObj->Sampler.LodBias = params[0];
+        return GL_TRUE;
       }
       break;
 
@@ -1170,8 +1167,6 @@ _mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params )
          *params = (GLfloat) obj->Sampler.DepthMode;
          break;
       case GL_TEXTURE_LOD_BIAS:
-         if (!ctx->Extensions.EXT_texture_lod_bias)
-            goto invalid_pname;
          *params = obj->Sampler.LodBias;
          break;
 #if FEATURE_OES_draw_texture
@@ -1313,8 +1308,6 @@ _mesa_GetTexParameteriv( GLenum target, GLenum pname, GLint *params )
          *params = (GLint) obj->Sampler.DepthMode;
          break;
       case GL_TEXTURE_LOD_BIAS:
-         if (!ctx->Extensions.EXT_texture_lod_bias)
-            goto invalid_pname;
          *params = (GLint) obj->Sampler.LodBias;
          break;
 #if FEATURE_OES_draw_texture
index a0bf9158992850da92acfeea2e173e83207052aa..9a771d56289484ada16e2aa39c13f7332e543d30 100644 (file)
@@ -102,8 +102,7 @@ compute_version(struct gl_context *ctx)
                               ctx->Extensions.EXT_fog_coord &&
                               ctx->Extensions.EXT_point_parameters &&
                               ctx->Extensions.EXT_secondary_color &&
-                              ctx->Extensions.EXT_stencil_wrap &&
-                              ctx->Extensions.EXT_texture_lod_bias);
+                              ctx->Extensions.EXT_stencil_wrap);
    const GLboolean ver_1_5 = (ver_1_4 &&
                               ctx->Extensions.ARB_occlusion_query &&
                               ctx->Extensions.EXT_shadow_funcs);
index 39c7cc72f12540d95574d9b815fd912da3e088d6..184a03d9150f8a7934923e8fab568a1dbb4631ab 100644 (file)
@@ -279,7 +279,6 @@ void st_init_extensions(struct st_context *st)
    ctx->Extensions.EXT_secondary_color = GL_TRUE;
    ctx->Extensions.EXT_stencil_wrap = GL_TRUE;
    ctx->Extensions.EXT_texture_env_dot3 = GL_TRUE;
-   ctx->Extensions.EXT_texture_lod_bias = GL_TRUE;
    ctx->Extensions.EXT_vertex_array_bgra = GL_TRUE;
 
    ctx->Extensions.APPLE_vertex_array_object = GL_TRUE;