i965: add support for ATI_envmap_bumpmap
authorRoland Scheidegger <sroland@vmware.com>
Thu, 12 Mar 2009 14:06:17 +0000 (15:06 +0100)
committerRoland Scheidegger <sroland@vmware.com>
Thu, 12 Mar 2009 14:06:17 +0000 (15:06 +0100)
src/mesa/drivers/dri/i965/brw_wm_surface_state.c
src/mesa/drivers/dri/intel/intel_extensions.c
src/mesa/drivers/dri/intel/intel_tex_format.c

index e402fdf0ee0b2b86064bd0a8e4f3a305bf645071..9b320480b6d0411862f569230c008ba8362585da 100644 (file)
@@ -149,6 +149,9 @@ static GLuint translate_tex_format( GLuint mesa_format, GLenum depth_mode )
       else
          return BRW_SURFACEFORMAT_L24X8_UNORM;
 
+   case MESA_FORMAT_DUDV8:
+      return BRW_SURFACEFORMAT_R8G8_SNORM;
+
    default:
       assert(0);
       return 0;
index 9058e48bc5d81723e65691644945ec5b9bfb182d..8dd0b2461bde3a826f242e0db3fcefedc63d6588 100644 (file)
@@ -49,6 +49,7 @@
 #define need_GL_EXT_secondary_color
 #define need_GL_EXT_stencil_two_side
 #define need_GL_ATI_separate_stencil
+#define need_GL_ATI_envmap_bumpmap
 #define need_GL_NV_point_sprite
 #define need_GL_NV_vertex_program
 #define need_GL_VERSION_2_0
@@ -138,6 +139,7 @@ static const struct dri_extension brw_extensions[] = {
    { "GL_EXT_texture_sRGB",              NULL },
    { "GL_EXT_texture_swizzle",           NULL },
    { "GL_EXT_vertex_array_bgra",         NULL },
+   { "GL_ATI_envmap_bumpmap",             GL_ATI_envmap_bumpmap_functions },
    { "GL_ATI_separate_stencil",           GL_ATI_separate_stencil_functions },
    { "GL_ATI_texture_env_combine3",       NULL },
    { "GL_NV_texture_env_combine4",        NULL },
index 2d57c6784815de1350a0121d3838a98237f2a68a..8732354e7a5c42eff2da528dbfee76282a7d08a3 100644 (file)
@@ -174,6 +174,10 @@ intelChooseTextureFormat(GLcontext * ctx, GLint internalFormat,
    case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:
    case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:
       return &_mesa_texformat_srgb_dxt1;
+
+   case GL_DUDV_ATI:
+   case GL_DU8DV8_ATI:
+      return &_mesa_texformat_dudv8;
 #endif
 
    default: