mesa: Remove ARB_multitexture extension enable flag
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 30 Aug 2011 23:45:50 +0000 (16:45 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Thu, 29 Sep 2011 17:40:39 +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_CLIENT_ACTIVE_TEXTURE in OpenGL ES
2.x).  This patch does not change the situation in any way.

This extension was previously not supported on i810, mga (G200), or
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>
13 files changed:
src/mesa/drivers/dri/intel/intel_extensions.c
src/mesa/drivers/dri/intel/intel_extensions_es.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/drivers/dri/swrast/swrast.c
src/mesa/main/extensions.c
src/mesa/main/get.c
src/mesa/main/mtypes.h
src/mesa/main/version.c
src/mesa/state_tracker/st_extensions.c

index 104e0969a9ace952f95ca62e53b0245516efd778..ccef8ab4672f1addf6363dcb01d1b60b70f8701f 100644 (file)
@@ -46,7 +46,6 @@ intelInitExtensions(struct gl_context *ctx)
    ctx->Extensions.ARB_framebuffer_object = true;
    ctx->Extensions.ARB_half_float_pixel = true;
    ctx->Extensions.ARB_map_buffer_range = true;
-   ctx->Extensions.ARB_multitexture = true;
    ctx->Extensions.ARB_point_sprite = true;
    ctx->Extensions.ARB_sampler_objects = true;
    ctx->Extensions.ARB_shader_objects = true;
index bbc32203626979bf8d316428c4666bca09baad57..c4285292f4679cf43b83d52ccd29ab3a7e8654c0 100644 (file)
@@ -81,7 +81,6 @@ static const char *es2_extensions[] = {
    /* Required by GLES2 */
    "GL_ARB_fragment_program",
    "GL_ARB_fragment_shader",
-   "GL_ARB_multitexture",
    "GL_ARB_shader_objects",
    "GL_ARB_texture_cube_map",
    "GL_ARB_texture_mirrored_repeat",
index 33c0df6a3ffbbaaa2c46de455977bb008eaf2991..00d78bb99f2b3f1dc40e26f9b3a14ef3deeb254e 100644 (file)
@@ -117,7 +117,6 @@ nouveau_context_init(struct gl_context *ctx, struct nouveau_screen *screen,
        nctx->hw.chan->user_private = nctx;
 
        /* Enable any supported extensions. */
-       ctx->Extensions.ARB_multitexture = true;
        ctx->Extensions.ARB_texture_mirrored_repeat = true;
        ctx->Extensions.EXT_blend_color = true;
        ctx->Extensions.EXT_blend_minmax = true;
index bc01c61c8c8af0076304553724433d40441b77b3..8b63fd2b175601c719ac24ffb9f63903d86efccc 100644 (file)
@@ -355,7 +355,6 @@ GLboolean r200CreateContext( gl_api api,
    _math_matrix_set_identity( &rmesa->tmpmat );
 
    ctx->Extensions.ARB_half_float_pixel = true;
-   ctx->Extensions.ARB_multitexture = true;
    ctx->Extensions.ARB_occlusion_query = true;
    ctx->Extensions.ARB_texture_border_clamp = true;
    ctx->Extensions.ARB_texture_env_combine = true;
index d7a5da120048b56f8f800fbba82e5ba1b960c685..079cfcfa77221bba17816b58f9d379fcbdeb1477 100644 (file)
@@ -365,7 +365,6 @@ static void r300InitGLExtensions(struct gl_context *ctx)
 
        ctx->Extensions.ARB_depth_texture = true;
        ctx->Extensions.ARB_fragment_program = true;
-       ctx->Extensions.ARB_multitexture = true;
        ctx->Extensions.ARB_shadow = true;
        ctx->Extensions.ARB_shadow_ambient = true;
        ctx->Extensions.ARB_texture_border_clamp = true;
index 3e296efdb6d12064fd12f032a6f4b2dce2ae85a0..464af5d4b4fcde004a91e0bd29e2d8a52b02b129 100644 (file)
@@ -262,7 +262,6 @@ static void r600InitGLExtensions(struct gl_context *ctx)
        ctx->Extensions.ARB_fragment_program = true;
        ctx->Extensions.ARB_fragment_program_shadow = true;
        ctx->Extensions.ARB_occlusion_query = true;
-       ctx->Extensions.ARB_multitexture = true;
        ctx->Extensions.ARB_shadow = true;
        ctx->Extensions.ARB_shadow_ambient = true;
        ctx->Extensions.ARB_texture_border_clamp = true;
index 0ebf8ba5c59acf978bb24f91f830192a9cf6ad76..3eab18e6297aa40d5ac37b233b3059d5d19269cd 100644 (file)
@@ -313,7 +313,6 @@ r100CreateContext( gl_api api,
       _math_matrix_set_identity( &rmesa->tmpmat[i] );
    }
 
-   ctx->Extensions.ARB_multitexture = true;
    ctx->Extensions.ARB_texture_border_clamp = true;
    ctx->Extensions.ARB_texture_env_combine = true;
    ctx->Extensions.ARB_texture_env_crossbar = true;
index 3d5ddc51c7f36fc3f749550c1884f17a774dad49..89c1da5e9a40057f96c2edb920df77fdca67eeec 100644 (file)
@@ -590,7 +590,6 @@ static const char *es2_extensions[] = {
    /* Required by GLES2 */
    "GL_ARB_fragment_program",
    "GL_ARB_fragment_shader",
-   "GL_ARB_multitexture",
    "GL_ARB_shader_objects",
    "GL_ARB_texture_cube_map",
    "GL_ARB_texture_mirrored_repeat",
index cf9469f7727cbed41f8e75b89d1c4864d615b72a..0b31ea894d868dcbf58bd9a4277f9296e78040c2 100644 (file)
@@ -101,7 +101,7 @@ static const struct extension extension_table[] = {
    { "GL_ARB_instanced_arrays",                    o(ARB_instanced_arrays),                    GL,             2008 },
    { "GL_ARB_map_buffer_range",                    o(ARB_map_buffer_range),                    GL,             2008 },
    { "GL_ARB_multisample",                         o(dummy_true),                              GL,             1994 },
-   { "GL_ARB_multitexture",                        o(ARB_multitexture),                        GL,             1998 },
+   { "GL_ARB_multitexture",                        o(dummy_true),                              GL,             1998 },
    { "GL_ARB_occlusion_query2",                    o(ARB_occlusion_query2),                    GL,             2003 },
    { "GL_ARB_occlusion_query",                     o(ARB_occlusion_query),                     GL,             2001 },
    { "GL_ARB_pixel_buffer_object",                 o(EXT_pixel_buffer_object),                 GL,             2004 },
@@ -398,7 +398,6 @@ _mesa_enable_sw_extensions(struct gl_context *ctx)
    ctx->Extensions.ARB_half_float_pixel = GL_TRUE;
    ctx->Extensions.ARB_half_float_vertex = GL_TRUE;
    ctx->Extensions.ARB_map_buffer_range = GL_TRUE;
-   ctx->Extensions.ARB_multitexture = GL_TRUE;
 #if FEATURE_queryobj
    ctx->Extensions.ARB_occlusion_query = GL_TRUE;
    ctx->Extensions.ARB_occlusion_query2 = GL_TRUE;
@@ -534,7 +533,6 @@ _mesa_enable_sw_extensions(struct gl_context *ctx)
 void
 _mesa_enable_1_3_extensions(struct gl_context *ctx)
 {
-   ctx->Extensions.ARB_multitexture = GL_TRUE;
    ctx->Extensions.ARB_texture_border_clamp = GL_TRUE;
    ctx->Extensions.ARB_texture_cube_map = GL_TRUE;
    ctx->Extensions.ARB_texture_env_combine = GL_TRUE;
index cddea8ea2b9632efb750ff63328f5be2965e0522..e67e77b557ed60fe07b4d9945ddaf8057078ba80 100644 (file)
@@ -289,7 +289,6 @@ static const int extra_ARB_sampler_objects[] = {
 
 
 EXTRA_EXT(ARB_ES2_compatibility);
-EXTRA_EXT(ARB_multitexture);
 EXTRA_EXT(ARB_texture_cube_map);
 EXTRA_EXT(MESA_texture_array);
 EXTRA_EXT2(EXT_secondary_color, ARB_vertex_program);
@@ -432,8 +431,7 @@ static const struct value_desc values[] = {
    { GL_VIEWPORT, LOC_CUSTOM, TYPE_INT_4, 0, NO_EXTRA },
 
    /* GL_ARB_multitexture */
-   { GL_ACTIVE_TEXTURE_ARB,
-     LOC_CUSTOM, TYPE_INT, 0, extra_ARB_multitexture },
+   { GL_ACTIVE_TEXTURE, LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA },
 
    /* Note that all the OES_* extensions require that the Mesa "struct
     * gl_extensions" include a member with the name of the extension.
@@ -612,10 +610,8 @@ static const struct value_desc values[] = {
      extra_ARB_ES2_compatibility },
 
    /* GL_ARB_multitexture */
-   { GL_MAX_TEXTURE_UNITS_ARB,
-     CONTEXT_INT(Const.MaxTextureUnits), extra_ARB_multitexture },
-   { GL_CLIENT_ACTIVE_TEXTURE_ARB,
-     LOC_CUSTOM, TYPE_INT, 0, extra_ARB_multitexture },
+   { GL_MAX_TEXTURE_UNITS, CONTEXT_INT(Const.MaxTextureUnits), NO_EXTRA },
+   { GL_CLIENT_ACTIVE_TEXTURE, LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA },
 
    /* GL_ARB_texture_cube_map */
    { GL_TEXTURE_CUBE_MAP_ARB, LOC_CUSTOM, TYPE_BOOLEAN, 0, NO_EXTRA },
index 9b53a60787a3759af7c1fdcac50013f3fbddc72b..b2fdb373273a67445c5fd0a1f5d887ed1d86ee2c 100644 (file)
@@ -2766,7 +2766,6 @@ struct gl_extensions
    GLboolean ARB_half_float_vertex;
    GLboolean ARB_instanced_arrays;
    GLboolean ARB_map_buffer_range;
-   GLboolean ARB_multitexture;
    GLboolean ARB_occlusion_query;
    GLboolean ARB_occlusion_query2;
    GLboolean ARB_point_sprite;
index c497317473dec732b8766dfa9ceb558a676cdaed..f006a494aaf40a970c37bbd573383e92ac8bcf0e 100644 (file)
@@ -85,8 +85,7 @@ compute_version(struct gl_context *ctx)
    GLuint major, minor;
    static const int max = 100;
 
-   const GLboolean ver_1_3 = (ctx->Extensions.ARB_multitexture &&
-                              ctx->Extensions.ARB_texture_border_clamp &&
+   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 &&
@@ -245,8 +244,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.ARB_multitexture &&
-                              ctx->Extensions.EXT_texture_env_add &&
+   const GLboolean ver_1_0 = (ctx->Extensions.EXT_texture_env_add &&
                               ctx->Extensions.ARB_texture_env_combine &&
                               ctx->Extensions.ARB_texture_env_dot3);
    /* OpenGL ES 1.1 is derived from OpenGL 1.5 */
@@ -277,8 +275,7 @@ compute_version_es2(struct gl_context *ctx)
    static const int max = 100;
 
    /* OpenGL ES 2.0 is derived from OpenGL 2.0 */
-   const GLboolean ver_2_0 = (ctx->Extensions.ARB_multitexture &&
-                              ctx->Extensions.ARB_texture_cube_map &&
+   const GLboolean ver_2_0 = (ctx->Extensions.ARB_texture_cube_map &&
                               ctx->Extensions.ARB_texture_mirrored_repeat &&
                               ctx->Extensions.EXT_blend_color &&
                               ctx->Extensions.EXT_blend_func_separate &&
index e6572c85adff9d73c62a15f82b82652a776e9773..9e0491fa1031652c4ad2d2a8ccf5859a1ecdedb1 100644 (file)
@@ -344,10 +344,6 @@ void st_init_extensions(struct st_context *st)
       ctx->Extensions.ARB_texture_non_power_of_two = GL_TRUE;
    }
 
-   if (screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS) > 1) {
-      ctx->Extensions.ARB_multitexture = GL_TRUE;
-   }
-
    if (screen->get_param(screen, PIPE_CAP_TWO_SIDED_STENCIL)) {
       ctx->Extensions.ATI_separate_stencil = GL_TRUE;
       ctx->Extensions.EXT_stencil_two_side = GL_TRUE;