aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau/nvc0/nve4_compute.c
diff options
context:
space:
mode:
authorRhys Perry <[email protected]>2018-06-27 00:04:41 +0100
committerIlia Mirkin <[email protected]>2019-02-06 19:35:57 -0500
commit5b6f522fc29f4c8bbadd0466b6f61c1876c95807 (patch)
treec96fbad2e2f83bb077b95c2a0618d6da31c06bfd /src/gallium/drivers/nouveau/nvc0/nve4_compute.c
parentcce495572136a606dd2a35e79f45080c3796e2cc (diff)
nvc0: add compute invocation counter
The strategy is to keep a CPU-side counter of the direct invocations, and a GPU-side counter of the indirect invocations, and then add them together for queries. The specific technique is a macro which multiplies a list of integers together and accumulates the product into SCRATCH registers held inside of the context. Another macro will read those values out and add them to the passed-in cpu-side counter to be stored in a query buffer the same way that all the other statistics are stored. Original implementation by Rhys Perry, redone by Ilia Mirkin to use the SCRATCH temporaries. Signed-off-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau/nvc0/nve4_compute.c')
-rw-r--r--src/gallium/drivers/nouveau/nvc0/nve4_compute.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/nvc0/nve4_compute.c b/src/gallium/drivers/nouveau/nvc0/nve4_compute.c
index fcd7d9537f9..c5e4dec20bd 100644
--- a/src/gallium/drivers/nouveau/nvc0/nve4_compute.c
+++ b/src/gallium/drivers/nouveau/nvc0/nve4_compute.c
@@ -779,6 +779,8 @@ nve4_launch_grid(struct pipe_context *pipe, const struct pipe_grid_info *info)
BEGIN_NVC0(push, SUBC_CP(NV50_GRAPH_SERIALIZE), 1);
PUSH_DATA (push, 0);
+ nvc0_update_compute_invocations_counter(nvc0, info);
+
out:
if (ret)
NOUVEAU_ERR("Failed to launch grid !\n");