i965/gen9: Use raw PS invocation count for queries
authorBen Widawsky <benjamin.widawsky@intel.com>
Mon, 8 Jun 2015 21:52:07 +0000 (14:52 -0700)
committerBen Widawsky <benjamin.widawsky@intel.com>
Tue, 9 Jun 2015 18:17:37 +0000 (11:17 -0700)
Previously the number needed to be divided by 4 to get the proper results. Now
the hardware does the right thing. Through experimentation it seems Braswell
(CHV) does also need the division by 4.

Fixes piglit test:
arb_pipeline_statistics_query-frag

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
src/mesa/drivers/dri/i965/gen6_queryobj.c

index 6431ed56d818b848928275904abfad9c16dc9cd5..ba5c944fb3d2c250bca10642ab53c501820ffaee 100644 (file)
@@ -246,7 +246,7 @@ gen6_queryobj_get_results(struct gl_context *ctx,
        * and correctly emitted the number of pixel shader invocations, but,
        * whomever forgot to undo the multiply by 4.
        */
-      if (brw->gen >= 8 || brw->is_haswell)
+      if (brw->gen == 8 || brw->is_haswell)
          query->Base.Result /= 4;
       break;