radeon: fix miptree comparison breakage
authorRoland Scheidegger <sroland@vmware.com>
Tue, 4 Aug 2009 23:12:16 +0000 (01:12 +0200)
committerRoland Scheidegger <sroland@vmware.com>
Tue, 4 Aug 2009 23:13:22 +0000 (01:13 +0200)
another case of image never matching miptree in case of compressed textures

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

index 02e0dc7774af86ae3112e7fd91c05dfc3eeba058..d4082bf68f497f6d0f517c51946f3b8bfb9e228b 100644 (file)
@@ -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 &&