summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
diff options
context:
space:
mode:
authorRoland Scheidegger <sroland@vmware.com>2009-08-04 00:21:07 +0200
committerRoland Scheidegger <sroland@vmware.com>2009-08-04 00:21:07 +0200
commit50c736589ee0edbedf9ac434e883483b82b3030a (patch)
treee8cbb9bfcc636c155461307fd8e2d99ce44053c4 /src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
parent4221e81b2489c4c91092ef49bba181a1bed216c8 (diff)
radeon: more fixes for compressed textures
- fix not respecting required hardware stride with compressedTexImage - this fixes #22615. - make sure correct stride is used in various places - fix stored miptree never matching with a TexImage call with compressed texture - don't always store data with compressedtexsubimage at offset 0, and actually use the supplied pixel data... (untested) - make sure rows for compressed texture handling are rounded up not down Note that trying to access stored compressed textures in hardware miptrees from core mesa (get_compressed_teximage, swrast fallbacks) can't work correctly, since RowStride isn't really set to anything useful, plus some places (at least get_compressed_teximage) assume this data has native stride and no padding.
Diffstat (limited to 'src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
index 071a18e7d8..02e0dc7774 100644
--- a/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
+++ b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
@@ -366,8 +366,8 @@ GLboolean radeon_miptree_matches_texture(radeon_mipmap_tree *mt, struct gl_textu
mt->width0 == firstImage->Width &&
mt->height0 == firstImage->Height &&
mt->depth0 == firstImage->Depth &&
- mt->bpp == firstImage->TexFormat->TexelBytes &&
- mt->compressed == compressed);
+ mt->compressed == compressed &&
+ (!mt->compressed ? (mt->bpp == firstImage->TexFormat->TexelBytes) : 1));
}