[Mesa-dev] [PATCH shader-db] si-report: Fix algorithm for determing difference in shader stats

Tom Stellard thomas.stellard at amd.com
Mon Jun 15 11:39:55 PDT 2015


---
 si-report.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/si-report.py b/si-report.py
index fbeed11..ec88112 100755
--- a/si-report.py
+++ b/si-report.py
@@ -145,7 +145,13 @@ class si_stats:
                 self.__dict__[name] += 1
 
     def is_empty(self):
-        return sum(map(lambda x : x[0] if type(x) == tuple else x, self.__dict__.values())) == 0
+        for name in self.__dict__.keys():
+            x = self.__dict__[name]
+            if type(x) == tuple and x[0] is not 0:
+                return False
+            if type(x) != tuple and x is not 0:
+                return False
+        return True
 
 def get_results(filename):
     file = open(filename, "r")
-- 
2.0.4



More information about the mesa-dev mailing list