summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/radeon/radeon_texture.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/radeon/radeon_texture.c')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_texture.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c
index ce393ffeb6..2c28011057 100644
--- a/src/mesa/drivers/dri/radeon/radeon_texture.c
+++ b/src/mesa/drivers/dri/radeon/radeon_texture.c
@@ -547,13 +547,7 @@ static void radeon_teximage(
if (_mesa_is_format_compressed(texImage->TexFormat)) {
texelBytes = 0;
- texImage->CompressedSize =
- ctx->Driver.CompressedTextureSize(ctx, texImage->Width,
- texImage->Height, texImage->Depth,
- texImage->TexFormat);
} else {
- texImage->CompressedSize = 0;
-
texelBytes = _mesa_get_format_bytes(texImage->TexFormat);
/* Minimum pitch of 32 bytes */
if (postConvWidth * texelBytes < 32) {
@@ -590,7 +584,12 @@ static void radeon_teximage(
} else {
int size;
if (_mesa_is_format_compressed(texImage->TexFormat)) {
- size = texImage->CompressedSize;
+ size = ctx->Driver.CompressedTextureSize(ctx,
+ texImage->Width,
+ texImage->Height,
+ texImage->Depth,
+ texImage->TexFormat);
+
} else {
size = texImage->Width * texImage->Height * texImage->Depth * _mesa_get_format_bytes(texImage->TexFormat);
}