summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/tdfx
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-10-24 16:28:24 -0600
committerBrian Paul <[email protected]>2009-10-24 16:28:27 -0600
commit35efc6a1b3e3dada2cf9bd3a503c1b84f4bcb7f5 (patch)
tree408a7188c107636f95683e8d3d3688c271a00a0f /src/mesa/drivers/dri/tdfx
parentbea245ac2fecc312caec8f4af53174e4fb180103 (diff)
mesa: change compressed texture size calls
Replace calls to ctx->Driver.CompressedTextureSize with calls to _mesa_format_image_size. The former always called the later.
Diffstat (limited to 'src/mesa/drivers/dri/tdfx')
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_tex.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_tex.c b/src/mesa/drivers/dri/tdfx/tdfx_tex.c
index 0cd9051613b..63783d6ecd8 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_tex.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_tex.c
@@ -1408,11 +1408,8 @@ tdfxTexImage2D(GLcontext *ctx, GLenum target, GLint level,
texelBytes = _mesa_get_format_bytes(texImage->TexFormat);
if (_mesa_is_format_compressed(texImage->TexFormat)) {
- GLuint compressedSize = ctx->Driver.CompressedTextureSize(ctx,
- mml->width,
- mml->height,
- 1,
- mesaFormat);
+ GLuint compressedSize = _mesa_format_image_size(mesaFormat, mml->width,
+ mml->height, 1);
dstRowStride = _mesa_compressed_row_stride(texImage->TexFormat, mml->width);
texImage->Data = _mesa_alloc_texmemory(compressedSize);
} else {
@@ -1637,11 +1634,8 @@ tdfxCompressedTexImage2D (GLcontext *ctx, GLenum target,
/* allocate new storage for texture image, if needed */
if (!texImage->Data) {
- compressedSize = ctx->Driver.CompressedTextureSize(ctx,
- mml->width,
- mml->height,
- 1,
- mesaFormat);
+ compressedSize = _mesa_format_image_size(mesaFormat, mml->width,
+ mml->height, 1);
texImage->Data = _mesa_alloc_texmemory(compressedSize);
if (!texImage->Data) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage2D");