summaryrefslogtreecommitdiff
path: root/run.py
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2013-03-22 17:22:04 -0700
committerEric Anholt <eric@anholt.net>2013-03-22 17:31:00 -0700
commit01cb6eb39a5f4a561e407556eb528b5f1ef7f6fe (patch)
tree1b4f79b6431d4c18e7f7cc3d273b1d39566eb4c5 /run.py
parent7ff642d5a8e91b75c966b50bd6998cfc8028de0c (diff)
run.py: Ignore instructions from builtin shaders.
i965's clear metaops shader shouldn't count against each program.
Diffstat (limited to 'run.py')
-rwxr-xr-xrun.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/run.py b/run.py
index fc3244c..7856542 100755
--- a/run.py
+++ b/run.py
@@ -18,6 +18,9 @@ Options:
sys.exit(1)
def run_test(filename):
+ if ".out" in filename:
+ return ""
+
if ".shader_test" in filename:
command = ['./bin/shader_runner',
filename,
@@ -51,15 +54,19 @@ def run_test(filename):
counts = {}
lines = list(results.split('\n'))
+ re_builtin_shader = re.compile("shader 0")
re_fs_8 = re.compile("^Native code for fragment.*8-wide")
re_fs_16 = re.compile("^Native code for fragment.*16-wide")
re_vs = re.compile("^Native code for vertex")
re_align = re.compile("{ align")
+ counts["ignore"] = 0
counts["vs "] = 0
counts["fs8 "] = 0
counts["fs16"] = 0
for line in lines:
- if (re.search(re_vs, line)):
+ if (re.search(re_builtin_shader, line)):
+ current_type = "ignore"
+ elif (re.search(re_vs, line)):
current_type = "vs "
elif (re.search(re_fs_8, line)):
current_type = "fs8 "
@@ -67,6 +74,7 @@ def run_test(filename):
current_type = "fs16"
elif (re.search(re_align, line)):
counts[current_type] = counts[current_type] + 1
+ del counts["ignore"]
out = ''
for t in counts: