From 919498e41c7fd766165db6905ca2f36449d27522 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 17 Jun 2004 13:42:45 +0000 Subject: Fix up texture compression mipmapping .. not sure if it fixes FXT1 but with S3TC patch it fixes those --- src/mesa/drivers/dri/i830/i830_texstate.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/mesa/drivers/dri/i830/i830_texstate.c') diff --git a/src/mesa/drivers/dri/i830/i830_texstate.c b/src/mesa/drivers/dri/i830/i830_texstate.c index 6b8193c924..d5440141bf 100644 --- a/src/mesa/drivers/dri/i830/i830_texstate.c +++ b/src/mesa/drivers/dri/i830/i830_texstate.c @@ -159,8 +159,16 @@ static void i830SetTexImages( i830ContextPtr imesa, break; t->image[0][i].offset = total_height * pitch; + if (t->image[0][i].image->IsCompressed) + { + if (t->image[0][i].image->Height > 4) + total_height += t->image[0][i].image->Height/4; + else + total_height += 1; + } + else + total_height += t->image[0][i].image->Height; t->image[0][i].internalFormat = baseImage->Format; - total_height += t->image[0][i].image->Height; } t->Pitch = pitch; -- cgit v1.2.3