[Mesa-dev] [PATCH] Remove the ATI_envmap_bumpmap extension

Kenneth Graunke kenneth at whitecape.org
Fri Jun 27 15:46:11 PDT 2014


On Friday, June 27, 2014 03:19:36 PM Jason Ekstrand wrote:
> As far as I can tell, the Intel mesa driver is the only driver in the world
> still supporting this legacy extension.  If someone wants to do bump
> mapping, they can use shaders.
> ---
>  include/GL/gl_mangle.h                          |   4 -
>  include/GL/glext.h                              |  22 ---

As Matt said, you don't want to modify glext.h.  I'm not sure if you want to 
modify gl_mangle.h either - I really don't know what that does.

Otherwise, the rest of the changes look good to me.  With the glext.h hunks 
dropped:
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

>  src/glsl/builtin_variables.cpp                  |  12 --
>  src/mapi/glapi/gen/gl_API.xml                   |  50 ------
>  src/mapi/glapi/tests/check_table.cpp            |   4 -
>  src/mesa/drivers/dri/i965/brw_surface_formats.c |   1 -
>  src/mesa/drivers/dri/i965/intel_extensions.c    |   1 -
>  src/mesa/drivers/dri/radeon/server/radeon_reg.h |   3 -
>  src/mesa/main/context.c                         |   3 -
>  src/mesa/main/dlist.c                           |  46 ------
>  src/mesa/main/extensions.c                      |   2 -
>  src/mesa/main/ff_fragment_shader.cpp            |  80 ----------
>  src/mesa/main/format_pack.c                     |  25 ---
>  src/mesa/main/format_unpack.c                   |  14 --
>  src/mesa/main/formats.c                         |  20 +--
>  src/mesa/main/formats.h                         |   2 -
>  src/mesa/main/glformats.c                       |  35 -----
>  src/mesa/main/glformats.h                       |   3 -
>  src/mesa/main/mtypes.h                          |   6 -
>  src/mesa/main/pack.c                            | 137 ----------------
>  src/mesa/main/pack.h                            |   8 -
>  src/mesa/main/tests/enum_strings.cpp            |   8 -
>  src/mesa/main/texenv.c                          | 198 
------------------------
>  src/mesa/main/texenv.h                          |  12 --
>  src/mesa/main/texformat.c                       |   5 -
>  src/mesa/main/texgetimage.c                     |   5 -
>  src/mesa/main/teximage.c                        |  13 +-
>  src/mesa/main/texstate.c                        |  15 --
>  src/mesa/main/texstore.c                        |  78 ----------
>  src/mesa/program/prog_statevars.c               |  30 ----
>  src/mesa/program/prog_statevars.h               |   2 -
>  src/mesa/swrast/s_texcombine.c                  | 169 --------------------
>  src/mesa/swrast/s_texfetch.c                    |   1 -
>  src/mesa/swrast/s_texfetch_tmp.h                |  16 --
>  34 files changed, 2 insertions(+), 1028 deletions(-)
> 
> diff --git a/include/GL/gl_mangle.h b/include/GL/gl_mangle.h
> index b3a9c88..315958a 100644
> --- a/include/GL/gl_mangle.h
> +++ b/include/GL/gl_mangle.h
> @@ -948,8 +948,6 @@
>  #define glGetSubroutineIndex		MANGLE(GetSubroutineIndex)
>  #define glGetSubroutineUniformLocation		
MANGLE(GetSubroutineUniformLocation)
>  #define glGetSynciv		MANGLE(GetSynciv)
> -#define glGetTexBumpParameterfvATI		
MANGLE(GetTexBumpParameterfvATI)
> -#define glGetTexBumpParameterivATI		
MANGLE(GetTexBumpParameterivATI)
>  #define glGetTexEnvfv		MANGLE(GetTexEnvfv)
>  #define glGetTexEnviv		MANGLE(GetTexEnviv)
>  #define glGetTexEnvxvOES		MANGLE(GetTexEnvxvOES)
> @@ -1938,8 +1936,6 @@
>  #define glTexBufferEXT		MANGLE(TexBufferEXT)
>  #define glTexBuffer		MANGLE(TexBuffer)
>  #define glTexBufferRange		MANGLE(TexBufferRange)
> -#define glTexBumpParameterfvATI		MANGLE(TexBumpParameterfvATI)
> -#define glTexBumpParameterivATI		MANGLE(TexBumpParameterivATI)
>  #define glTexCoord1bOES		MANGLE(TexCoord1bOES)
>  #define glTexCoord1bvOES		MANGLE(TexCoord1bvOES)
>  #define glTexCoord1d		MANGLE(TexCoord1d)
> diff --git a/include/GL/glext.h b/include/GL/glext.h
> index a626580..6777327 100644
> --- a/include/GL/glext.h
> +++ b/include/GL/glext.h
> @@ -5238,28 +5238,6 @@ GLAPI void APIENTRY glDrawRangeElementArrayATI 
(GLenum mode, GLuint start, GLuin
>  #endif
>  #endif /* GL_ATI_element_array */
>  
> -#ifndef GL_ATI_envmap_bumpmap
> -#define GL_ATI_envmap_bumpmap 1
> -#define GL_BUMP_ROT_MATRIX_ATI            0x8775
> -#define GL_BUMP_ROT_MATRIX_SIZE_ATI       0x8776
> -#define GL_BUMP_NUM_TEX_UNITS_ATI         0x8777
> -#define GL_BUMP_TEX_UNITS_ATI             0x8778
> -#define GL_DUDV_ATI                       0x8779
> -#define GL_DU8DV8_ATI                     0x877A
> -#define GL_BUMP_ENVMAP_ATI                0x877B
> -#define GL_BUMP_TARGET_ATI                0x877C
> -typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, 
const GLint *param);
> -typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, 
const GLfloat *param);
> -typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, 
GLint *param);
> -typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, 
GLfloat *param);
> -#ifdef GL_GLEXT_PROTOTYPES
> -GLAPI void APIENTRY glTexBumpParameterivATI (GLenum pname, const GLint 
*param);
> -GLAPI void APIENTRY glTexBumpParameterfvATI (GLenum pname, const GLfloat 
*param);
> -GLAPI void APIENTRY glGetTexBumpParameterivATI (GLenum pname, GLint 
*param);
> -GLAPI void APIENTRY glGetTexBumpParameterfvATI (GLenum pname, GLfloat 
*param);
> -#endif
> -#endif /* GL_ATI_envmap_bumpmap */
> -
>  #ifndef GL_ATI_fragment_shader
>  #define GL_ATI_fragment_shader 1
>  #define GL_FRAGMENT_SHADER_ATI            0x8920
> diff --git a/src/glsl/builtin_variables.cpp b/src/glsl/builtin_variables.cpp
> index b9c69d2..9f95716 100644
> --- a/src/glsl/builtin_variables.cpp
> +++ b/src/glsl/builtin_variables.cpp
> @@ -160,14 +160,6 @@ static const struct gl_builtin_uniform_element 
gl_NormalScale_elements[] = {
>     {NULL, {STATE_NORMAL_SCALE}, SWIZZLE_XXXX},
>  };
>  
> -static const struct gl_builtin_uniform_element 
gl_BumpRotMatrix0MESA_elements[] = {
> -   {NULL, {STATE_INTERNAL, STATE_ROT_MATRIX_0}, SWIZZLE_XYZW},
> -};
> -
> -static const struct gl_builtin_uniform_element 
gl_BumpRotMatrix1MESA_elements[] = {
> -   {NULL, {STATE_INTERNAL, STATE_ROT_MATRIX_1}, SWIZZLE_XYZW},
> -};
> -
>  static const struct gl_builtin_uniform_element 
gl_FogParamsOptimizedMESA_elements[] = {
>     {NULL, {STATE_INTERNAL, STATE_FOG_PARAMS_OPTIMIZED}, SWIZZLE_XYZW},
>  };
> @@ -284,8 +276,6 @@ static const struct gl_builtin_uniform_desc 
_mesa_builtin_uniform_desc[] = {
>     STATEVAR(gl_NormalMatrix),
>     STATEVAR(gl_NormalScale),
>  
> -   STATEVAR(gl_BumpRotMatrix0MESA),
> -   STATEVAR(gl_BumpRotMatrix1MESA),
>     STATEVAR(gl_FogParamsOptimizedMESA),
>     STATEVAR(gl_CurrentAttribVertMESA),
>     STATEVAR(gl_CurrentAttribFragMESA),
> @@ -761,8 +751,6 @@ builtin_variable_generator::generate_uniforms()
>        add_uniform(mat4_t, "gl_ModelViewProjectionMatrixInverseTranspose");
>        add_uniform(float_t, "gl_NormalScale");
>        add_uniform(type("gl_LightModelParameters"), "gl_LightModel");
> -      add_uniform(vec2_t, "gl_BumpRotMatrix0MESA");
> -      add_uniform(vec2_t, "gl_BumpRotMatrix1MESA");
>        add_uniform(vec4_t, "gl_FogParamsOptimizedMESA");
>  
>        const glsl_type *const mat4_array_type =
> diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml
> index 0a486f0..7b8b9d2 100644
> --- a/src/mapi/glapi/gen/gl_API.xml
> +++ b/src/mapi/glapi/gen/gl_API.xml
> @@ -12129,56 +12129,6 @@
>      <enum name="DEPTH_STENCIL_TO_BGRA_NV"                 value="0x886F"/>
>  </category>
>  
> -<category name="GL_ATI_envmap_bumpmap" number="244">
> -    <enum name="BUMP_ROT_MATRIX_ATI"          count="4"   value="0x8775">
> -        <size name="TexBumpParameterfv"/>
> -        <size name="TexBumpParameteriv"/>
> -        <size name="GetTexBumpParameterfv" mode="get"/>
> -        <size name="GetTexBumpParameteriv" mode="get"/>
> -    </enum>
> -    <enum name="BUMP_ROT_MATRIX_SIZE_ATI"     count="1"   value="0x8776">
> -        <size name="GetTexBumpParameterfv" mode="get"/>
> -        <size name="GetTexBumpParameteriv" mode="get"/>
> -    </enum>
> -    <enum name="BUMP_NUM_TEX_UNITS_ATI"       count="1"   value="0x8777">
> -        <size name="GetTexBumpParameterfv" mode="get"/>
> -        <size name="GetTexBumpParameteriv" mode="get"/>
> -    </enum>
> -    <enum name="BUMP_TEX_UNITS_ATI"           count="-1"  value="0x8778">
> -        <size name="GetTexBumpParameterfv" mode="get"/>
> -        <size name="GetTexBumpParameteriv" mode="get"/>
> -    </enum>
> -    <enum name="DUDV_ATI"                                 value="0x8779"/>
> -    <enum name="DU8DV8_ATI"                               value="0x877A"/>
> -    <enum name="BUMP_ENVMAP_ATI"                          value="0x877B"/>
> -    <enum name="BUMP_TARGET_ATI"              count="1"   value="0x877C">
> -        <size name="TexEnviv"/>
> -        <size name="TexEnvfv"/>
> -        <size name="GetTexEnviv" mode="get"/>
> -        <size name="GetTexEnvfv" mode="get"/>
> -    </enum>
> -    <function name="TexBumpParameterfvATI" offset="assign" 
deprecated="3.1">
> -      <param name="pname" type="GLenum"/>
> -      <param name="param" type="const GLfloat *" variable_param="pname"/>
> -      <glx ignore="true"/>
> -    </function>
> -    <function name="TexBumpParameterivATI" offset="assign" 
deprecated="3.1">
> -      <param name="pname" type="GLenum"/>
> -      <param name="param" type="const GLint *" variable_param="pname"/>
> -      <glx ignore="true"/>
> -    </function>
> -    <function name="GetTexBumpParameterfvATI" offset="assign" 
deprecated="3.1">
> -      <param name="pname" type="GLenum"/>
> -      <param name="param" type="GLfloat *" variable_param="pname"/>
> -      <glx ignore="true"/>
> -    </function>
> -    <function name="GetTexBumpParameterivATI" offset="assign" 
deprecated="3.1">
> -      <param name="pname" type="GLenum"/>
> -      <param name="param" type="GLint *" variable_param="pname"/>
> -      <glx ignore="true"/>
> -    </function>
> -</category>
> -
>  <category name="GL_ATI_fragment_shader" number="245">
>      <enum name="FRAGMENT_SHADER_ATI"                      value="0x8920"/>
>      <enum name="REG_0_ATI"                                value="0x8921"/>
> diff --git a/src/mapi/glapi/tests/check_table.cpp 
b/src/mapi/glapi/tests/check_table.cpp
> index 89d9073..cd03722 100644
> --- a/src/mapi/glapi/tests/check_table.cpp
> +++ b/src/mapi/glapi/tests/check_table.cpp
> @@ -1382,10 +1382,6 @@ const struct name_offset known_dispatch[] = {
>     { "glVertexAttribs4fvNV", _O(VertexAttribs4fvNV) },
>     { "glVertexAttribs4svNV", _O(VertexAttribs4svNV) },
>     { "glVertexAttribs4ubvNV", _O(VertexAttribs4ubvNV) },
> -   { "glGetTexBumpParameterfvATI", _O(GetTexBumpParameterfvATI) },
> -   { "glGetTexBumpParameterivATI", _O(GetTexBumpParameterivATI) },
> -   { "glTexBumpParameterfvATI", _O(TexBumpParameterfvATI) },
> -   { "glTexBumpParameterivATI", _O(TexBumpParameterivATI) },
>     { "glAlphaFragmentOp1ATI", _O(AlphaFragmentOp1ATI) },
>     { "glAlphaFragmentOp2ATI", _O(AlphaFragmentOp2ATI) },
>     { "glAlphaFragmentOp3ATI", _O(AlphaFragmentOp3ATI) },
> diff --git a/src/mesa/drivers/dri/i965/brw_surface_formats.c 
b/src/mesa/drivers/dri/i965/brw_surface_formats.c
> index 5907dd9..780581b 100644
> --- a/src/mesa/drivers/dri/i965/brw_surface_formats.c
> +++ b/src/mesa/drivers/dri/i965/brw_surface_formats.c
> @@ -454,7 +454,6 @@ brw_format_for_mesa_format(mesa_format mesa_format)
>        [MESA_FORMAT_RGB_UINT32] = BRW_SURFACEFORMAT_R32G32B32_UINT,
>        [MESA_FORMAT_RGBA_UINT32] = BRW_SURFACEFORMAT_R32G32B32A32_UINT,
>  
> -      [MESA_FORMAT_DUDV8] = BRW_SURFACEFORMAT_R8G8_SNORM,
>        [MESA_FORMAT_R_SNORM8] = BRW_SURFACEFORMAT_R8_SNORM,
>        [MESA_FORMAT_R8G8_SNORM] = BRW_SURFACEFORMAT_R8G8_SNORM,
>        [MESA_FORMAT_X8B8G8R8_SNORM] = 0,
> diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c 
b/src/mesa/drivers/dri/i965/intel_extensions.c
> index d1df197..281d6c4 100644
> --- a/src/mesa/drivers/dri/i965/intel_extensions.c
> +++ b/src/mesa/drivers/dri/i965/intel_extensions.c
> @@ -227,7 +227,6 @@ intelInitExtensions(struct gl_context *ctx)
>     ctx->Extensions.EXT_vertex_array_bgra = true;
>     ctx->Extensions.AMD_seamless_cubemap_per_texture = true;
>     ctx->Extensions.APPLE_object_purgeable = true;
> -   ctx->Extensions.ATI_envmap_bumpmap = true;
>     ctx->Extensions.ATI_separate_stencil = true;
>     ctx->Extensions.ATI_texture_env_combine3 = true;
>     ctx->Extensions.MESA_pack_invert = true;
> diff --git a/src/mesa/drivers/dri/radeon/server/radeon_reg.h 
b/src/mesa/drivers/dri/radeon/server/radeon_reg.h
> index 7ba5b38..0f0d585 100644
> --- a/src/mesa/drivers/dri/radeon/server/radeon_reg.h
> +++ b/src/mesa/drivers/dri/radeon/server/radeon_reg.h
> @@ -1274,9 +1274,6 @@
>  #       define RADEON_TXFORMAT_DXT45              (15 <<  0)
>  #       define RADEON_TXFORMAT_SHADOW16           (16 <<  0)
>  #       define RADEON_TXFORMAT_SHADOW32           (17 <<  0)
> -#       define RADEON_TXFORMAT_DUDV88             (18 <<  0)
> -#       define RADEON_TXFORMAT_LDUDV655           (19 <<  0)
> -#       define RADEON_TXFORMAT_LDUDUV8888         (20 <<  0)
>  #       define RADEON_TXFORMAT_FORMAT_MASK        (31 <<  0)
>  #       define RADEON_TXFORMAT_FORMAT_SHIFT       0
>  #       define RADEON_TXFORMAT_APPLE_YUV_MODE     (1  <<  5)
> diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
> index 244e63e..b082159 100644
> --- a/src/mesa/main/context.c
> +++ b/src/mesa/main/context.c
> @@ -656,9 +656,6 @@ _mesa_init_constants(struct gl_context *ctx)
>     /* GL_ARB_sync */
>     ctx->Const.MaxServerWaitTimeout = 0x1fff7fffffffULL;
>  
> -   /* GL_ATI_envmap_bumpmap */
> -   ctx->Const.SupportedBumpUnits = SUPPORTED_ATI_BUMP_UNITS;
> -
>     /* GL_EXT_provoking_vertex */
>     ctx->Const.QuadsFollowProvokingVertexConvention = GL_TRUE;
>  
> diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
> index 5874b99..5c7160d 100644
> --- a/src/mesa/main/dlist.c
> +++ b/src/mesa/main/dlist.c
> @@ -317,8 +317,6 @@ typedef enum
>     /* GL_ARB_draw_buffers */
>     OPCODE_DRAW_BUFFERS_ARB,
>     /* GL_ATI_fragment_shader */
> -   OPCODE_TEX_BUMP_PARAMETER_ATI,
> -   /* GL_ATI_fragment_shader */
>     OPCODE_BIND_FRAGMENT_SHADER_ATI,
>     OPCODE_SET_FRAGMENT_SHADER_CONSTANTS_ATI,
>     /* OpenGL 2.0 */
> @@ -4977,36 +4975,6 @@ save_DrawBuffersARB(GLsizei count, const GLenum * 
buffers)
>  }
>  
>  static void GLAPIENTRY
> -save_TexBumpParameterfvATI(GLenum pname, const GLfloat *param)
> -{
> -   GET_CURRENT_CONTEXT(ctx);
> -   Node *n;
> -
> -   n = alloc_instruction(ctx, OPCODE_TEX_BUMP_PARAMETER_ATI, 5);
> -   if (n) {
> -      n[1].ui = pname;
> -      n[2].f = param[0];
> -      n[3].f = param[1];
> -      n[4].f = param[2];
> -      n[5].f = param[3];
> -   }
> -   if (ctx->ExecuteFlag) {
> -      CALL_TexBumpParameterfvATI(ctx->Exec, (pname, param));
> -   }
> -}
> -
> -static void GLAPIENTRY
> -save_TexBumpParameterivATI(GLenum pname, const GLint *param)
> -{
> -   GLfloat p[4];
> -   p[0] = INT_TO_FLOAT(param[0]);
> -   p[1] = INT_TO_FLOAT(param[1]);
> -   p[2] = INT_TO_FLOAT(param[2]);
> -   p[3] = INT_TO_FLOAT(param[3]);
> -   save_TexBumpParameterfvATI(pname, p);
> -}
> -
> -static void GLAPIENTRY
>  save_BindFragmentShaderATI(GLuint id)
>  {
>     GET_CURRENT_CONTEXT(ctx);
> @@ -8653,16 +8621,6 @@ execute_list(struct gl_context *ctx, GLuint list)
>              CALL_ClampColor(ctx->Exec, (n[1].e, n[2].e));
>              break;
>  
> -         case OPCODE_TEX_BUMP_PARAMETER_ATI:
> -            {
> -               GLfloat values[4];
> -               GLuint i, pname = n[1].ui;
> -
> -               for (i = 0; i < 4; i++)
> -                  values[i] = n[1 + i].f;
> -               CALL_TexBumpParameterfvATI(ctx->Exec, (pname, values));
> -            }
> -            break;
>           case OPCODE_BIND_FRAGMENT_SHADER_ATI:
>              CALL_BindFragmentShaderATI(ctx->Exec, (n[1].i));
>              break;
> @@ -9488,10 +9446,6 @@ _mesa_initialize_save_table(const struct gl_context 
*ctx)
>      */
>     SET_BindProgramARB(table, save_BindProgramNV);
>  
> -   /* 244. GL_ATI_envmap_bumpmap */
> -   SET_TexBumpParameterivATI(table, save_TexBumpParameterivATI);
> -   SET_TexBumpParameterfvATI(table, save_TexBumpParameterfvATI);
> -
>     /* 245. GL_ATI_fragment_shader */
>     SET_BindFragmentShaderATI(table, save_BindFragmentShaderATI);
>     SET_SetFragmentShaderConstantATI(table, 
save_SetFragmentShaderConstantATI);
> diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
> index 25e3dab..61f188e 100644
> --- a/src/mesa/main/extensions.c
> +++ b/src/mesa/main/extensions.c
> @@ -328,7 +328,6 @@ static const struct extension extension_table[] = {
>     { "GL_APPLE_vertex_array_object",               o(dummy_true),                              
GLL,            2002 },
>     { "GL_ATI_blend_equation_separate",             
o(EXT_blend_equation_separate),             GL,             2003 },
>     { "GL_ATI_draw_buffers",                        o(dummy_true),                              
GLL,            2002 },
> -   { "GL_ATI_envmap_bumpmap",                      o(ATI_envmap_bumpmap),                      
GLL,            2001 },
>     { "GL_ATI_fragment_shader",                     o(ATI_fragment_shader),                     
GLL,            2001 },
>     { "GL_ATI_separate_stencil",                    o(ATI_separate_stencil),                    
GLL,            2006 },
>     { "GL_ATI_texture_compression_3dc",             
o(ATI_texture_compression_3dc),             GL,             2004 },
> @@ -461,7 +460,6 @@ _mesa_enable_sw_extensions(struct gl_context *ctx)
>     ctx->Extensions.ARB_vertex_shader = GL_TRUE;
>     ctx->Extensions.ARB_sync = GL_TRUE;
>     ctx->Extensions.APPLE_object_purgeable = GL_TRUE;
> -   ctx->Extensions.ATI_envmap_bumpmap = GL_TRUE;
>     ctx->Extensions.ATI_fragment_shader = GL_TRUE;
>     ctx->Extensions.ATI_texture_compression_3dc = GL_TRUE;
>     ctx->Extensions.ATI_texture_env_combine3 = GL_TRUE;
> diff --git a/src/mesa/main/ff_fragment_shader.cpp 
b/src/mesa/main/ff_fragment_shader.cpp
> index 2115837..2c4f3d7 100644
> --- a/src/mesa/main/ff_fragment_shader.cpp
> +++ b/src/mesa/main/ff_fragment_shader.cpp
> @@ -220,7 +220,6 @@ static GLuint translate_source( GLenum src )
>  #define MODE_MODULATE_SUBTRACT_ATI      12  /* r = a0 * a2 - a1 */
>  #define MODE_ADD_PRODUCTS               13  /* r = a0 * a1 + a2 * a3 */
>  #define MODE_ADD_PRODUCTS_SIGNED        14  /* r = a0 * a1 + a2 * a3 - 0.5 
*/
> -#define MODE_BUMP_ENVMAP_ATI            15  /* special */
>  #define MODE_UNKNOWN                    16
>  
>  /**
> @@ -250,7 +249,6 @@ static GLuint translate_mode( GLenum envMode, GLenum 
mode )
>     case GL_MODULATE_ADD_ATI: return MODE_MODULATE_ADD_ATI;
>     case GL_MODULATE_SIGNED_ADD_ATI: return MODE_MODULATE_SIGNED_ADD_ATI;
>     case GL_MODULATE_SUBTRACT_ATI: return MODE_MODULATE_SUBTRACT_ATI;
> -   case GL_BUMP_ENVMAP_ATI: return MODE_BUMP_ENVMAP_ATI;
>     default:
>        assert(0);
>        return MODE_UNKNOWN;
> @@ -283,7 +281,6 @@ need_saturate( GLuint mode )
>     case MODE_MODULATE_SUBTRACT_ATI:
>     case MODE_ADD_PRODUCTS:
>     case MODE_ADD_PRODUCTS_SIGNED:
> -   case MODE_BUMP_ENVMAP_ATI:
>        return GL_TRUE;
>     default:
>        assert(0);
> @@ -455,16 +452,6 @@ static GLuint make_state_key( struct gl_context *ctx,  
struct state_key *key )
>           key->unit[i].OptRGB[j].Source = translate_source(comb-
>SourceRGB[j]);
>           key->unit[i].OptA[j].Source = translate_source(comb->SourceA[j]);
>        }
> -
> -      if (key->unit[i].ModeRGB == MODE_BUMP_ENVMAP_ATI) {
> -         /* requires some special translation */
> -         key->unit[i].NumArgsRGB = 2;
> -         key->unit[i].ScaleShiftRGB = 0;
> -         key->unit[i].OptRGB[0].Operand = OPR_SRC_COLOR;
> -         key->unit[i].OptRGB[0].Source = SRC_TEXTURE;
> -         key->unit[i].OptRGB[1].Operand = OPR_SRC_COLOR;
> -         key->unit[i].OptRGB[1].Source = texUnit->BumpTarget - GL_TEXTURE0 
+ SRC_TEXTURE0;
> -       }
>     }
>  
>     /* _NEW_LIGHT | _NEW_FOG */
> @@ -753,11 +740,6 @@ emit_combine(texenv_fragment_program *p,
>     case MODE_ADD_PRODUCTS_SIGNED:
>        return add(add(mul(src[0], src[1]), mul(src[2], src[3])),
>  		 new(p->mem_ctx) ir_constant(-0.5f));
> -
> -   case MODE_BUMP_ENVMAP_ATI:
> -      /* special - not handled here */
> -      assert(0);
> -      return src[0];
>     default: 
>        assert(0);
>        return src[0];
> @@ -777,10 +759,6 @@ emit_texenv(texenv_fragment_program *p, GLuint unit)
>     if (!key->unit[unit].enabled) {
>        return get_source(p, SRC_PREVIOUS, 0);
>     }
> -   if (key->unit[unit].ModeRGB == MODE_BUMP_ENVMAP_ATI) {
> -      /* this isn't really a env stage delivering a color and handled 
elsewhere */
> -      return get_source(p, SRC_PREVIOUS, 0);
> -   }
>     
>     switch (key->unit[unit].ModeRGB) {
>     case MODE_DOT3_RGB_EXT:
> @@ -1075,56 +1053,6 @@ load_texunit_sources( texenv_fragment_program *p, 
GLuint unit )
>  }
>  
>  /**
> - * Generate instructions for loading bump map textures.
> - */
> -static void
> -load_texunit_bumpmap( texenv_fragment_program *p, GLuint unit )
> -{
> -   const struct state_key *key = p->state;
> -   GLuint bumpedUnitNr = key->unit[unit].OptRGB[1].Source - SRC_TEXTURE0;
> -   ir_rvalue *bump;
> -   ir_rvalue *texcoord;
> -   ir_variable *rot_mat_0, *rot_mat_1;
> -
> -   rot_mat_0 = p->shader->symbols->get_variable("gl_BumpRotMatrix0MESA");
> -   assert(rot_mat_0);
> -   rot_mat_1 = p->shader->symbols->get_variable("gl_BumpRotMatrix1MESA");
> -   assert(rot_mat_1);
> -
> -   ir_variable *tc_array = p->shader->symbols->get_variable("gl_TexCoord");
> -   assert(tc_array);
> -   texcoord = new(p->mem_ctx) ir_dereference_variable(tc_array);
> -   ir_rvalue *index = new(p->mem_ctx) ir_constant(bumpedUnitNr);
> -   texcoord = new(p->mem_ctx) ir_dereference_array(texcoord, index);
> -   tc_array->data.max_array_access = MAX2(tc_array->data.max_array_access, 
unit);
> -
> -   load_texenv_source( p, unit + SRC_TEXTURE0, unit );
> -
> -   /* Apply rot matrix and add coords to be available in next phase.
> -    * dest = Arg1 + (Arg0.xx * rotMat0) + (Arg0.yy * rotMat1)
> -    * note only 2 coords are affected the rest are left unchanged (mul by 
0)
> -    */
> -   ir_rvalue *bump_x, *bump_y;
> -
> -   texcoord = smear(p, texcoord);
> -
> -   /* bump_texcoord = texcoord */
> -   ir_variable *bumped = p->make_temp(texcoord->type, "bump_texcoord");
> -   p->emit(bumped);
> -   p->emit(assign(bumped, texcoord));
> -
> -   /* bump_texcoord.xy += arg0.x * rotmat0 + arg0.y * rotmat1 */
> -   bump = get_source(p, key->unit[unit].OptRGB[0].Source, unit);
> -   bump_x = mul(swizzle_x(bump), rot_mat_0);
> -   bump_y = mul(swizzle_y(bump->clone(p->mem_ctx, NULL)), rot_mat_1);
> -
> -   p->emit(assign(bumped, add(swizzle_xy(bumped), add(bump_x, bump_y)),
> -		  WRITEMASK_XY));
> -
> -   p->texcoord_tex[bumpedUnitNr] = bumped;
> -}
> -
> -/**
>   * Applies the fog calculations.
>   *
>   * This is basically like the ARB_fragment_prorgam fog options.  Note
> @@ -1214,14 +1142,6 @@ emit_instructions(texenv_fragment_program *p)
>     GLuint unit;
>  
>     if (key->enabled_units) {
> -      /* Zeroth pass - bump map textures first */
> -      for (unit = 0; unit < key->nr_enabled_units; unit++) {
> -	 if (key->unit[unit].enabled &&
> -             key->unit[unit].ModeRGB == MODE_BUMP_ENVMAP_ATI) {
> -	    load_texunit_bumpmap(p, unit);
> -	 }
> -      }
> -
>        /* First pass - to support texture_env_crossbar, first identify
>         * all referenced texture sources and emit texld instructions
>         * for each:
> diff --git a/src/mesa/main/format_pack.c b/src/mesa/main/format_pack.c
> index e3cbfff..6b28592 100644
> --- a/src/mesa/main/format_pack.c
> +++ b/src/mesa/main/format_pack.c
> @@ -1403,27 +1403,6 @@ pack_float_RG_FLOAT16(const GLfloat src[4], void 
*dst)
>  }
>  
>  
> -/* MESA_FORMAT_DUDV8 */
> -
> -static void
> -pack_ubyte_DUDV8(const GLubyte src[4], void *dst)
> -{
> -   /* XXX is this ever used? */
> -   GLushort *d = ((GLushort *) dst);
> -   *d = PACK_COLOR_88(src[0], src[1]);
> -}
> -
> -static void
> -pack_float_DUDV8(const GLfloat src[4], void *dst)
> -{
> -   GLushort *d = ((GLushort *) dst);
> -   GLbyte du, dv;
> -   du = FLOAT_TO_BYTE(CLAMP(src[0], 0.0F, 1.0F));
> -   dv = FLOAT_TO_BYTE(CLAMP(src[1], 0.0F, 1.0F));
> -   *d = PACK_COLOR_88(du, dv);
> -}
> -
> -
>  /* MESA_FORMAT_RGBA_UNORM16 */
>  
>  static void
> @@ -2027,8 +2006,6 @@ _mesa_get_pack_ubyte_rgba_function(mesa_format format)
>        table[MESA_FORMAT_RGBA_UINT16] = NULL; /* pack_ubyte_RGBA_UINT16 */
>        table[MESA_FORMAT_RGBA_UINT32] = NULL; /* pack_ubyte_RGBA_UINT32 */
>  
> -      table[MESA_FORMAT_DUDV8] = pack_ubyte_DUDV8;
> -
>        table[MESA_FORMAT_RGBA_UNORM16] = pack_ubyte_RGBA_16;
>  
>        /* n/a */
> @@ -2194,8 +2171,6 @@ _mesa_get_pack_float_rgba_function(mesa_format format)
>        table[MESA_FORMAT_RGBA_UINT16] = NULL;
>        table[MESA_FORMAT_RGBA_UINT32] = NULL;
>  
> -      table[MESA_FORMAT_DUDV8] = pack_float_DUDV8;
> -
>        table[MESA_FORMAT_RGBA_UNORM16] = pack_float_RGBA_16;
>  
>        table[MESA_FORMAT_R_SNORM8] = pack_float_R_SNORM8;
> diff --git a/src/mesa/main/format_unpack.c b/src/mesa/main/format_unpack.c
> index 9cc8f4d..ad5ea4c 100644
> --- a/src/mesa/main/format_unpack.c
> +++ b/src/mesa/main/format_unpack.c
> @@ -1708,19 +1708,6 @@ unpack_RGBA_UINT32(const void *src, GLfloat dst[][4], 
GLuint n)
>  }
>  
>  static void
> -unpack_DUDV8(const void *src, GLfloat dst[][4], GLuint n)
> -{
> -   const GLbyte *s = (const GLbyte *) src;
> -   GLuint i;
> -   for (i = 0; i < n; i++) {
> -      dst[i][RCOMP] = BYTE_TO_FLOAT(s[i*2+0]);
> -      dst[i][GCOMP] = BYTE_TO_FLOAT(s[i*2+1]);
> -      dst[i][BCOMP] = 0;
> -      dst[i][ACOMP] = 0;
> -   }
> -}
> -
> -static void
>  unpack_R_SNORM8(const void *src, GLfloat dst[][4], GLuint n)
>  {
>     const GLbyte *s = ((const GLbyte *) src);
> @@ -2486,7 +2473,6 @@ get_unpack_rgba_function(mesa_format format)
>        table[MESA_FORMAT_RGB_UINT32] = unpack_RGB_UINT32;
>        table[MESA_FORMAT_RGBA_UINT32] = unpack_RGBA_UINT32;
>  
> -      table[MESA_FORMAT_DUDV8] = unpack_DUDV8;
>        table[MESA_FORMAT_R_SNORM8] = unpack_R_SNORM8;
>        table[MESA_FORMAT_R8G8_SNORM] = unpack_R8G8_SNORM;
>        table[MESA_FORMAT_X8B8G8R8_SNORM] = unpack_X8B8G8R8_SNORM;
> diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c
> index 5c67011..1f20a9a 100644
> --- a/src/mesa/main/formats.c
> +++ b/src/mesa/main/formats.c
> @@ -43,7 +43,7 @@ struct gl_format_info
>     /**
>      * Base format is one of GL_RED, GL_RG, GL_RGB, GL_RGBA, GL_ALPHA,
>      * GL_LUMINANCE, GL_LUMINANCE_ALPHA, GL_INTENSITY, GL_YCBCR_MESA,
> -    * GL_DEPTH_COMPONENT, GL_STENCIL_INDEX, GL_DEPTH_STENCIL, GL_DUDV_ATI.
> +    * GL_DEPTH_COMPONENT, GL_STENCIL_INDEX, GL_DEPTH_STENCIL.
>      */
>     GLenum BaseFormat;
>  
> @@ -415,15 +415,6 @@ static struct gl_format_info 
format_info[MESA_FORMAT_COUNT] =
>  
>     /* Array unorm formats */
>     {
> -      MESA_FORMAT_DUDV8,
> -      "MESA_FORMAT_DUDV8",
> -      GL_DUDV_ATI,
> -      GL_SIGNED_NORMALIZED,
> -      0, 0, 0, 0,
> -      0, 0, 0, 0, 0,
> -      1, 1, 2
> -   },
> -   {
>        MESA_FORMAT_A_UNORM8,        /* Name */
>        "MESA_FORMAT_A_UNORM8",      /* StrName */
>        GL_ALPHA,                    /* BaseFormat */
> @@ -2576,11 +2567,6 @@ _mesa_format_to_type_and_comps(mesa_format format,
>        *comps = 1;
>        return;
>  
> -   case MESA_FORMAT_DUDV8:
> -      *datatype = GL_BYTE;
> -      *comps = 2;
> -      return;
> -
>     case MESA_FORMAT_R_SNORM8:
>     case MESA_FORMAT_A_SNORM8:
>     case MESA_FORMAT_L_SNORM8:
> @@ -3387,10 +3373,6 @@ _mesa_format_matches_format_and_type(mesa_format 
mesa_format,
>     case MESA_FORMAT_RGBA_UINT32:
>        return format == GL_RGBA_INTEGER && type == GL_UNSIGNED_INT && 
!swapBytes;
>  
> -   case MESA_FORMAT_DUDV8:
> -      return (format == GL_DU8DV8_ATI || format == GL_DUDV_ATI) &&
> -             type == GL_BYTE && littleEndian && !swapBytes;
> -
>     case MESA_FORMAT_R_SNORM8:
>        return format == GL_RED && type == GL_BYTE;
>     case MESA_FORMAT_R8G8_SNORM:
> diff --git a/src/mesa/main/formats.h b/src/mesa/main/formats.h
> index 185010e..dc50bc8 100644
> --- a/src/mesa/main/formats.h
> +++ b/src/mesa/main/formats.h
> @@ -211,8 +211,6 @@ typedef enum
>     MESA_FORMAT_YCBCR,            /*                     YYYY YYYY UorV UorV 
*/
>     MESA_FORMAT_YCBCR_REV,        /*                     UorV UorV YYYY YYYY 
*/
>  
> -   MESA_FORMAT_DUDV8,            /*                     DUDU DUDU DVDV DVDV 
*/
> -
>     /* Array unorm formats */
>     MESA_FORMAT_A_UNORM8,      /* ubyte[i] = A */
>     MESA_FORMAT_A_UNORM16,     /* ushort[i] = A */
> diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c
> index aee336e..304d452 100644
> --- a/src/mesa/main/glformats.c
> +++ b/src/mesa/main/glformats.c
> @@ -189,8 +189,6 @@ _mesa_components_in_format(GLenum format)
>     case GL_RG:
>     case GL_YCBCR_MESA:
>     case GL_DEPTH_STENCIL_EXT:
> -   case GL_DUDV_ATI:
> -   case GL_DU8DV8_ATI:
>     case GL_RG_INTEGER:
>        return 2;
>  
> @@ -817,22 +815,6 @@ _mesa_is_depth_or_stencil_format(GLenum format)
>  
>  
>  /**
> - * Test if the given image format is a dudv format.
> - */
> -GLboolean
> -_mesa_is_dudv_format(GLenum format)
> -{
> -   switch (format) {
> -      case GL_DUDV_ATI:
> -      case GL_DU8DV8_ATI:
> -         return GL_TRUE;
> -      default:
> -         return GL_FALSE;
> -   }
> -}
> -
> -
> -/**
>   * Test if an image format is a supported compressed format.
>   * \param format the internal format token provided by the user.
>   * \return GL_TRUE if compressed, GL_FALSE if uncompressed
> @@ -1446,23 +1428,6 @@ _mesa_error_check_format_and_type(const struct 
gl_context *ctx,
>           else
>              return GL_INVALID_ENUM;
>  
> -      case GL_DUDV_ATI:
> -      case GL_DU8DV8_ATI:
> -         if (!ctx->Extensions.ATI_envmap_bumpmap)
> -            return GL_INVALID_ENUM;
> -         switch (type) {
> -            case GL_BYTE:
> -            case GL_UNSIGNED_BYTE:
> -            case GL_SHORT:
> -            case GL_UNSIGNED_SHORT:
> -            case GL_INT:
> -            case GL_UNSIGNED_INT:
> -            case GL_FLOAT:
> -               return GL_NO_ERROR;
> -            default:
> -               return GL_INVALID_ENUM;
> -         }
> -
>        /* integer-valued formats */
>        case GL_RED_INTEGER_EXT:
>        case GL_GREEN_INTEGER_EXT:
> diff --git a/src/mesa/main/glformats.h b/src/mesa/main/glformats.h
> index ccbce2d..d64114e 100644
> --- a/src/mesa/main/glformats.h
> +++ b/src/mesa/main/glformats.h
> @@ -84,9 +84,6 @@ extern GLboolean
>  _mesa_is_depth_or_stencil_format(GLenum format);
>  
>  extern GLboolean
> -_mesa_is_dudv_format(GLenum format);
> -
> -extern GLboolean
>  _mesa_is_compressed_format(struct gl_context *ctx, GLenum format);
>  
>  extern GLenum
> diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
> index 4762d96..97a831e 100644
> --- a/src/mesa/main/mtypes.h
> +++ b/src/mesa/main/mtypes.h
> @@ -1342,8 +1342,6 @@ struct gl_texture_unit
>     GLbitfield _GenFlags;	/**< Bitwise-OR of Gen[STRQ]._ModeBit */
>  
>     GLfloat LodBias;		/**< for biasing mipmap levels */
> -   GLenum BumpTarget;
> -   GLfloat RotMatrix[4]; /* 2x2 matrix */
>  
>     /** Current sampler object (GL_ARB_sampler_objects) */
>     struct gl_sampler_object *Sampler;
> @@ -3358,9 +3356,6 @@ struct gl_constants
>      */
>     GLuint UniformBooleanTrue;
>  
> -   /** Which texture units support GL_ATI_envmap_bumpmap as targets */
> -   GLbitfield SupportedBumpUnits;
> -
>     /**
>      * Maximum amount of time, measured in nanseconds, that the server can 
wait.
>      */
> @@ -3618,7 +3613,6 @@ struct gl_extensions
>     GLboolean AMD_seamless_cubemap_per_texture;
>     GLboolean AMD_vertex_shader_layer;
>     GLboolean APPLE_object_purgeable;
> -   GLboolean ATI_envmap_bumpmap;
>     GLboolean ATI_texture_compression_3dc;
>     GLboolean ATI_texture_mirror_once;
>     GLboolean ATI_texture_env_combine3;
> diff --git a/src/mesa/main/pack.c b/src/mesa/main/pack.c
> index 1df6568..5ebaaf6 100644
> --- a/src/mesa/main/pack.c
> +++ b/src/mesa/main/pack.c
> @@ -420,11 +420,6 @@ get_component_indexes(GLenum format,
>        *blueIndex = 1;
>        *alphaIndex = 0;
>        break;
> -   case GL_DU8DV8_ATI:
> -   case GL_DUDV_ATI:
> -      *redIndex = 0;
> -      *greenIndex = 1;
> -      break;
>     default:
>        assert(0 && "bad format in get_component_indexes()");
>     }
> @@ -1471,13 +1466,6 @@ _mesa_pack_rgba_span_float(struct gl_context *ctx, 
GLuint n, GLfloat rgba[][4],
>                                           rgba[i][BCOMP]);
>                    }
>                    break;
> -               case GL_DUDV_ATI:
> -               case GL_DU8DV8_ATI:
> -                  for (i=0;i<n;i++) {
> -                     dst[i*2+0] = FLOAT_TO_UBYTE(rgba[i][RCOMP]);
> -                     dst[i*2+1] = FLOAT_TO_UBYTE(rgba[i][GCOMP]);
> -                  }
> -                  break;
>                 default:
>                    _mesa_problem(ctx, "bad format in 
_mesa_pack_rgba_span\n");
>              }
> @@ -1628,13 +1616,6 @@ _mesa_pack_rgba_span_float(struct gl_context *ctx, 
GLuint n, GLfloat rgba[][4],
>                                          rgba[i][BCOMP]);
>                    }
>                    break;
> -               case GL_DUDV_ATI:
> -               case GL_DU8DV8_ATI:
> -                  for (i=0;i<n;i++) {
> -                     dst[i*2+0] = FLOAT_TO_BYTE_TEX(rgba[i][RCOMP]);
> -                     dst[i*2+1] = FLOAT_TO_BYTE_TEX(rgba[i][GCOMP]);
> -                  }
> -                  break;
>                 default:
>                    _mesa_problem(ctx, "bad format in 
_mesa_pack_rgba_span\n");
>              }
> @@ -1785,13 +1766,6 @@ _mesa_pack_rgba_span_float(struct gl_context *ctx, 
GLuint n, GLfloat rgba[][4],
>                                            rgba[i][BCOMP]);
>                    }
>                    break;
> -               case GL_DUDV_ATI:
> -               case GL_DU8DV8_ATI:
> -                  for (i=0;i<n;i++) {
> -                     dst[i*2+0] = FLOAT_TO_USHORT(rgba[i][RCOMP]);
> -                     dst[i*2+1] = FLOAT_TO_USHORT(rgba[i][GCOMP]);
> -                  }
> -                  break;
>                 default:
>                    _mesa_problem(ctx, "bad format in 
_mesa_pack_rgba_span\n");
>              }
> @@ -1942,13 +1916,6 @@ _mesa_pack_rgba_span_float(struct gl_context *ctx, 
GLuint n, GLfloat rgba[][4],
>                                           rgba[i][BCOMP]);
>                    }
>                    break;
> -               case GL_DUDV_ATI:
> -               case GL_DU8DV8_ATI:
> -                  for (i=0;i<n;i++) {
> -                     dst[i*2+0] = FLOAT_TO_SHORT_TEX(rgba[i][RCOMP]);
> -                     dst[i*2+1] = FLOAT_TO_SHORT_TEX(rgba[i][GCOMP]);
> -                  }
> -                  break;
>                 default:
>                    _mesa_problem(ctx, "bad format in 
_mesa_pack_rgba_span\n");
>              }
> @@ -2099,13 +2066,6 @@ _mesa_pack_rgba_span_float(struct gl_context *ctx, 
GLuint n, GLfloat rgba[][4],
>                                          rgba[i][BCOMP]);
>                    }
>                    break;
> -               case GL_DUDV_ATI:
> -               case GL_DU8DV8_ATI:
> -                  for (i=0;i<n;i++) {
> -                     dst[i*2+0] = FLOAT_TO_UINT(rgba[i][RCOMP]);
> -                     dst[i*2+1] = FLOAT_TO_UINT(rgba[i][GCOMP]);
> -                  }
> -                  break;
>                 default:
>                    _mesa_problem(ctx, "bad format in 
_mesa_pack_rgba_span\n");
>              }
> @@ -2185,13 +2145,6 @@ _mesa_pack_rgba_span_float(struct gl_context *ctx, 
GLuint n, GLfloat rgba[][4],
>                       dst[i*4+3] = FLOAT_TO_INT(rgba[i][RCOMP]);
>                    }
>                    break;
> -               case GL_DUDV_ATI:
> -               case GL_DU8DV8_ATI:
> -                  for (i=0;i<n;i++) {
> -                     dst[i*2+0] = FLOAT_TO_INT(rgba[i][RCOMP]);
> -                     dst[i*2+1] = FLOAT_TO_INT(rgba[i][GCOMP]);
> -                  }
> -                  break;
>                 case GL_RED_INTEGER_EXT:
>                    for (i=0;i<n;i++) {
>                       dst[i] = (GLint) rgba[i][RCOMP];
> @@ -2342,13 +2295,6 @@ _mesa_pack_rgba_span_float(struct gl_context *ctx, 
GLuint n, GLfloat rgba[][4],
>                       dst[i*4+3] = rgba[i][RCOMP];
>                    }
>                    break;
> -               case GL_DUDV_ATI:
> -               case GL_DU8DV8_ATI:
> -                  for (i=0;i<n;i++) {
> -                     dst[i*2+0] = rgba[i][RCOMP];
> -                     dst[i*2+1] = rgba[i][GCOMP];
> -                  }
> -                  break;
>                 default:
>                    _mesa_problem(ctx, "bad format in 
_mesa_pack_rgba_span\n");
>              }
> @@ -2428,13 +2374,6 @@ _mesa_pack_rgba_span_float(struct gl_context *ctx, 
GLuint n, GLfloat rgba[][4],
>                       dst[i*4+3] = _mesa_float_to_half(rgba[i][RCOMP]);
>                    }
>                    break;
> -               case GL_DUDV_ATI:
> -               case GL_DU8DV8_ATI:
> -                  for (i=0;i<n;i++) {
> -                     dst[i*2+0] = _mesa_float_to_half(rgba[i][RCOMP]);
> -                     dst[i*2+1] = _mesa_float_to_half(rgba[i][GCOMP]);
> -                  }
> -                  break;
>                 default:
>                    _mesa_problem(ctx, "bad format in 
_mesa_pack_rgba_span\n");
>              }
> @@ -3095,13 +3034,6 @@ get_component_mapping(GLenum format,
>        *bDst = 1;
>        *aDst = 0;
>        break;
> -   case GL_DU8DV8_ATI:
> -   case GL_DUDV_ATI:
> -      *rSrc = 0;
> -      *gSrc = 1;
> -      *bSrc = -1;
> -      *aSrc = -1;
> -      break;
>     default:
>        _mesa_problem(NULL, "bad srcFormat %s in get_component_mapping",
>                      _mesa_lookup_enum_by_nr(format));
> @@ -3151,8 +3083,6 @@ extract_float_rgba(GLuint n, GLfloat rgba[][4],
>            srcFormat == GL_RGBA ||
>            srcFormat == GL_BGRA ||
>            srcFormat == GL_ABGR_EXT ||
> -          srcFormat == GL_DU8DV8_ATI ||
> -          srcFormat == GL_DUDV_ATI ||
>            srcFormat == GL_RED_INTEGER_EXT ||
>            srcFormat == GL_GREEN_INTEGER_EXT ||
>            srcFormat == GL_BLUE_INTEGER_EXT ||
> @@ -3768,8 +3698,6 @@ extract_uint_rgba(GLuint n, GLuint rgba[][4],
>            srcFormat == GL_RGBA ||
>            srcFormat == GL_BGRA ||
>            srcFormat == GL_ABGR_EXT ||
> -          srcFormat == GL_DU8DV8_ATI ||
> -          srcFormat == GL_DUDV_ATI ||
>            srcFormat == GL_RED_INTEGER_EXT ||
>            srcFormat == GL_RG_INTEGER ||
>            srcFormat == GL_GREEN_INTEGER_EXT ||
> @@ -4846,71 +4774,6 @@ _mesa_unpack_color_span_uint(struct gl_context *ctx,
>  }
>  
>  
> -
> -/**
> - * Similar to _mesa_unpack_color_span_float(), but for dudv data instead of 
rgba,
> - * directly return GLbyte data, no transfer ops apply.
> - */
> -void
> -_mesa_unpack_dudv_span_byte( struct gl_context *ctx,
> -                             GLuint n, GLenum dstFormat, GLbyte dest[],
> -                             GLenum srcFormat, GLenum srcType,
> -                             const GLvoid *source,
> -                             const struct gl_pixelstore_attrib *srcPacking,
> -                             GLbitfield transferOps )
> -{
> -   ASSERT(dstFormat == GL_DUDV_ATI);
> -   ASSERT(srcFormat == GL_DUDV_ATI ||
> -	  srcFormat == GL_DU8DV8_ATI);
> -
> -   ASSERT(srcType == GL_UNSIGNED_BYTE ||
> -          srcType == GL_BYTE ||
> -          srcType == GL_UNSIGNED_SHORT ||
> -          srcType == GL_SHORT ||
> -          srcType == GL_UNSIGNED_INT ||
> -          srcType == GL_INT ||
> -          srcType == GL_HALF_FLOAT_ARB ||
> -          srcType == GL_FLOAT);
> -
> -   /* general solution */
> -   {
> -      GLint dstComponents;
> -      GLbyte *dst = dest;
> -      GLuint i;
> -      GLfloat (*rgba)[4] = malloc(4 * n * sizeof(GLfloat));
> -
> -      if (!rgba) {
> -         _mesa_error(ctx, GL_OUT_OF_MEMORY, "pixel unpacking");
> -         return;
> -      }
> -
> -      dstComponents = _mesa_components_in_format( dstFormat );
> -      /* source & dest image formats should have been error checked by now 
*/
> -      assert(dstComponents > 0);
> -
> -      /*
> -       * Extract image data and convert to RGBA floats
> -       */
> -      extract_float_rgba(n, rgba, srcFormat, srcType, source,
> -                         srcPacking->SwapBytes);
> -
> -
> -      /* Now determine which color channels we need to produce.
> -       * And determine the dest index (offset) within each color tuple.
> -       */
> -
> -      /* Now pack results in the requested dstFormat */
> -      for (i = 0; i < n; i++) {
> -         /* not sure - need clamp[-1,1] here? */
> -         dst[0] = FLOAT_TO_BYTE(rgba[i][RCOMP]);
> -         dst[1] = FLOAT_TO_BYTE(rgba[i][GCOMP]);
> -         dst += dstComponents;
> -      }
> -
> -      free(rgba);
> -   }
> -}
> -
>  /*
>   * Unpack a row of color index data from a client buffer according to
>   * the pixel unpacking parameters.
> diff --git a/src/mesa/main/pack.h b/src/mesa/main/pack.h
> index ad357ba..2173b65 100644
> --- a/src/mesa/main/pack.h
> +++ b/src/mesa/main/pack.h
> @@ -83,14 +83,6 @@ _mesa_unpack_color_span_uint(struct gl_context *ctx,
>                               const struct gl_pixelstore_attrib 
*srcPacking);
>  
>  extern void
> -_mesa_unpack_dudv_span_byte(struct gl_context *ctx,
> -                            GLuint n, GLenum dstFormat, GLbyte dest[],
> -                            GLenum srcFormat, GLenum srcType,
> -                            const GLvoid *source,
> -                            const struct gl_pixelstore_attrib *srcPacking,
> -                            GLbitfield transferOps);
> -
> -extern void
>  _mesa_unpack_index_span(struct gl_context *ctx, GLuint n,
>                          GLenum dstType, GLvoid *dest,
>                          GLenum srcType, const GLvoid *source,
> diff --git a/src/mesa/main/tests/enum_strings.cpp 
b/src/mesa/main/tests/enum_strings.cpp
> index 2913668..7bcb758 100644
> --- a/src/mesa/main/tests/enum_strings.cpp
> +++ b/src/mesa/main/tests/enum_strings.cpp
> @@ -1116,14 +1116,6 @@ const struct enum_info everything[] = {
>     { 0x8758, "GL_PACK_INVERT_MESA" },
>     { 0x8764, "GL_BUFFER_SIZE" },
>     { 0x8765, "GL_BUFFER_USAGE" },
> -   { 0x8775, "GL_BUMP_ROT_MATRIX_ATI" },
> -   { 0x8776, "GL_BUMP_ROT_MATRIX_SIZE_ATI" },
> -   { 0x8777, "GL_BUMP_NUM_TEX_UNITS_ATI" },
> -   { 0x8778, "GL_BUMP_TEX_UNITS_ATI" },
> -   { 0x8779, "GL_DUDV_ATI" },
> -   { 0x877A, "GL_DU8DV8_ATI" },
> -   { 0x877B, "GL_BUMP_ENVMAP_ATI" },
> -   { 0x877C, "GL_BUMP_TARGET_ATI" },
>     { 0x87FE, "GL_NUM_PROGRAM_BINARY_FORMATS" },
>     { 0x87FF, "GL_PROGRAM_BINARY_FORMATS" },
>     { 0x8800, "GL_STENCIL_BACK_FUNC" },
> diff --git a/src/mesa/main/texenv.c b/src/mesa/main/texenv.c
> index 4848208..ec521e6 100644
> --- a/src/mesa/main/texenv.c
> +++ b/src/mesa/main/texenv.c
> @@ -138,11 +138,6 @@ set_combiner_mode(struct gl_context *ctx,
>        legal = (ctx->API == API_OPENGL_COMPAT &&
>                 ctx->Extensions.ATI_texture_env_combine3);
>        break;
> -   case GL_BUMP_ENVMAP_ATI:
> -      legal = (ctx->API == API_OPENGL_COMPAT &&
> -               ctx->Extensions.ATI_envmap_bumpmap &&
> -               pname == GL_COMBINE_RGB);
> -      break;
>     default:
>        legal = GL_FALSE;
>     }
> @@ -440,26 +435,6 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const 
GLfloat *param )
>        case GL_ALPHA_SCALE:
>           set_combiner_scale(ctx, texUnit, pname, param[0]);
>  	 break;
> -      case GL_BUMP_TARGET_ATI:
> -         if (ctx->API != API_OPENGL_COMPAT || !ctx-
>Extensions.ATI_envmap_bumpmap) {
> -	    _mesa_error( ctx, GL_INVALID_ENUM, "glTexEnv(pname=0x%x)", pname 
);
> -	    return;
> -	 }
> -	 if ((iparam0 < GL_TEXTURE0) ||
> -             (iparam0 > GL_TEXTURE31)) {
> -	    /* spec doesn't say this but it seems logical */
> -	    _mesa_error( ctx, GL_INVALID_ENUM, "glTexEnv(param=0x%x)", 
iparam0);
> -	    return;
> -	 }
> -	 if (!((1 << (iparam0 - GL_TEXTURE0)) & ctx-
>Const.SupportedBumpUnits)) {
> -	    _mesa_error( ctx, GL_INVALID_VALUE, "glTexEnv(param=0x%x)", 
iparam0);
> -	    return;
> -	 }
> -	 else {
> -	    FLUSH_VERTICES(ctx, _NEW_TEXTURE);
> -	    texUnit->BumpTarget = iparam0;
> -	 }
> -	 break;
>        default:
>  	 _mesa_error( ctx, GL_INVALID_ENUM, "glTexEnv(pname)" );
>  	 return;
> @@ -641,16 +616,6 @@ get_texenvi(struct gl_context *ctx, const struct 
gl_texture_unit *texUnit,
>        return 1 << texUnit->Combine.ScaleShiftRGB;
>     case GL_ALPHA_SCALE:
>        return 1 << texUnit->Combine.ScaleShiftA;
> -   case GL_BUMP_TARGET_ATI:
> -      /* spec doesn't say so, but I think this should be queryable */
> -      if (ctx->API == API_OPENGL_COMPAT && ctx-
>Extensions.ATI_envmap_bumpmap) {
> -         return texUnit->BumpTarget;
> -      }
> -      else {
> -         _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)");
> -      }
> -      break;
> -
>     default:
>        _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)");
>        break;
> @@ -784,166 +749,3 @@ _mesa_GetTexEnviv( GLenum target, GLenum pname, GLint 
*params )
>     }
>  }
>  
> -
> -/**
> - * Why does ATI_envmap_bumpmap require new entrypoints? Should just
> - * reuse TexEnv ones...
> - */
> -void GLAPIENTRY
> -_mesa_TexBumpParameterivATI( GLenum pname, const GLint *param )
> -{
> -   GLfloat p[4];
> -   GET_CURRENT_CONTEXT(ctx);
> -
> -   if (!ctx->Extensions.ATI_envmap_bumpmap) {
> -      /* This isn't an "official" error case, but let's tell the user
> -       * that something's wrong.
> -       */
> -      _mesa_error(ctx, GL_INVALID_OPERATION, "glTexBumpParameterivATI");
> -      return;
> -   }
> -
> -   if (pname == GL_BUMP_ROT_MATRIX_ATI) {
> -      /* hope that conversion is correct here */
> -      p[0] = INT_TO_FLOAT( param[0] );
> -      p[1] = INT_TO_FLOAT( param[1] );
> -      p[2] = INT_TO_FLOAT( param[2] );
> -      p[3] = INT_TO_FLOAT( param[3] );
> -   }
> -   else {
> -      p[0] = (GLfloat) param[0];
> -      p[1] = p[2] = p[3] = 0.0F;  /* init to zero, just to be safe */
> -   }
> -   _mesa_TexBumpParameterfvATI( pname, p );
> -}
> -
> -
> -void GLAPIENTRY
> -_mesa_TexBumpParameterfvATI( GLenum pname, const GLfloat *param )
> -{
> -   struct gl_texture_unit *texUnit;
> -   GET_CURRENT_CONTEXT(ctx);
> -
> -   if (!ctx->Extensions.ATI_envmap_bumpmap) {
> -      _mesa_error(ctx, GL_INVALID_OPERATION, "glTexBumpParameterfvATI");
> -      return;
> -   }
> -
> -   texUnit = _mesa_get_current_tex_unit(ctx);
> -
> -   if (pname == GL_BUMP_ROT_MATRIX_ATI) {
> -      if (TEST_EQ_4V(param, texUnit->RotMatrix))
> -         return;
> -      FLUSH_VERTICES(ctx, _NEW_TEXTURE);
> -      COPY_4FV(texUnit->RotMatrix, param);
> -   }
> -   else {
> -      _mesa_error( ctx, GL_INVALID_ENUM, "glTexBumpParameter(pname)" );
> -      return;
> -   }
> -   /* Drivers might want to know about this, instead of dedicated function
> -      just shove it into TexEnv where it really belongs anyway */
> -   if (ctx->Driver.TexEnv) {
> -      (*ctx->Driver.TexEnv)( ctx, 0, pname, param );
> -   }
> -}
> -
> -
> -void GLAPIENTRY
> -_mesa_GetTexBumpParameterivATI( GLenum pname, GLint *param )
> -{
> -   const struct gl_texture_unit *texUnit;
> -   GLuint i;
> -   GET_CURRENT_CONTEXT(ctx);
> -
> -   if (!ctx->Extensions.ATI_envmap_bumpmap) {
> -      _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexBumpParameterivATI");
> -      return;
> -   }
> -
> -   texUnit = _mesa_get_current_tex_unit(ctx);
> -
> -   if (pname == GL_BUMP_ROT_MATRIX_SIZE_ATI) {
> -      /* spec leaves open to support larger matrices.
> -         Don't think anyone would ever want to use it
> -         (and apps almost certainly would not understand it and
> -         thus fail to submit matrices correctly) so hardcode this. */
> -      *param = 4;
> -   }
> -   else if (pname == GL_BUMP_ROT_MATRIX_ATI) {
> -      /* hope that conversion is correct here */
> -      param[0] = FLOAT_TO_INT(texUnit->RotMatrix[0]);
> -      param[1] = FLOAT_TO_INT(texUnit->RotMatrix[1]);
> -      param[2] = FLOAT_TO_INT(texUnit->RotMatrix[2]);
> -      param[3] = FLOAT_TO_INT(texUnit->RotMatrix[3]);
> -   }
> -   else if (pname == GL_BUMP_NUM_TEX_UNITS_ATI) {
> -      GLint count = 0;
> -      for (i = 0; i < ctx-
>Const.Program[MESA_SHADER_FRAGMENT].MaxTextureImageUnits; i++) {
> -         if (ctx->Const.SupportedBumpUnits & (1 << i)) {
> -            count++;
> -         }
> -      }
> -      *param = count;
> -   }
> -   else if (pname == GL_BUMP_TEX_UNITS_ATI) {
> -      for (i = 0; i < ctx-
>Const.Program[MESA_SHADER_FRAGMENT].MaxTextureImageUnits; i++) {
> -         if (ctx->Const.SupportedBumpUnits & (1 << i)) {
> -            *param++ = i + GL_TEXTURE0;
> -         }
> -      }
> -   }
> -   else {
> -      _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexBumpParameter(pname)" );
> -      return;
> -   }
> -}
> -
> -
> -void GLAPIENTRY
> -_mesa_GetTexBumpParameterfvATI( GLenum pname, GLfloat *param )
> -{
> -   const struct gl_texture_unit *texUnit;
> -   GLuint i;
> -   GET_CURRENT_CONTEXT(ctx);
> -
> -   if (!ctx->Extensions.ATI_envmap_bumpmap) {
> -      _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexBumpParameterfvATI");
> -      return;
> -   }
> -
> -   texUnit = _mesa_get_current_tex_unit(ctx);
> -
> -   if (pname == GL_BUMP_ROT_MATRIX_SIZE_ATI) {
> -      /* spec leaves open to support larger matrices.
> -         Don't think anyone would ever want to use it
> -         (and apps might not understand it) so hardcode this. */
> -      *param = 4.0F;
> -   }
> -   else if (pname == GL_BUMP_ROT_MATRIX_ATI) {
> -      param[0] = texUnit->RotMatrix[0];
> -      param[1] = texUnit->RotMatrix[1];
> -      param[2] = texUnit->RotMatrix[2];
> -      param[3] = texUnit->RotMatrix[3];
> -   }
> -   else if (pname == GL_BUMP_NUM_TEX_UNITS_ATI) {
> -      GLint count = 0;
> -      for (i = 0; i < ctx-
>Const.Program[MESA_SHADER_FRAGMENT].MaxTextureImageUnits; i++) {
> -         if (ctx->Const.SupportedBumpUnits & (1 << i)) {
> -            count++;
> -         }
> -      }
> -      *param = (GLfloat) count;
> -   }
> -   else if (pname == GL_BUMP_TEX_UNITS_ATI) {
> -      for (i = 0; i < ctx-
>Const.Program[MESA_SHADER_FRAGMENT].MaxTextureImageUnits; i++) {
> -         if (ctx->Const.SupportedBumpUnits & (1 << i)) {
> -            *param++ = (GLfloat) (i + GL_TEXTURE0);
> -         }
> -      }
> -   }
> -   else {
> -      _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexBumpParameter(pname)" );
> -      return;
> -   }
> -}
> diff --git a/src/mesa/main/texenv.h b/src/mesa/main/texenv.h
> index 46a7ec4..4aa3cb1 100644
> --- a/src/mesa/main/texenv.h
> +++ b/src/mesa/main/texenv.h
> @@ -48,16 +48,4 @@ _mesa_TexEnvi( GLenum target, GLenum pname, GLint param 
);
>  extern void GLAPIENTRY
>  _mesa_TexEnviv( GLenum target, GLenum pname, const GLint *param );
>  
> -extern void GLAPIENTRY
> -_mesa_TexBumpParameterivATI( GLenum pname, const GLint *param );
> -
> -extern void GLAPIENTRY
> -_mesa_TexBumpParameterfvATI( GLenum pname, const GLfloat *param );
> -
> -extern void GLAPIENTRY
> -_mesa_GetTexBumpParameterivATI( GLenum pname, GLint *param );
> -
> -extern void GLAPIENTRY
> -_mesa_GetTexBumpParameterfvATI( GLenum pname, GLfloat *param );
> -
>  #endif /* TEXENV_H */
> diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c
> index d434804..c61a748 100644
> --- a/src/mesa/main/texformat.c
> +++ b/src/mesa/main/texformat.c
> @@ -440,11 +440,6 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum 
target,
>        ASSERT(ctx-
>TextureFormatSupported[MESA_FORMAT_Z32_FLOAT_S8X24_UINT]);
>        return MESA_FORMAT_Z32_FLOAT_S8X24_UINT;
>  
> -   case GL_DUDV_ATI:
> -   case GL_DU8DV8_ATI:
> -      RETURN_IF_SUPPORTED(MESA_FORMAT_DUDV8);
> -      break;
> -
>     case GL_RED_SNORM:
>     case GL_R8_SNORM:
>        RETURN_IF_SUPPORTED(MESA_FORMAT_R_SNORM8);
> diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c
> index 8c0d3a1..f1e09c9 100644
> --- a/src/mesa/main/texgetimage.c
> +++ b/src/mesa/main/texgetimage.c
> @@ -859,11 +859,6 @@ getteximage_error_check(struct gl_context *ctx, GLenum 
target, GLint level,
>        _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexImage(format 
mismatch)");
>        return GL_TRUE;
>     }
> -   else if (_mesa_is_dudv_format(format)
> -            && !_mesa_is_dudv_format(baseFormat)) {
> -      _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexImage(format 
mismatch)");
> -      return GL_TRUE;
> -   }
>     else if (_mesa_is_enum_format_integer(format) !=
>              _mesa_is_format_integer(texImage->TexFormat)) {
>        _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexImage(format 
mismatch)");
> diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
> index cab29c3..a069594 100644
> --- a/src/mesa/main/teximage.c
> +++ b/src/mesa/main/teximage.c
> @@ -255,16 +255,6 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint 
internalFormat )
>        }
>     }
>  
> -   if (ctx->Extensions.ATI_envmap_bumpmap) {
> -      switch (internalFormat) {
> -         case GL_DUDV_ATI:
> -         case GL_DU8DV8_ATI:
> -            return GL_DUDV_ATI;
> -         default:
> -            ; /* fallthrough */
> -      }
> -   }
> -
>     if (ctx->Extensions.EXT_texture_snorm) {
>        switch (internalFormat) {
>           case GL_RED_SNORM:
> @@ -2157,8 +2147,7 @@ texture_error_check( struct gl_context *ctx,
>     colorFormat = _mesa_is_color_format(format);
>     if ((_mesa_is_color_format(internalFormat) && !colorFormat && 
!indexFormat) ||
>         (is_internalFormat_depth_or_depthstencil != 
is_format_depth_or_depthstencil) ||
> -       (_mesa_is_ycbcr_format(internalFormat) != 
_mesa_is_ycbcr_format(format)) ||
> -       (_mesa_is_dudv_format(internalFormat) != 
_mesa_is_dudv_format(format))) {
> +       (_mesa_is_ycbcr_format(internalFormat) != 
_mesa_is_ycbcr_format(format))) {
>        _mesa_error(ctx, GL_INVALID_OPERATION,
>                    "glTexImage%dD(incompatible internalFormat = %s, format = 
%s)",
>                    dimensions, _mesa_lookup_enum_by_nr(internalFormat),
> diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
> index 19508cf..e0f0852 100644
> --- a/src/mesa/main/texstate.c
> +++ b/src/mesa/main/texstate.c
> @@ -91,10 +91,6 @@ _mesa_copy_texture_state( const struct gl_context *src, 
struct gl_context *dst )
>        /* GL_EXT_texture_env_combine */
>        dst->Texture.Unit[u].Combine = src->Texture.Unit[u].Combine;
>  
> -      /* GL_ATI_envmap_bumpmap - need this? */
> -      dst->Texture.Unit[u].BumpTarget = src->Texture.Unit[u].BumpTarget;
> -      COPY_4V(dst->Texture.Unit[u].RotMatrix, src-
>Texture.Unit[u].RotMatrix);
> -
>        /*
>         * XXX strictly speaking, we should compare texture names/ids and
>         * bind textures in the dest context according to id.  For now, only
> @@ -188,7 +184,6 @@ calculate_derived_texenv( struct 
gl_tex_env_combine_state *state,
>     case GL_RG:
>     case GL_RGB:
>     case GL_YCBCR_MESA:
> -   case GL_DUDV_ATI:
>        state->SourceA[0] = GL_PREVIOUS;
>        break;
>        
> @@ -230,7 +225,6 @@ calculate_derived_texenv( struct 
gl_tex_env_combine_state *state,
>        case GL_RG:
>        case GL_RGB:
>        case GL_YCBCR_MESA:
> -      case GL_DUDV_ATI:
>  	 mode_rgb = GL_REPLACE;
>  	 break;
>        case GL_RGBA:
> @@ -259,7 +253,6 @@ calculate_derived_texenv( struct 
gl_tex_env_combine_state *state,
>        case GL_LUMINANCE_ALPHA:
>        case GL_RGBA:
>        case GL_YCBCR_MESA:
> -      case GL_DUDV_ATI:
>  	 state->SourceRGB[2] = GL_TEXTURE;
>  	 state->SourceA[2]   = GL_TEXTURE;
>  	 state->SourceRGB[0] = GL_CONSTANT;
> @@ -443,10 +436,6 @@ update_tex_combine(struct gl_context *ctx, struct 
gl_texture_unit *texUnit)
>     case GL_MODULATE_SUBTRACT_ATI:
>        combine->_NumArgsRGB = 3;
>        break;
> -   case GL_BUMP_ENVMAP_ATI:
> -      /* no real arguments for this case */
> -      combine->_NumArgsRGB = 0;
> -      break;
>     default:
>        combine->_NumArgsRGB = 0;
>        _mesa_problem(ctx, "invalid RGB combine mode in 
update_texture_state");
> @@ -848,7 +837,6 @@ init_texture_unit( struct gl_context *ctx, GLuint unit )
>     texUnit->Combine = default_combine_state;
>     texUnit->_EnvMode = default_combine_state;
>     texUnit->_CurrentCombine = & texUnit->_EnvMode;
> -   texUnit->BumpTarget = GL_TEXTURE0;
>  
>     texUnit->TexGenEnabled = 0x0;
>     texUnit->GenS.Mode = GL_EYE_LINEAR;
> @@ -870,9 +858,6 @@ init_texture_unit( struct gl_context *ctx, GLuint unit )
>     ASSIGN_4V( texUnit->GenR.EyePlane, 0.0, 0.0, 0.0, 0.0 );
>     ASSIGN_4V( texUnit->GenQ.EyePlane, 0.0, 0.0, 0.0, 0.0 );
>  
> -   /* no mention of this in spec, but maybe id matrix expected? */
> -   ASSIGN_4V( texUnit->RotMatrix, 1.0, 0.0, 0.0, 1.0 );
> -
>     /* initialize current texture object ptrs to the shared default objects 
*/
>     for (tex = 0; tex < NUM_TEXTURE_TARGETS; tex++) {
>        _mesa_reference_texobj(&texUnit->CurrentTex[tex],
> diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
> index cb81f3f..d363f9f 100644
> --- a/src/mesa/main/texstore.c
> +++ b/src/mesa/main/texstore.c
> @@ -2061,83 +2061,6 @@ _mesa_texstore_ycbcr(TEXSTORE_PARAMS)
>     return GL_TRUE;
>  }
>  
> -static GLboolean
> -_mesa_texstore_dudv8(TEXSTORE_PARAMS)
> -{
> -   const GLboolean littleEndian = _mesa_little_endian();
> -   const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
> -
> -   ASSERT(dstFormat == MESA_FORMAT_DUDV8);
> -   ASSERT(texelBytes == 2);
> -   ASSERT(ctx->Extensions.ATI_envmap_bumpmap);
> -   ASSERT((srcFormat == GL_DU8DV8_ATI) ||
> -	  (srcFormat == GL_DUDV_ATI));
> -   ASSERT(baseInternalFormat == GL_DUDV_ATI);
> -
> -   if (srcType == GL_BYTE) {
> -      GLubyte dstmap[4];
> -
> -      /* dstmap - how to swizzle from RGBA to dst format:
> -       */
> -      if (littleEndian) {
> -	 dstmap[0] = 0;
> -	 dstmap[1] = 3;
> -      }
> -      else {
> -	 dstmap[0] = 3;
> -	 dstmap[1] = 0;
> -      }
> -      dstmap[2] = ZERO;		/* ? */
> -      dstmap[3] = ONE;		/* ? */
> -      
> -      _mesa_swizzle_ubyte_image(ctx, dims,
> -				GL_LUMINANCE_ALPHA, /* hack */
> -				GL_UNSIGNED_BYTE, /* hack */
> -				GL_LUMINANCE_ALPHA, /* hack */
> -				dstmap, 2,
> -				dstRowStride, dstSlices,
> -				srcWidth, srcHeight, srcDepth, srcAddr,
> -				srcPacking);      
> -   }   
> -   else {
> -      /* general path - note this is defined for 2d textures only */
> -      const GLint components = 
_mesa_components_in_format(baseInternalFormat);
> -      const GLint srcStride = _mesa_image_row_stride(srcPacking, srcWidth,
> -                                                     srcFormat, srcType);
> -      GLbyte *tempImage, *dst, *src;
> -      GLint row;
> -
> -      tempImage = malloc(srcWidth * srcHeight * srcDepth
> -                                          * components * sizeof(GLbyte));
> -      if (!tempImage)
> -         return GL_FALSE;
> -
> -      src = (GLbyte *) _mesa_image_address(dims, srcPacking, srcAddr,
> -                                           srcWidth, srcHeight,
> -                                           srcFormat, srcType,
> -                                           0, 0, 0);
> -
> -      dst = tempImage;
> -      for (row = 0; row < srcHeight; row++) {
> -         _mesa_unpack_dudv_span_byte(ctx, srcWidth, baseInternalFormat,
> -                                     dst, srcFormat, srcType, src,
> -                                     srcPacking, 0);
> -         dst += srcWidth * components;
> -         src += srcStride;
> -      }
> - 
> -      src = tempImage;
> -      dst = (GLbyte *) dstSlices[0];
> -      for (row = 0; row < srcHeight; row++) {
> -         memcpy(dst, src, srcWidth * texelBytes);
> -         dst += dstRowStride;
> -         src += srcWidth * texelBytes;
> -      }
> -      free((void *) tempImage);
> -   }
> -   return GL_TRUE;
> -}
> -
>  
>  /**
>   * Store a texture in a signed normalized 8-bit format.
> @@ -3723,7 +3646,6 @@ _mesa_get_texstore_func(mesa_format format)
>        table[MESA_FORMAT_R_FLOAT16] = _mesa_texstore_rgba_float16;
>        table[MESA_FORMAT_RG_FLOAT32] = _mesa_texstore_rgba_float32;
>        table[MESA_FORMAT_RG_FLOAT16] = _mesa_texstore_rgba_float16;
> -      table[MESA_FORMAT_DUDV8] = _mesa_texstore_dudv8;
>        table[MESA_FORMAT_R_SNORM8] = _mesa_texstore_snorm8;
>        table[MESA_FORMAT_R8G8_SNORM] = _mesa_texstore_snorm88;
>        table[MESA_FORMAT_X8B8G8R8_SNORM] = _mesa_texstore_signed_rgbx8888;
> diff --git a/src/mesa/program/prog_statevars.c 
b/src/mesa/program/prog_statevars.c
> index 5dda8e2..be5ddb1 100644
> --- a/src/mesa/program/prog_statevars.c
> +++ b/src/mesa/program/prog_statevars.c
> @@ -593,28 +593,6 @@ _mesa_fetch_state(struct gl_context *ctx, const 
gl_state_index state[],
>           }
>           return;
>  
> -      case STATE_ROT_MATRIX_0:
> -         {
> -            const int unit = (int) state[2];
> -            GLfloat *rotMat22 = ctx->Texture.Unit[unit].RotMatrix;
> -            value[0] = rotMat22[0]; 
> -            value[1] = rotMat22[2];
> -            value[2] = 0.0;
> -            value[3] = 0.0;
> -         }
> -         return;
> -
> -      case STATE_ROT_MATRIX_1:
> -         {
> -            const int unit = (int) state[2];
> -            GLfloat *rotMat22 = ctx->Texture.Unit[unit].RotMatrix;
> -            value[0] = rotMat22[1];
> -            value[1] = rotMat22[3];
> -            value[2] = 0.0;
> -            value[3] = 0.0;
> -         }
> -         return;
> -
>        /* XXX: make sure new tokens added here are also handled in the 
>         * _mesa_program_state_flags() switch, below.
>         */
> @@ -706,8 +684,6 @@ _mesa_program_state_flags(const gl_state_index 
state[STATE_LENGTH])
>           return _NEW_MODELVIEW;
>  
>        case STATE_TEXRECT_SCALE:
> -      case STATE_ROT_MATRIX_0:
> -      case STATE_ROT_MATRIX_1:
>  	 return _NEW_TEXTURE;
>        case STATE_FOG_PARAMS_OPTIMIZED:
>  	 return _NEW_FOG;
> @@ -933,12 +909,6 @@ append_token(char *dst, gl_state_index k)
>     case STATE_FB_WPOS_Y_TRANSFORM:
>        append(dst, "FbWposYTransform");
>        break;
> -   case STATE_ROT_MATRIX_0:
> -      append(dst, "rotMatrixRow0");
> -      break;
> -   case STATE_ROT_MATRIX_1:
> -      append(dst, "rotMatrixRow1");
> -      break;
>     default:
>        /* probably STATE_INTERNAL_DRIVER+i (driver private state) */
>        append(dst, "driverState");
> diff --git a/src/mesa/program/prog_statevars.h 
b/src/mesa/program/prog_statevars.h
> index 23a9f48..6333e63 100644
> --- a/src/mesa/program/prog_statevars.h
> +++ b/src/mesa/program/prog_statevars.h
> @@ -128,8 +128,6 @@ typedef enum gl_state_index_ {
>     STATE_PT_BIAS,               /**< Pixel transfer RGBA bias */
>     STATE_FB_SIZE,               /**< (width-1, height-1, 0, 0) */
>     STATE_FB_WPOS_Y_TRANSFORM,   /**< (1, 0, -1, height) if a FBO is bound, 
(-1, height, 1, 0) otherwise */
> -   STATE_ROT_MATRIX_0,          /**< ATI_envmap_bumpmap, rot matrix row 0 
*/
> -   STATE_ROT_MATRIX_1,          /**< ATI_envmap_bumpmap, rot matrix row 1 
*/
>     STATE_INTERNAL_DRIVER	/* first available state index for drivers 
(must be last) */
>  } gl_state_index;
>  
> diff --git a/src/mesa/swrast/s_texcombine.c b/src/mesa/swrast/s_texcombine.c
> index c1a152a..5e598bc 100644
> --- a/src/mesa/swrast/s_texcombine.c
> +++ b/src/mesa/swrast/s_texcombine.c
> @@ -429,16 +429,6 @@ texture_combine( struct gl_context *ctx, GLuint unit,
>                                arg1[i][BCOMP]) * scaleRGB;
>  	 }
>           break;
> -      case GL_BUMP_ENVMAP_ATI:
> -         /* this produces a fixed rgba color, and the coord calc is done 
elsewhere */
> -         for (i = 0; i < n; i++) {
> -            /* rgba result is 0,0,0,1 */
> -            rgba[i][RCOMP] = 0.0;
> -            rgba[i][GCOMP] = 0.0;
> -            rgba[i][BCOMP] = 0.0;
> -            rgba[i][ACOMP] = 1.0;
> -	 }
> -         goto end; /* no alpha processing */
>        default:
>           _mesa_problem(ctx, "invalid combine mode");
>        }
> @@ -560,36 +550,6 @@ end:
>  
>  
>  /**
> - * Apply X/Y/Z/W/0/1 swizzle to an array of colors/texels.
> - * See GL_EXT_texture_swizzle.
> - */
> -static void
> -swizzle_texels(GLuint swizzle, GLuint count, float4_array texels)
> -{
> -   const GLuint swzR = GET_SWZ(swizzle, 0);
> -   const GLuint swzG = GET_SWZ(swizzle, 1);
> -   const GLuint swzB = GET_SWZ(swizzle, 2);
> -   const GLuint swzA = GET_SWZ(swizzle, 3);
> -   GLfloat vector[6];
> -   GLuint i;
> -
> -   vector[SWIZZLE_ZERO] = 0;
> -   vector[SWIZZLE_ONE] = 1.0F;
> -
> -   for (i = 0; i < count; i++) {
> -      vector[SWIZZLE_X] = texels[i][0];
> -      vector[SWIZZLE_Y] = texels[i][1];
> -      vector[SWIZZLE_Z] = texels[i][2];
> -      vector[SWIZZLE_W] = texels[i][3];
> -      texels[i][RCOMP] = vector[swzR];
> -      texels[i][GCOMP] = vector[swzG];
> -      texels[i][BCOMP] = vector[swzB];
> -      texels[i][ACOMP] = vector[swzA];
> -   }
> -}
> -
> -
> -/**
>   * Apply texture mapping to a span of fragments.
>   */
>  void
> @@ -653,135 +613,6 @@ _swrast_texture_span( struct gl_context *ctx, SWspan 
*span )
>        }
>     }
>  
> -   /* First must sample all bump maps */
> -   for (unit = 0; unit < ctx->Const.MaxTextureUnits; unit++) {
> -      const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
> -
> -      if (texUnit->_Current &&
> -         texUnit->_CurrentCombine->ModeRGB == GL_BUMP_ENVMAP_ATI) {
> -         const GLfloat (*texcoords)[4] = (const GLfloat (*)[4])
> -            span->array->attribs[VARYING_SLOT_TEX0 + unit];
> -         float4_array targetcoords =
> -            span->array->attribs[VARYING_SLOT_TEX0 +
> -               ctx->Texture.Unit[unit].BumpTarget - GL_TEXTURE0];
> -
> -         const struct gl_sampler_object *samp = _mesa_get_samplerobj(ctx, 
unit);
> -         GLfloat *lambda = span->array->lambda[unit];
> -         float4_array texels = get_texel_array(swrast, unit);
> -         GLuint i;
> -         GLfloat rotMatrix00 = ctx->Texture.Unit[unit].RotMatrix[0];
> -         GLfloat rotMatrix01 = ctx->Texture.Unit[unit].RotMatrix[1];
> -         GLfloat rotMatrix10 = ctx->Texture.Unit[unit].RotMatrix[2];
> -         GLfloat rotMatrix11 = ctx->Texture.Unit[unit].RotMatrix[3];
> -
> -         /* adjust texture lod (lambda) */
> -         if (span->arrayMask & SPAN_LAMBDA) {
> -            if (texUnit->LodBias + samp->LodBias != 0.0F) {
> -               /* apply LOD bias, but don't clamp yet */
> -               const GLfloat bias = CLAMP(texUnit->LodBias + samp->LodBias,
> -                                          -ctx->Const.MaxTextureLodBias,
> -                                          ctx->Const.MaxTextureLodBias);
> -               GLuint i;
> -               for (i = 0; i < span->end; i++) {
> -                  lambda[i] += bias;
> -               }
> -            }
> -
> -            if (samp->MinLod != -1000.0 ||
> -                samp->MaxLod != 1000.0) {
> -               /* apply LOD clamping to lambda */
> -               const GLfloat min = samp->MinLod;
> -               const GLfloat max = samp->MaxLod;
> -               GLuint i;
> -               for (i = 0; i < span->end; i++) {
> -                  GLfloat l = lambda[i];
> -                  lambda[i] = CLAMP(l, min, max);
> -               }
> -            }
> -         }
> -
> -         /* Sample the texture (span->end = number of fragments) */
> -         swrast->TextureSample[unit]( ctx, samp,
> -                                      ctx->Texture.Unit[unit]._Current,
> -                                      span->end, texcoords, lambda, texels 
);
> -
> -         /* manipulate the span values of the bump target
> -            not sure this can work correctly even ignoring
> -            the problem that channel is unsigned */
> -         for (i = 0; i < span->end; i++) {
> -            targetcoords[i][0] += (texels[i][0] * rotMatrix00 + texels[i]
[1] *
> -                                  rotMatrix01) / targetcoords[i][3];
> -            targetcoords[i][1] += (texels[i][0] * rotMatrix10 + texels[i]
[1] *
> -                                  rotMatrix11) / targetcoords[i][3];
> -         }
> -      }
> -   }
> -
> -   /*
> -    * Must do all texture sampling before combining in order to
> -    * accomodate GL_ARB_texture_env_crossbar.
> -    */
> -   for (unit = 0; unit < ctx->Const.MaxTextureUnits; unit++) {
> -      const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
> -      if (texUnit->_Current &&
> -          texUnit->_CurrentCombine->ModeRGB != GL_BUMP_ENVMAP_ATI) {
> -         const GLfloat (*texcoords)[4] = (const GLfloat (*)[4])
> -            span->array->attribs[VARYING_SLOT_TEX0 + unit];
> -         const struct gl_texture_object *curObj = texUnit->_Current;
> -         const struct gl_sampler_object *samp = _mesa_get_samplerobj(ctx, 
unit);
> -         GLfloat *lambda = span->array->lambda[unit];
> -         float4_array texels = get_texel_array(swrast, unit);
> -
> -         /* adjust texture lod (lambda) */
> -         if (span->arrayMask & SPAN_LAMBDA) {
> -            if (texUnit->LodBias + samp->LodBias != 0.0F) {
> -               /* apply LOD bias, but don't clamp yet */
> -               const GLfloat bias = CLAMP(texUnit->LodBias + samp->LodBias,
> -                                          -ctx->Const.MaxTextureLodBias,
> -                                          ctx->Const.MaxTextureLodBias);
> -               GLuint i;
> -               for (i = 0; i < span->end; i++) {
> -                  lambda[i] += bias;
> -               }
> -            }
> -
> -            if (samp->MinLod != -1000.0 ||
> -                samp->MaxLod != 1000.0) {
> -               /* apply LOD clamping to lambda */
> -               const GLfloat min = samp->MinLod;
> -               const GLfloat max = samp->MaxLod;
> -               GLuint i;
> -               for (i = 0; i < span->end; i++) {
> -                  GLfloat l = lambda[i];
> -                  lambda[i] = CLAMP(l, min, max);
> -               }
> -            }
> -         }
> -         else if (samp->MaxAnisotropy > 1.0 &&
> -                  samp->MinFilter == GL_LINEAR_MIPMAP_LINEAR) {
> -            /* sample_lambda_2d_aniso is beeing used as 
texture_sample_func,
> -             * it requires the current SWspan *span as an additional 
parameter.
> -             * In order to keep the same function signature, the unused 
lambda
> -             * parameter will be modified to actually contain the SWspan 
pointer.
> -             * This is a Hack. To make it right, the texture_sample_func
> -             * signature and all implementing functions need to be 
modified.
> -             */
> -            /* "hide" SWspan struct; cast to (GLfloat *) to suppress 
warning */
> -            lambda = (GLfloat *)span;
> -         }
> -
> -         /* Sample the texture (span->end = number of fragments) */
> -         swrast->TextureSample[unit]( ctx, samp,
> -                                      ctx->Texture.Unit[unit]._Current,
> -                                      span->end, texcoords, lambda, texels 
);
> -
> -         /* GL_EXT_texture_swizzle */
> -         if (curObj->_Swizzle != SWIZZLE_NOOP) {
> -            swizzle_texels(curObj->_Swizzle, span->end, texels);
> -         }
> -      }
> -   }
> -
>     /*
>      * OK, now apply the texture (aka texture combine/blend).
>      * We modify the span->color.rgba values.
> diff --git a/src/mesa/swrast/s_texfetch.c b/src/mesa/swrast/s_texfetch.c
> index 90a514c..e508368 100644
> --- a/src/mesa/swrast/s_texfetch.c
> +++ b/src/mesa/swrast/s_texfetch.c
> @@ -210,7 +210,6 @@ texfetch_funcs[] =
>     },
>     FETCH_FUNCS(YCBCR),
>     FETCH_FUNCS(YCBCR_REV),
> -   FETCH_FUNCS(DUDV8),
>  
>     /* Array unorm formats */
>     FETCH_FUNCS(A_UNORM8),
> diff --git a/src/mesa/swrast/s_texfetch_tmp.h 
b/src/mesa/swrast/s_texfetch_tmp.h
> index d48e39b..deda592 100644
> --- a/src/mesa/swrast/s_texfetch_tmp.h
> +++ b/src/mesa/swrast/s_texfetch_tmp.h
> @@ -888,22 +888,6 @@ FETCH(RGBA_UINT32)(const struct swrast_texture_image 
*texImage,
>  }
>  
>  
> -/**
> - * This format by definition produces 0,0,0,1 as rgba values,
> - * however we'll return the dudv values as rg and fix up elsewhere.
> - */
> -static void
> -FETCH(DUDV8)(const struct swrast_texture_image *texImage,
> -             GLint i, GLint j, GLint k, GLfloat *texel)
> -{
> -   const GLbyte *src = TEXEL_ADDR(GLbyte, texImage, i, j, k, 2);
> -   texel[RCOMP] = BYTE_TO_FLOAT(src[0]);
> -   texel[GCOMP] = BYTE_TO_FLOAT(src[1]);
> -   texel[BCOMP] = 0;
> -   texel[ACOMP] = 0;
> -}
> -
> -
>  static void
>  FETCH(R_SNORM8)(const struct swrast_texture_image *texImage,
>                  GLint i, GLint j, GLint k, GLfloat *texel)
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140627/24402a32/attachment-0001.sig>


More information about the mesa-dev mailing list