summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2016-08-24 15:32:56 +0200
committerMarek Olšák <marek.olsak@amd.com>2016-09-05 18:01:15 +0200
commit911202817d89170c6c777a4d5a57425c8814dd03 (patch)
tree5593da706feb0c2011e81853ea34aac1b2cc3aeb /src/gallium/drivers/radeonsi
parentaddca75f4eaadba1781f15d7d43c3da80e00f39c (diff)
downloadexternal_mesa3d-911202817d89170c6c777a4d5a57425c8814dd03.zip
external_mesa3d-911202817d89170c6c777a4d5a57425c8814dd03.tar.gz
external_mesa3d-911202817d89170c6c777a4d5a57425c8814dd03.tar.bz2
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>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r--src/gallium/drivers/radeonsi/si_compute.c1
-rw-r--r--src/gallium/drivers/radeonsi/si_pipe.h1
-rw-r--r--src/gallium/drivers/radeonsi/si_state_draw.c4
3 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/si_compute.c b/src/gallium/drivers/radeonsi/si_compute.c
index 17a4125..5041761 100644
--- a/src/gallium/drivers/radeonsi/si_compute.c
+++ b/src/gallium/drivers/radeonsi/si_compute.c
@@ -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++;
diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h
index f6535cf..5c041ce 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.h
+++ b/src/gallium/drivers/radeonsi/si_pipe.h
@@ -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;
diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c
index 9e50bb2..ddcb904 100644
--- a/src/gallium/drivers/radeonsi/si_state_draw.c
+++ b/src/gallium/drivers/radeonsi/si_state_draw.c
@@ -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. */