mesa: use _mesa_get_format_base_format()
authorBrian Paul <brianp@vmware.com>
Mon, 28 Sep 2009 01:51:45 +0000 (19:51 -0600)
committerBrian Paul <brianp@vmware.com>
Mon, 28 Sep 2009 01:51:45 +0000 (19:51 -0600)
src/mesa/drivers/common/meta.c

index b445323aabefb0872a4a5a4dbc24dece521d2aa4..94cfdfe53336042f9cf9a8e2477e02724aa94c0b 100644 (file)
@@ -43,6 +43,7 @@
 #include "main/depth.h"
 #include "main/enable.h"
 #include "main/fbobject.h"
+#include "main/formats.h"
 #include "main/image.h"
 #include "main/macros.h"
 #include "main/matrix.h"
@@ -2406,7 +2407,7 @@ copy_tex_sub_image(GLcontext *ctx, GLuint dims, GLenum target, GLint level,
    texObj = _mesa_select_tex_object(ctx, texUnit, target);
    texImage = _mesa_select_tex_image(ctx, texObj, target, level);
 
-   format = texImage->TexFormat->BaseFormat;
+   format = _mesa_get_format_base_format(texImage->TexFormat->MesaFormat);
    type = get_temp_image_type(ctx, format);
    bpp = _mesa_bytes_per_pixel(format, type);
    if (bpp <= 0) {