diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index 74c6010df3f..fafa7c3a77b 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -7651,6 +7651,29 @@ iris_emit_raw_pipe_control(struct iris_batch *batch, enum pipe_control_flags non_lri_post_sync_flags = post_sync_flags & ~PIPE_CONTROL_LRI_POST_SYNC_OP; +#if GFX_VER >= 12 + if (batch->name == IRIS_BATCH_BLITTER) { + batch_mark_sync_for_pipe_control(batch, flags); + iris_batch_sync_region_start(batch); + + /* The blitter doesn't actually use PIPE_CONTROL; rather it uses the + * MI_FLUSH_DW command. However, all of our code is set up to flush + * via emitting a pipe control, so we just translate it at this point, + * even if it is a bit hacky. + */ + iris_emit_cmd(batch, GENX(MI_FLUSH_DW), fd) { + fd.Address = rw_bo(bo, offset, IRIS_DOMAIN_OTHER_WRITE); + fd.ImmediateData = imm; +#if GFX_VERx10 >= 125 + /* TODO: This may not always be necessary */ + fd.FlushCCS = true; +#endif + } + iris_batch_sync_region_end(batch); + return; + } +#endif + /* Recursive PIPE_CONTROL workarounds -------------------------------- * (http://knowyourmeme.com/memes/xzibit-yo-dawg) *