#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"
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) {