mesa: Remove EXT_texture_env_add extension enable flag
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 30 Aug 2011 23:51:57 +0000 (16:51 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Thu, 29 Sep 2011 17:40:47 +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.  The existing support is already partially
broken in Mesa (e.g., querying GL_TEXTURE_ENV_MODE in OpenGL ES 2.x).
This patch does not change the situation in any way.

This extension was previously not supported on mach64, mga (G200),
savage (Savage3D and other pre-Savage4), sis, and tdfx (Voodoo
Banshee).

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
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/extensions.c
src/mesa/main/mtypes.h
src/mesa/main/texenv.c
src/mesa/main/version.c
src/mesa/state_tracker/st_extensions.c

index ccef8ab4672f1addf6363dcb01d1b60b70f8701f..909b3bb36deaa7f921c8f938cb256b94455e4af5 100644 (file)
@@ -77,7 +77,6 @@ intelInitExtensions(struct gl_context *ctx)
    ctx->Extensions.EXT_secondary_color = true;
    ctx->Extensions.EXT_separate_shader_objects = true;
    ctx->Extensions.EXT_stencil_wrap = true;
-   ctx->Extensions.EXT_texture_env_add = true;
    ctx->Extensions.EXT_texture_env_combine = true;
    ctx->Extensions.EXT_texture_env_dot3 = true;
    ctx->Extensions.EXT_texture_filter_anisotropic = true;
index 00d78bb99f2b3f1dc40e26f9b3a14ef3deeb254e..fe1b4961131d74a5cfe223b1b3d42255ec1dddaa 100644 (file)
@@ -127,7 +127,6 @@ nouveau_context_init(struct gl_context *ctx, struct nouveau_screen *screen,
        ctx->Extensions.EXT_packed_depth_stencil = true;
        ctx->Extensions.EXT_secondary_color = true;
        ctx->Extensions.EXT_stencil_wrap = true;
-       ctx->Extensions.EXT_texture_env_add = true;
        ctx->Extensions.EXT_texture_env_combine = true;
        ctx->Extensions.EXT_texture_filter_anisotropic = true;
        ctx->Extensions.EXT_texture_lod_bias = true;
index 8b63fd2b175601c719ac24ffb9f63903d86efccc..16cd33367327b25cd50488639b623cd7e26a99ae 100644 (file)
@@ -370,7 +370,6 @@ GLboolean r200CreateContext( gl_api api,
    ctx->Extensions.EXT_packed_depth_stencil = true;
    ctx->Extensions.EXT_secondary_color = true;
    ctx->Extensions.EXT_stencil_wrap = true;
-   ctx->Extensions.EXT_texture_env_add = true;
    ctx->Extensions.EXT_texture_env_combine = true;
    ctx->Extensions.EXT_texture_env_dot3 = true;
    ctx->Extensions.EXT_texture_filter_anisotropic = true;
index 079cfcfa77221bba17816b58f9d379fcbdeb1477..13815d4f0ab66d00fffacdd5ae8391149cf62bee 100644 (file)
@@ -386,7 +386,6 @@ static void r300InitGLExtensions(struct gl_context *ctx)
        ctx->Extensions.EXT_secondary_color = true;
        ctx->Extensions.EXT_shadow_funcs = true;
        ctx->Extensions.EXT_stencil_wrap = true;
-       ctx->Extensions.EXT_texture_env_add = true;
        ctx->Extensions.EXT_texture_env_combine = true;
        ctx->Extensions.EXT_texture_env_dot3 = true;
        ctx->Extensions.EXT_texture_filter_anisotropic = true;
index 464af5d4b4fcde004a91e0bd29e2d8a52b02b129..06339c33336e307d25538c63426c85dd9d736b64 100644 (file)
@@ -287,7 +287,6 @@ static void r600InitGLExtensions(struct gl_context *ctx)
        ctx->Extensions.EXT_shadow_funcs = true;
        ctx->Extensions.EXT_stencil_two_side = true;
        ctx->Extensions.EXT_stencil_wrap = true;
-       ctx->Extensions.EXT_texture_env_add = true;
        ctx->Extensions.EXT_texture_env_combine = true;
        ctx->Extensions.EXT_texture_env_dot3 = true;
        ctx->Extensions.EXT_texture_filter_anisotropic = true;
index 3eab18e6297aa40d5ac37b233b3059d5d19269cd..c9aa2a20602b2c77fa30669cbf9cac4000b74896 100644 (file)
@@ -323,7 +323,6 @@ r100CreateContext( gl_api api,
    ctx->Extensions.EXT_packed_depth_stencil = true;
    ctx->Extensions.EXT_secondary_color = true;
    ctx->Extensions.EXT_stencil_wrap = true;
-   ctx->Extensions.EXT_texture_env_add = true;
    ctx->Extensions.EXT_texture_env_combine = true;
    ctx->Extensions.EXT_texture_env_dot3 = true;
    ctx->Extensions.EXT_texture_filter_anisotropic = true;
index 0b31ea894d868dcbf58bd9a4277f9296e78040c2..d3ec064cc9783e1fffd3e8e6c37677cdd996d696 100644 (file)
@@ -123,7 +123,7 @@ static const struct extension extension_table[] = {
    { "GL_ARB_texture_compression",                 o(dummy_true),                              GL,             2000 },
    { "GL_ARB_texture_compression_rgtc",            o(ARB_texture_compression_rgtc),            GL,             2004 },
    { "GL_ARB_texture_cube_map",                    o(ARB_texture_cube_map),                    GL,             1999 },
-   { "GL_ARB_texture_env_add",                     o(EXT_texture_env_add),                     GL,             1999 },
+   { "GL_ARB_texture_env_add",                     o(dummy_true),                              GL,             1999 },
    { "GL_ARB_texture_env_combine",                 o(ARB_texture_env_combine),                 GL,             2001 },
    { "GL_ARB_texture_env_crossbar",                o(ARB_texture_env_crossbar),                GL,             2001 },
    { "GL_ARB_texture_env_dot3",                    o(ARB_texture_env_dot3),                    GL,             2001 },
@@ -191,7 +191,7 @@ static const struct extension extension_table[] = {
    { "GL_EXT_texture_compression_s3tc",            o(EXT_texture_compression_s3tc),            GL,             2000 },
    { "GL_EXT_texture_cube_map",                    o(ARB_texture_cube_map),                    GL,             2001 },
    { "GL_EXT_texture_edge_clamp",                  o(dummy_true),                              GL,             1997 },
-   { "GL_EXT_texture_env_add",                     o(EXT_texture_env_add),                     GL,             1999 },
+   { "GL_EXT_texture_env_add",                     o(dummy_true),                              GL,             1999 },
    { "GL_EXT_texture_env_combine",                 o(EXT_texture_env_combine),                 GL,             2000 },
    { "GL_EXT_texture_env_dot3",                    o(EXT_texture_env_dot3),                    GL,             2000 },
    { "GL_EXT_texture_filter_anisotropic",          o(EXT_texture_filter_anisotropic),          GL | ES1 | ES2, 1999 },
@@ -473,7 +473,6 @@ _mesa_enable_sw_extensions(struct gl_context *ctx)
    ctx->Extensions.EXT_stencil_two_side = GL_TRUE;
    ctx->Extensions.EXT_texture_array = GL_TRUE;
    ctx->Extensions.EXT_texture_compression_latc = GL_TRUE;
-   ctx->Extensions.EXT_texture_env_add = GL_TRUE;
    ctx->Extensions.EXT_texture_env_combine = GL_TRUE;
    ctx->Extensions.EXT_texture_env_dot3 = GL_TRUE;
    ctx->Extensions.EXT_texture_filter_anisotropic = GL_TRUE;
@@ -537,7 +536,6 @@ _mesa_enable_1_3_extensions(struct gl_context *ctx)
    ctx->Extensions.ARB_texture_cube_map = GL_TRUE;
    ctx->Extensions.ARB_texture_env_combine = GL_TRUE;
    ctx->Extensions.ARB_texture_env_dot3 = GL_TRUE;
-   ctx->Extensions.EXT_texture_env_add = GL_TRUE;
    /*ctx->Extensions.ARB_transpose_matrix = GL_TRUE;*/
 }
 
index b2fdb373273a67445c5fd0a1f5d887ed1d86ee2c..a3d9c245ad2d599de203465b6859ba9ce0e6d6c8 100644 (file)
@@ -2834,7 +2834,6 @@ struct gl_extensions
    GLboolean EXT_texture_array;
    GLboolean EXT_texture_compression_latc;
    GLboolean EXT_texture_compression_s3tc;
-   GLboolean EXT_texture_env_add;
    GLboolean EXT_texture_env_combine;
    GLboolean EXT_texture_env_dot3;
    GLboolean EXT_texture_filter_anisotropic;
index 1df3890d47180757037d358300036fbaddc9089e..9d47c7bba45de90cf471ee5350dee7d864b8a0de 100644 (file)
@@ -60,15 +60,13 @@ set_env_mode(struct gl_context *ctx,
    case GL_BLEND:
    case GL_DECAL:
    case GL_REPLACE:
+   case GL_ADD:
       legal = GL_TRUE;
       break;
    case GL_REPLACE_EXT:
       mode = GL_REPLACE; /* GL_REPLACE_EXT != GL_REPLACE */
       legal = GL_TRUE;
       break;
-   case GL_ADD:
-      legal = ctx->Extensions.EXT_texture_env_add;
-      break;
    case GL_COMBINE:
       legal = (ctx->Extensions.EXT_texture_env_combine ||
                ctx->Extensions.ARB_texture_env_combine);
index f006a494aaf40a970c37bbd573383e92ac8bcf0e..a0bf9158992850da92acfeea2e173e83207052aa 100644 (file)
@@ -87,7 +87,6 @@ compute_version(struct gl_context *ctx)
 
    const GLboolean ver_1_3 = (ctx->Extensions.ARB_texture_border_clamp &&
                               ctx->Extensions.ARB_texture_cube_map &&
-                              ctx->Extensions.EXT_texture_env_add &&
                               ctx->Extensions.ARB_texture_env_combine &&
                               ctx->Extensions.ARB_texture_env_dot3);
    const GLboolean ver_1_4 = (ver_1_3 &&
@@ -244,8 +243,7 @@ compute_version_es1(struct gl_context *ctx)
    static const int max = 100;
 
    /* OpenGL ES 1.0 is derived from OpenGL 1.3 */
-   const GLboolean ver_1_0 = (ctx->Extensions.EXT_texture_env_add &&
-                              ctx->Extensions.ARB_texture_env_combine &&
+   const GLboolean ver_1_0 = (ctx->Extensions.ARB_texture_env_combine &&
                               ctx->Extensions.ARB_texture_env_dot3);
    /* OpenGL ES 1.1 is derived from OpenGL 1.5 */
    const GLboolean ver_1_1 = (ver_1_0 &&
index 9e0491fa1031652c4ad2d2a8ccf5859a1ecdedb1..205c1d5d8e24545541f190b798e4e600ae77a338 100644 (file)
@@ -278,7 +278,6 @@ void st_init_extensions(struct st_context *st)
    ctx->Extensions.EXT_provoking_vertex = GL_TRUE;
    ctx->Extensions.EXT_secondary_color = GL_TRUE;
    ctx->Extensions.EXT_stencil_wrap = GL_TRUE;
-   ctx->Extensions.EXT_texture_env_add = GL_TRUE;
    ctx->Extensions.EXT_texture_env_combine = GL_TRUE;
    ctx->Extensions.EXT_texture_env_dot3 = GL_TRUE;
    ctx->Extensions.EXT_texture_lod_bias = GL_TRUE;