From: Marek Olšák Date: Sun, 17 Apr 2016 14:14:32 +0000 (+0200) Subject: radeonsi: add safety assertions for meta cache flushes X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=58494b42b58274d776c1478132809f86a7ae3e52;p=mesa.git radeonsi: add safety assertions for meta cache flushes Reviewed-by: Nicolai Hähnle --- diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c index 86fb4431022..c9f56c6146e 100644 --- a/src/gallium/drivers/radeonsi/si_state_draw.c +++ b/src/gallium/drivers/radeonsi/si_state_draw.c @@ -662,10 +662,14 @@ void si_emit_cache_flush(struct si_context *si_ctx, struct r600_atom *atom) if (sctx->flags & SI_CONTEXT_FLUSH_AND_INV_CB_META) { radeon_emit(cs, PKT3(PKT3_EVENT_WRITE, 0, 0) | compute); radeon_emit(cs, EVENT_TYPE(V_028A90_FLUSH_AND_INV_CB_META) | EVENT_INDEX(0)); + /* needed for wait for idle in SURFACE_SYNC */ + assert(sctx->flags & SI_CONTEXT_FLUSH_AND_INV_CB); } if (sctx->flags & SI_CONTEXT_FLUSH_AND_INV_DB_META) { radeon_emit(cs, PKT3(PKT3_EVENT_WRITE, 0, 0) | compute); radeon_emit(cs, EVENT_TYPE(V_028A90_FLUSH_AND_INV_DB_META) | EVENT_INDEX(0)); + /* needed for wait for idle in SURFACE_SYNC */ + assert(sctx->flags & SI_CONTEXT_FLUSH_AND_INV_DB); } if (sctx->flags & SI_CONTEXT_FLUSH_WITH_INV_L2) { radeon_emit(cs, PKT3(PKT3_EVENT_WRITE, 0, 0) | compute);