Mesa (main): iris: Set MI_FLUSH_DW::PostSyncOperation correctly

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Feb 24 22:06:11 UTC 2022


Module: Mesa
Branch: main
Commit: e6b7e743083f5f71ff004b3c753e07e482c815d7
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e6b7e743083f5f71ff004b3c753e07e482c815d7

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Fri Feb 18 03:02:53 2022 -0800

iris: Set MI_FLUSH_DW::PostSyncOperation correctly

The MI_FLUSH_DW post-sync operation uses the same encoding as the
PIPE_CONTROL one so we can use the same helper.  Write PS Depth Count
is not supported, of course, as the blitter has no depth pipeline.

This means that we can write the timestamp register from the blitter.

Fixes: 604d97671b6 ("iris: Add support for flushing the blitter (hackily)")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15157>

---

 src/gallium/drivers/iris/iris_state.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c
index 5a91d4d55cc..e09f542c090 100644
--- a/src/gallium/drivers/iris/iris_state.c
+++ b/src/gallium/drivers/iris/iris_state.c
@@ -7666,6 +7666,8 @@ iris_emit_raw_pipe_control(struct iris_batch *batch,
       batch_mark_sync_for_pipe_control(batch, flags);
       iris_batch_sync_region_start(batch);
 
+      assert(!(flags & PIPE_CONTROL_WRITE_DEPTH_COUNT));
+
       /* 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,
@@ -7674,6 +7676,7 @@ iris_emit_raw_pipe_control(struct iris_batch *batch,
       iris_emit_cmd(batch, GENX(MI_FLUSH_DW), fd) {
          fd.Address = rw_bo(bo, offset, IRIS_DOMAIN_OTHER_WRITE);
          fd.ImmediateData = imm;
+         fd.PostSyncOperation = flags_to_post_sync_op(flags);
 #if GFX_VERx10 >= 125
          /* TODO: This may not always be necessary */
          fd.FlushCCS = true;



More information about the mesa-commit mailing list