i965: perf: fix codegen with single operand equation
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Fri, 14 Apr 2017 07:07:47 +0000 (00:07 -0700)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Mon, 19 Jun 2017 21:11:00 +0000 (22:11 +0100)
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@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_oa.py

index bf950b1..254c512 100644 (file)
@@ -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 + ";")