summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/glide/fxddtex.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/drivers/glide/fxddtex.c
parent040fd7ed44c21a1faaa6475888e9365e8f0de42b (diff)
mesa: remove gl_texture_image::IsCompressed field
Use _mesa_is_format_compressed() instead.
Diffstat (limited to 'src/mesa/drivers/glide/fxddtex.c')
-rw-r--r--src/mesa/drivers/glide/fxddtex.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/mesa/drivers/glide/fxddtex.c b/src/mesa/drivers/glide/fxddtex.c
index a64b6a5553..a820cb818e 100644
--- a/src/mesa/drivers/glide/fxddtex.c
+++ b/src/mesa/drivers/glide/fxddtex.c
@@ -1234,7 +1234,7 @@ adjust2DRatio (GLcontext *ctx,
const GLint newHeight = height * mml->hScale;
GLvoid *tempImage;
- if (!texImage->IsCompressed) {
+ if (!_mesa_is_format_compressed(texImage->TexFormat)) {
GLubyte *destAddr;
tempImage = MALLOC(width * height * texelBytes);
@@ -1353,7 +1353,7 @@ fxDDTexImage2D(GLcontext * ctx, GLenum target, GLint level,
#if FX_COMPRESS_S3TC_AS_FXT1_HACK
/* [koolsmoky] substitute FXT1 for DXTn and Legacy S3TC */
- if (!ctx->Mesa_DXTn && texImage->IsCompressed) {
+ if (!ctx->Mesa_DXTn && _mesa_is_format_compressed(texImage->TexFormat)) {
switch (internalFormat) {
case GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
case GL_RGB_S3TC:
@@ -1380,7 +1380,6 @@ fxDDTexImage2D(GLcontext * ctx, GLenum target, GLint level,
}
if (texNapalm) {
texImage->InternalFormat = internalFormat = texNapalm;
- texImage->IsCompressed = GL_TRUE;
}
}
#endif
@@ -1397,7 +1396,7 @@ fxDDTexImage2D(GLcontext * ctx, GLenum target, GLint level,
/* allocate mipmap buffer */
assert(!texImage->Data);
- if (texImage->IsCompressed) {
+ if (_mesa_is_format_compressed(texImage->TexFormat)) {
texImage->CompressedSize = _mesa_compressed_texture_size(ctx,
mml->width,
mml->height,
@@ -1451,7 +1450,7 @@ fxDDTexImage2D(GLcontext * ctx, GLenum target, GLint level,
const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
const GLint maxLevels = _mesa_max_texture_levels(ctx, texObj->Target);
- assert(!texImage->IsCompressed);
+ assert(!_mesa_is_format_compressed(texImage->TexFormat));
while (level < texObj->MaxLevel && level < maxLevels - 1) {
mipWidth = width / 2;
@@ -1523,7 +1522,7 @@ fxDDTexSubImage2D(GLcontext * ctx, GLenum target, GLint level,
assert(texImage->_BaseFormat);
texelBytes = _mesa_get_format_bytes(texImage->TexFormat->MesaFormat);
- if (texImage->IsCompressed) {
+ if (_mesa_is_format_compressed(texImage->TexFormat)) {
dstRowStride = _mesa_compressed_row_stride(texImage->InternalFormat, mml->width);
} else {
dstRowStride = mml->width * texelBytes;
@@ -1564,7 +1563,7 @@ fxDDTexSubImage2D(GLcontext * ctx, GLenum target, GLint level,
const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
const GLint maxLevels = _mesa_max_texture_levels(ctx, texObj->Target);
- assert(!texImage->IsCompressed);
+ assert(!_mesa_is_format_compressed(texImage->TexFormat));
width = texImage->Width;
height = texImage->Height;
@@ -1620,7 +1619,7 @@ fxDDCompressedTexImage2D (GLcontext *ctx, GLenum target,
width, height);
}
- assert(texImage->IsCompressed);
+ assert(_mesa_is_format_compressed(texImage->TexFormat));
if (!fxIsTexSupported(target, internalFormat, texImage)) {
_mesa_problem(NULL, "fx Driver: unsupported texture in fxDDCompressedTexImg()\n");
@@ -1712,7 +1711,7 @@ fxDDCompressedTexImage2D (GLcontext *ctx, GLenum target,
/* GL_SGIS_generate_mipmap */
if (level == texObj->BaseLevel && texObj->GenerateMipmap) {
- assert(!texImage->IsCompressed);
+ assert(!_mesa_is_format_compressed(texImage->TexFormat));
}
fxTexInvalidate(ctx, texObj);
@@ -1777,7 +1776,7 @@ fxDDCompressedTexSubImage2D( GLcontext *ctx, GLenum target,
/* GL_SGIS_generate_mipmap */
if (level == texObj->BaseLevel && texObj->GenerateMipmap) {
- assert(!texImage->IsCompressed);
+ assert(!_mesa_is_format_compressed(texImage->TexFormat));
}
if (ti->validated && ti->isInTM)