iris: add fs invocations query workaround for broadwell
authorDave Airlie <airlied@redhat.com>
Thu, 8 Nov 2018 07:46:22 +0000 (17:46 +1000)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:11 +0000 (10:26 -0800)
src/gallium/drivers/iris/iris_query.c

index 9739369dd741f412f83131c28d273e6223443727..fcc443e422a21a92ecfd6fb3d76b899f8b0ae494 100644 (file)
@@ -812,6 +812,12 @@ iris_get_query_result(struct pipe_context *ctx,
          break;
       case 7:
          result->pipeline_statistics.ps_invocations = q->result;
+         /* Implement the "WaDividePSInvocationCountBy4:HSW,BDW" workaround:
+          * "Invocation counter is 4 times actual.  WA: SW to divide HW reported
+          *  PS Invocations value by 4."
+          */
+         if (screen->devinfo.gen == 8)
+            result->pipeline_statistics.ps_invocations /= 4;
          break;
       case 8:
          result->pipeline_statistics.hs_invocations = q->result;