Module: Mesa
Branch: mesa_7_7_branch
Commit: 2773556d55fe6043bee3d4c86f7b78906e5d60e0
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=2773556d55fe6043bee3d4c86f7b78906e5d60e0

Author: Maciej Cencora <[email protected]>
Date:   Sun Nov 29 12:36:09 2009 +0100

radeon: don't check the same miptree many times when looking for matching 
miptrees

---

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

diff --git a/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c 
b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
index d0b9691..39b6d50 100644
--- a/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
+++ b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
@@ -506,7 +506,7 @@ static radeon_mipmap_tree * 
get_biggest_matching_miptree(radeonTexObj *texObj,
                if (!img)
                        break;
 
-               if (!img->mt || !radeon_miptree_matches_texture(img->mt, 
&texObj->base))
+               if (!img->mt)
                        continue;
 
                for (int i = 0; i < mtCount; ++i) {
@@ -517,8 +517,8 @@ static radeon_mipmap_tree * 
get_biggest_matching_miptree(radeonTexObj *texObj,
                        }
                }
 
-               if (!found) {
-                       mtSizes[mtCount] += img->mt->levels[img->mtlevel].size;
+               if (!found && radeon_miptree_matches_texture(img->mt, 
&texObj->base)) {
+                       mtSizes[mtCount] = img->mt->levels[img->mtlevel].size;
                        mts[mtCount] = img->mt;
                        mtCount++;
                }

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to