diff options
author | Marek Olšák <[email protected]> | 2016-06-09 23:16:43 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-06-14 20:22:16 +0200 |
commit | 4140afd04bc71e2eef0e299d616be24765bf528f (patch) | |
tree | 7f4fec213ebc2629e22140a19c4982a887e70867 /src/gallium/drivers/radeonsi | |
parent | 8fc688c303135985c2090eceddb5228dbffb74ca (diff) |
gallium/radeon: add driver queries for compute/dma call stats and spills
also print the average count per frame
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_compute.c | 6 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_pipe.h | 1 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state_draw.c | 2 |
3 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_compute.c b/src/gallium/drivers/radeonsi/si_compute.c index 09cbe1337ef..2f7e1721c89 100644 --- a/src/gallium/drivers/radeonsi/si_compute.c +++ b/src/gallium/drivers/radeonsi/si_compute.c @@ -308,6 +308,8 @@ static bool si_switch_compute_shader(struct si_context *sctx, sctx->cs_shader_state.emitted_program = program; sctx->cs_shader_state.offset = offset; + sctx->cs_shader_state.uses_scratch = + config->scratch_bytes_per_wave != 0; return true; } @@ -487,6 +489,10 @@ static void si_launch_grid( si_emit_dispatch_packets(sctx, info); si_ce_post_draw_synchronization(sctx); + + sctx->b.num_compute_calls++; + if (sctx->cs_shader_state.uses_scratch) + sctx->b.num_spill_compute_calls++; } diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h index d4c55146eff..7e68bb707de 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.h +++ b/src/gallium/drivers/radeonsi/si_pipe.h @@ -136,6 +136,7 @@ struct si_cs_shader_state { struct si_compute *emitted_program; unsigned offset; bool initialized; + bool uses_scratch; }; struct si_textures_info { diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c index 0a85d5a0ca3..641becf7bc8 100644 --- a/src/gallium/drivers/radeonsi/si_state_draw.c +++ b/src/gallium/drivers/radeonsi/si_state_draw.c @@ -987,6 +987,8 @@ void si_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info) pipe_resource_reference(&ib.buffer, NULL); sctx->b.num_draw_calls++; + if (G_0286E8_WAVESIZE(sctx->spi_tmpring_size)) + sctx->b.num_spill_draw_calls++; } void si_trace_emit(struct si_context *sctx) |