gallium/radeon: count gfx IB flushes

This will be used as a counter for whether fence_finish needs to flush
the IB.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
Marek Olšák 2016-07-15 23:16:08 +02:00
parent c5ff0d3e65
commit 16d568d911
3 changed files with 3 additions and 1 deletions

View File

@ -286,6 +286,7 @@ void r600_context_gfx_flush(void *context, unsigned flags,
ws->cs_flush(cs, flags, &ctx->b.last_gfx_fence);
if (fence)
ws->fence_reference(fence, ctx->b.last_gfx_fence);
ctx->b.num_gfx_cs_flushes++;
r600_begin_new_cs(ctx);
}

View File

@ -514,6 +514,7 @@ struct r600_common_context {
struct r600_ring dma;
struct pipe_fence_handle *last_gfx_fence;
struct pipe_fence_handle *last_sdma_fence;
unsigned num_gfx_cs_flushes;
unsigned initial_gfx_cs_size;
unsigned gpu_reset_counter;
unsigned last_dirty_fb_counter;

View File

@ -137,9 +137,9 @@ void si_context_gfx_flush(void *context, unsigned flags,
/* Flush the CS. */
ws->cs_flush(cs, flags, &ctx->b.last_gfx_fence);
if (fence)
ws->fence_reference(fence, ctx->b.last_gfx_fence);
ctx->b.num_gfx_cs_flushes++;
/* Check VM faults if needed. */
if (ctx->screen->b.debug_flags & DBG_CHECK_VM) {