Mesa (master): radeon: fix miptree comparison breakage

Roland Scheidegger sroland at kemper.freedesktop.org
Tue Aug 4 23:14:32 UTC 2009


Module: Mesa
Branch: master
Commit: 15f5f839b1a52a49bb60e73625b8c6b2f73a75e8
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=15f5f839b1a52a49bb60e73625b8c6b2f73a75e8

Author: Roland Scheidegger <sroland at vmware.com>
Date:   Wed Aug  5 01:12:16 2009 +0200

radeon: fix miptree comparison breakage

another case of image never matching miptree in case of compressed textures

---

 src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
index 02e0dc7..d4082bf 100644
--- a/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
+++ b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
@@ -326,7 +326,8 @@ GLboolean radeon_miptree_matches_image(radeon_mipmap_tree *mt,
 	if (face >= mt->faces || level < mt->firstLevel || level > mt->lastLevel)
 		return GL_FALSE;
 
-	if (texImage->IsCompressed != mt->compressed)
+	if ((!texImage->IsCompressed && mt->compressed) ||
+	    (texImage->IsCompressed && !mt->compressed))
 		return GL_FALSE;
 
 	if (!texImage->IsCompressed &&




More information about the mesa-commit mailing list