summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r300/r300_texture.c
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2009-10-31 07:23:00 +0100
committerJoakim Sindholt <opensource@zhasha.com>2009-10-31 07:30:48 +0100
commitc9928ac3ee5dc0d10127388f9312779a6c59da7c (patch)
tree60dea626ec9933049f81530096c6304e5cadd1d8 /src/gallium/drivers/r300/r300_texture.c
parent3f60130b87a4a75f1b7cb6e0b854001bbe8f7ec8 (diff)
r300g: correct the pitch calculation for smaller mipmaps
Diffstat (limited to 'src/gallium/drivers/r300/r300_texture.c')
-rw-r--r--src/gallium/drivers/r300/r300_texture.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c
index 7199918a84..aea25cf71d 100644
--- a/src/gallium/drivers/r300/r300_texture.c
+++ b/src/gallium/drivers/r300/r300_texture.c
@@ -136,12 +136,7 @@ static void r300_setup_miptree(struct r300_texture* tex)
tex->offset[i] = align(tex->size, 32);
tex->size = tex->offset[i] + size;
tex->layer_size[i] = layer_size;
-
- if (tex->is_npot) {
- tex->pitch[i] = stride / base->block.size;
- } else {
- tex->pitch[i] = base->width[i];
- }
+ tex->pitch[i] = stride / base->block.size;
debug_printf("r300: Texture miptree: Level %d "
"(%dx%dx%d px, pitch %d bytes)\n",