radeon: fix npot mipmap alignment on r600
authorAndre Maasikas <amaasikas@gmail.com>
Mon, 9 Aug 2010 11:37:01 +0000 (14:37 +0300)
committerAndre Maasikas <amaasikas@gmail.com>
Mon, 9 Aug 2010 11:37:01 +0000 (14:37 +0300)
seems it got lost in commit 0d383547
have no earlier radeons to test, but npot mipmaps were not supported there?

src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c

index c877e6c1765a957a694a381f0907db610237707a..c6e5f110ea314f92abff4e7b767ec44de3968d37 100644 (file)
@@ -133,7 +133,7 @@ static void compute_tex_image_offset(radeonContextPtr rmesa, radeon_mipmap_tree
        height = _mesa_next_pow_two_32(lvl->height);
 
        lvl->rowstride = get_texture_image_row_stride(rmesa, mt->mesaFormat, lvl->width, mt->tilebits);
-       lvl->size = get_texture_image_size(mt->mesaFormat, lvl->rowstride, lvl->height, lvl->depth, mt->tilebits);
+       lvl->size = get_texture_image_size(mt->mesaFormat, lvl->rowstride, height, lvl->depth, mt->tilebits);
 
        assert(lvl->size > 0);