llvmpipe: add query support for task/mesh shaders
authorDave Airlie <airlied@redhat.com>
Wed, 17 May 2023 01:55:10 +0000 (11:55 +1000)
committerDave Airlie <airlied@redhat.com>
Mon, 5 Jun 2023 19:01:47 +0000 (05:01 +1000)
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23066>

src/gallium/drivers/llvmpipe/lp_query.c

index b06ba26..80ecdc0 100644 (file)
@@ -346,7 +346,10 @@ llvmpipe_get_query_result_resource(struct pipe_context *pipe,
             value = pq->stats.cs_invocations;
             break;
          case PIPE_STAT_QUERY_TS_INVOCATIONS:
+            value = pq->stats.ts_invocations;
+            break;
          case PIPE_STAT_QUERY_MS_INVOCATIONS:
+            value = pq->stats.ms_invocations;
             break;
          }
          break;
@@ -517,6 +520,10 @@ llvmpipe_end_query(struct pipe_context *pipe, struct pipe_query *q)
          llvmpipe->pipeline_statistics.hs_invocations - pq->stats.hs_invocations;
       pq->stats.ds_invocations =
          llvmpipe->pipeline_statistics.ds_invocations - pq->stats.ds_invocations;
+      pq->stats.ts_invocations =
+         llvmpipe->pipeline_statistics.ts_invocations - pq->stats.ts_invocations;
+      pq->stats.ms_invocations =
+         llvmpipe->pipeline_statistics.ms_invocations - pq->stats.ms_invocations;
       llvmpipe->active_statistics_queries--;
       break;
    case PIPE_QUERY_OCCLUSION_COUNTER: