aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2019-08-27 15:04:28 +1000
committerDave Airlie <[email protected]>2019-09-04 15:22:20 +1000
commit775fa81d7bfe8edb72277cfc064d23eb0155151a (patch)
tree7db0451317c76e3547d61ac5ddb02e1328c88c09 /src
parent50fde5b20801a82bd95f14301707c32cf5df38a2 (diff)
llvmpipe: add compute pipeline statistics support.
This just adds the CS invocations counter. Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_query.c3
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_cs.c1
2 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_query.c b/src/gallium/drivers/llvmpipe/lp_query.c
index 59df7451807..7f86c3791b4 100644
--- a/src/gallium/drivers/llvmpipe/lp_query.c
+++ b/src/gallium/drivers/llvmpipe/lp_query.c
@@ -291,7 +291,8 @@ llvmpipe_end_query(struct pipe_context *pipe, struct pipe_query *q)
llvmpipe->pipeline_statistics.c_primitives - pq->stats.c_primitives;
pq->stats.ps_invocations =
llvmpipe->pipeline_statistics.ps_invocations - pq->stats.ps_invocations;
-
+ pq->stats.cs_invocations =
+ llvmpipe->pipeline_statistics.cs_invocations - pq->stats.cs_invocations;
llvmpipe->active_statistics_queries--;
break;
case PIPE_QUERY_OCCLUSION_COUNTER:
diff --git a/src/gallium/drivers/llvmpipe/lp_state_cs.c b/src/gallium/drivers/llvmpipe/lp_state_cs.c
index ec54ced1fc2..8c5c815e7f0 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_cs.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_cs.c
@@ -705,6 +705,7 @@ static void llvmpipe_launch_grid(struct pipe_context *pipe,
lp_cs_tpool_wait_for_task(screen->cs_tpool, &task);
mtx_unlock(&screen->cs_mutex);
}
+ llvmpipe->pipeline_statistics.cs_invocations += num_tasks * info->block[0] * info->block[1] * info->block[2];
}
void