[Mesa-dev] [PATCH] i965/gen9: Use raw PS invocation count for queries

Anuj Phogat anuj.phogat at gmail.com
Tue Jun 9 10:08:53 PDT 2015


On Mon, Jun 8, 2015 at 3:50 PM, Ben Widawsky
<benjamin.widawsky at intel.com> wrote:
> 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 this.
>
> Fixes piglit test:
> arb_pipeline_statistics_query-frag
>
> Signed-off-by: Ben Widawsky <ben at bwidawsk.net>
> ---
>  src/mesa/drivers/dri/i965/gen6_queryobj.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/drivers/dri/i965/gen6_queryobj.c b/src/mesa/drivers/dri/i965/gen6_queryobj.c
> index 6431ed5..ba5c944 100644
> --- a/src/mesa/drivers/dri/i965/gen6_queryobj.c
> +++ b/src/mesa/drivers/dri/i965/gen6_queryobj.c
> @@ -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;
>
> --
> 2.4.2
>

LGTM. Tested on Skylake.

Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>


More information about the mesa-dev mailing list