gallium: state tracker fixes for compressed textures
authorRoland Scheidegger <sroland@tungstengraphics.com>
Fri, 4 Apr 2008 19:10:07 +0000 (21:10 +0200)
committerRoland Scheidegger <sroland@tungstengraphics.com>
Fri, 4 Apr 2008 19:10:15 +0000 (21:10 +0200)
src/mesa/state_tracker/st_cb_texture.c
src/mesa/state_tracker/st_format.c

index d0bc234f36573f92e8c29005d354d5c2161858a7..43b43ec14cbade5bbf99b381ff75caebf4f74344 100644 (file)
@@ -1519,6 +1519,7 @@ st_init_texture_functions(struct dd_function_table *functions)
    /* compressed texture functions */
    functions->CompressedTexImage2D = st_CompressedTexImage2D;
    functions->GetCompressedTexImage = st_GetCompressedTexImage;
+   functions->CompressedTextureSize = _mesa_compressed_texture_size;
 
    functions->NewTextureObject = st_NewTextureObject;
    functions->NewTextureImage = st_NewTextureImage;
index 761645c10571bcb3abbb50b5b3bda010e2d1a763..20defd5e164501aedd281e24395e854b98c3a1c0 100644 (file)
@@ -276,6 +276,14 @@ st_mesa_format_to_pipe_format(GLuint mesaFormat)
       return PIPE_FORMAT_Z24S8_UNORM;
    case MESA_FORMAT_YCBCR:
       return PIPE_FORMAT_YCBCR;
+   case MESA_FORMAT_RGB_DXT1:
+      return PIPE_FORMAT_DXT1_RGB;
+   case MESA_FORMAT_RGBA_DXT1:
+      return PIPE_FORMAT_DXT1_RGBA;
+   case MESA_FORMAT_RGBA_DXT3:
+      return PIPE_FORMAT_DXT3_RGBA;
+   case MESA_FORMAT_RGBA_DXT5:
+      return PIPE_FORMAT_DXT5_RGBA;
    default:
       assert(0);
       return 0;