radeonsi: don't emit CS_PARTIAL_FLUSH if compute is not used

for less noise in the HUD

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
Marek Olšák 2016-08-24 15:32:56 +02:00
parent addca75f4e
commit 911202817d
3 changed files with 5 additions and 1 deletions

View File

@ -512,6 +512,7 @@ static void si_launch_grid(
si_ce_post_draw_synchronization(sctx);
sctx->compute_is_busy = true;
sctx->b.num_compute_calls++;
if (sctx->cs_shader_state.uses_scratch)
sctx->b.num_spill_compute_calls++;

View File

@ -219,6 +219,7 @@ struct si_context {
struct si_shader_ctx_state fixed_func_tcs_shader;
LLVMTargetMachineRef tm; /* only non-threaded compilation */
bool gfx_flush_in_progress;
bool compute_is_busy;
/* Atoms (direct states). */
union si_state_atoms atoms;

View File

@ -785,10 +785,12 @@ void si_emit_cache_flush(struct si_context *si_ctx, struct r600_atom *atom)
}
}
if (sctx->flags & SI_CONTEXT_CS_PARTIAL_FLUSH) {
if (sctx->flags & SI_CONTEXT_CS_PARTIAL_FLUSH &&
si_ctx->compute_is_busy) {
radeon_emit(cs, PKT3(PKT3_EVENT_WRITE, 0, 0));
radeon_emit(cs, EVENT_TYPE(V_028A90_CS_PARTIAL_FLUSH | EVENT_INDEX(4)));
sctx->num_cs_flushes++;
si_ctx->compute_is_busy = false;
}
/* VGT state synchronization. */