radeonsi: add BREAK_BATCH at the beginning of IBs
authorMarek Olšák <marek.olsak@amd.com>
Thu, 2 Jun 2022 21:18:43 +0000 (17:18 -0400)
committerMarge Bot <emma+marge@anholt.net>
Sat, 11 Jun 2022 11:14:16 +0000 (11:14 +0000)
to fix possible issues if the previous IB comes from a different app

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16885>

src/gallium/drivers/radeonsi/si_state.c

index 32ddf06..8dd62a0 100644 (file)
@@ -5586,6 +5586,11 @@ void si_init_cs_preamble_state(struct si_context *sctx, bool uses_reg_shadowing)
       si_pm4_cmd_add(pm4, CC0_UPDATE_LOAD_ENABLES(1));
       si_pm4_cmd_add(pm4, CC1_UPDATE_SHADOW_ENABLES(1));
 
+      if (sscreen->dpbb_allowed) {
+         si_pm4_cmd_add(pm4, PKT3(PKT3_EVENT_WRITE, 0, 0));
+         si_pm4_cmd_add(pm4, EVENT_TYPE(V_028A90_BREAK_BATCH) | EVENT_INDEX(0));
+      }
+
       if (has_clear_state) {
          si_pm4_cmd_add(pm4, PKT3(PKT3_CLEAR_STATE, 0, 0));
          si_pm4_cmd_add(pm4, 0);