llvmpipe: disable compute statistics queries if queries are disabled
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Mon, 2 May 2022 15:15:40 +0000 (11:15 -0400)
committerMarge Bot <emma+marge@anholt.net>
Tue, 3 May 2022 13:00:50 +0000 (13:00 +0000)
cc: mesa-stable

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16278>

src/gallium/drivers/llvmpipe/lp_state_cs.c

index 230004d..01ff10d 100644 (file)
@@ -1419,7 +1419,8 @@ static void llvmpipe_launch_grid(struct pipe_context *pipe,
 
       lp_cs_tpool_wait_for_task(screen->cs_tpool, &task);
    }
-   llvmpipe->pipeline_statistics.cs_invocations += num_tasks * info->block[0] * info->block[1] * info->block[2];
+   if (!llvmpipe->queries_disabled)
+      llvmpipe->pipeline_statistics.cs_invocations += num_tasks * info->block[0] * info->block[1] * info->block[2];
 }
 
 static void