From b6bdafdf2cf1110b4a5ca7cf9e1c3dcb124b800f Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 1 Oct 2009 16:29:44 -0600 Subject: mesa: remove gl_texture_image::IsCompressed field Use _mesa_is_format_compressed() instead. --- src/mesa/main/mipmap.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/mesa/main/mipmap.c') diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c index ccd153303d..f6d6ce33c8 100644 --- a/src/mesa/main/mipmap.c +++ b/src/mesa/main/mipmap.c @@ -1511,7 +1511,7 @@ _mesa_generate_mipmap(GLcontext *ctx, GLenum target, ASSERT(maxLevels > 0); /* bad target */ /* Find convertFormat - the format that do_row() will process */ - if (srcImage->IsCompressed) { + if (_mesa_is_format_compressed(srcImage->TexFormat)) { /* setup for compressed textures */ GLuint row; GLint components, size; @@ -1589,7 +1589,7 @@ _mesa_generate_mipmap(GLcontext *ctx, GLenum target, &dstWidth, &dstHeight, &dstDepth); if (!nextLevel) { /* all done */ - if (srcImage->IsCompressed) { + if (_mesa_is_format_compressed(srcImage->TexFormat)) { _mesa_free((void *) srcData); _mesa_free(dstData); } @@ -1614,8 +1614,7 @@ _mesa_generate_mipmap(GLcontext *ctx, GLenum target, dstImage->TexFormat = srcImage->TexFormat; dstImage->FetchTexelc = srcImage->FetchTexelc; dstImage->FetchTexelf = srcImage->FetchTexelf; - dstImage->IsCompressed = srcImage->IsCompressed; - if (dstImage->IsCompressed) { + if (_mesa_is_format_compressed(dstImage->TexFormat)) { dstImage->CompressedSize = ctx->Driver.CompressedTextureSize(ctx, dstImage->Width, dstImage->Height, @@ -1631,7 +1630,7 @@ _mesa_generate_mipmap(GLcontext *ctx, GLenum target, /* Alloc new teximage data buffer. * Setup src and dest data pointers. */ - if (dstImage->IsCompressed) { + if (_mesa_is_format_compressed(dstImage->TexFormat)) { dstImage->Data = _mesa_alloc_texmemory(dstImage->CompressedSize); if (!dstImage->Data) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "generating mipmaps"); @@ -1661,7 +1660,7 @@ _mesa_generate_mipmap(GLcontext *ctx, GLenum target, dstData, dstImage->RowStride); - if (dstImage->IsCompressed) { + if (_mesa_is_format_compressed(dstImage->TexFormat)) { GLubyte *temp; /* compress image from dstData into dstImage->Data */ const GLenum srcFormat = _mesa_get_format_base_format(convertFormat); -- cgit v1.2.3