summaryrefslogtreecommitdiff
path: root/src/mesa/main/mipmap.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-10-01 16:29:44 -0600
committerBrian Paul <brianp@vmware.com>2009-10-01 16:29:44 -0600
commitb6bdafdf2cf1110b4a5ca7cf9e1c3dcb124b800f (patch)
treeaf668a98fe8ec899b8da9c25533f299c5c3f90d1 /src/mesa/main/mipmap.c
parent040fd7ed44c21a1faaa6475888e9365e8f0de42b (diff)
mesa: remove gl_texture_image::IsCompressed field
Use _mesa_is_format_compressed() instead.
Diffstat (limited to 'src/mesa/main/mipmap.c')
-rw-r--r--src/mesa/main/mipmap.c11
1 files changed, 5 insertions, 6 deletions
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);