diff options
author | Dave Airlie <airliedfreedesktop.org> | 2005-12-13 19:53:28 +0000 |
---|---|---|
committer | Dave Airlie <airliedfreedesktop.org> | 2005-12-13 19:53:28 +0000 |
commit | c9797f6b76a5d34a4bdbab49ef8158ca861e0c01 (patch) | |
tree | 5e5762edd9fd0e3eb763d2356b774e24976d5d3c /src/mesa/drivers/dri | |
parent | 0063084804d62402d80821a86978660663955442 (diff) |
fix from Roland for mipmapped compressed textures
remove some debug
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_texstate.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_texstate.c b/src/mesa/drivers/dri/r300/r300_texstate.c index 1ec3b315104..0c45ce56123 100644 --- a/src/mesa/drivers/dri/r300/r300_texstate.c +++ b/src/mesa/drivers/dri/r300/r300_texstate.c @@ -226,7 +226,7 @@ static void r300SetTexImages(r300ContextPtr rmesa, /* find image size in bytes */ if (texImage->IsCompressed) { if ((t->format & R300_TX_FORMAT_DXT1) == R300_TX_FORMAT_DXT1) { - fprintf(stderr,"DXT 1 %d %08X\n", texImage->Width, t->format); + // fprintf(stderr,"DXT 1 %d %08X\n", texImage->Width, t->format); if ((texImage->Width + 3) < 8) /* width one block */ size = texImage->CompressedSize * 4; else if ((texImage->Width + 3) < 16) @@ -235,7 +235,7 @@ static void r300SetTexImages(r300ContextPtr rmesa, } else /* DXT3/5, 16 bytes per block */ { - fprintf(stderr,"DXT 3/5 %d\n", texImage->Width); + // fprintf(stderr,"DXT 3/5 %d\n", texImage->Width); if ((texImage->Width + 3) < 8) size = texImage->CompressedSize * 2; else size = texImage->CompressedSize; @@ -370,9 +370,11 @@ static void r300SetTexImages(r300ContextPtr rmesa, * requires 64-byte aligned pitches, and we may/may not need the * blitter. NPOT only! */ - if (baseImage->IsCompressed) + if (baseImage->IsCompressed) { t->pitch = (tObj->Image[0][t->base.firstLevel]->Width + 63) & ~(63); + t->size |= ((log2Width>log2Height)?log2Width:log2Height)<<R300_TX_SIZE_SHIFT; + } else if (tObj->Target == GL_TEXTURE_RECTANGLE_NV) { unsigned int align = blitWidth - 1; t->pitch = ((tObj->Image[0][t->base.firstLevel]->Width * |