Mesa (master): i965: perf: fix codegen with single operand equation

Lionel Landwerlin llandwerlin at kemper.freedesktop.org
Mon Jun 19 21:15:09 UTC 2017


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

Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date:   Fri Apr 14 00:07:47 2017 -0700

i965: perf: fix codegen with single operand equation

We did support single value operand equations, but not single variable
operand ones. In particular we were failing on "$Sampler0Bottleneck".

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/mesa/drivers/dri/i965/brw_oa.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_oa.py b/src/mesa/drivers/dri/i965/brw_oa.py
index bf950b140d..254c512a7d 100644
--- a/src/mesa/drivers/dri/i965/brw_oa.py
+++ b/src/mesa/drivers/dri/i965/brw_oa.py
@@ -214,7 +214,9 @@ def output_rpn_equation_code(set, counter, equation, counter_vars):
     value = stack[-1]
 
     if value in hw_vars:
-        value = hw_vars[value];
+        value = hw_vars[value]
+    if value in counter_vars:
+        value = read_funcs[value[1:]] + "(brw, query, accumulator)"
 
     c("\nreturn " + value + ";")
 




More information about the mesa-commit mailing list