summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-04-17 16:14:32 +0200
committerMarek Olšák <[email protected]>2016-04-18 19:51:25 +0200
commit58494b42b58274d776c1478132809f86a7ae3e52 (patch)
tree16ccdb79c8ba20497e4456b7867ef3ab819b148f /src/gallium/drivers
parent78f58a4e6fe854378958223d4103fca09e58fbd7 (diff)
radeonsi: add safety assertions for meta cache flushes
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/radeonsi/si_state_draw.c4
1 files changed, 4 insertions, 0 deletions
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);