aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2020-03-26 15:36:42 +1000
committerDave Airlie <[email protected]>2020-04-15 14:25:56 +1000
commit202bc38ce9e3e52cea1448f22882d17c7e5e9a90 (patch)
treeece69611eff3ab4270fe4a0ef451187fbc2ac283 /src/gallium/auxiliary
parentf4edc6f8bd89e97047b79a4685640d0546e90a10 (diff)
draw: collect tessellation invocations statistics
Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4560>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/draw/draw_tess.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_tess.c b/src/gallium/auxiliary/draw/draw_tess.c
index dc7282af39a..9178f5c8368 100644
--- a/src/gallium/auxiliary/draw/draw_tess.c
+++ b/src/gallium/auxiliary/draw/draw_tess.c
@@ -185,6 +185,9 @@ int draw_tess_ctrl_shader_run(struct draw_tess_ctrl_shader *shader,
output_prims->primitive_lengths = NULL;
output_prims->primitive_count = 0;
+ if (shader->draw->collect_statistics) {
+ shader->draw->statistics.hs_invocations += num_patches;
+ }
#ifdef LLVM_AVAILABLE
for (unsigned i = 0; i < num_patches; i++) {
uint32_t vert_start = output_verts->count;
@@ -346,6 +349,9 @@ int draw_tess_eval_shader_run(struct draw_tess_eval_shader *shader,
shader->input_vertex_stride = input_stride;
shader->input_info = input_info;
+ if (shader->draw->collect_statistics) {
+ shader->draw->statistics.ds_invocations += input_prim->primitive_count;
+ }
#ifdef LLVM_AVAILABLE
struct pipe_tessellation_factors factors;
struct pipe_tessellator_data data = { 0 };