Mesa (master): iris: Avoid double flushing in iris_transfer_flush_region when copying.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jun 20 18:32:52 UTC 2019


Module: Mesa
Branch: master
Commit: 6890340c31b75d83740f43b679313cf42cd72d23
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6890340c31b75d83740f43b679313cf42cd72d23

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Wed Jun 19 22:51:51 2019 -0500

iris: Avoid double flushing in iris_transfer_flush_region when copying.

My intention was to have iris_copy_region not do flushing, and leave
that up to the callers.  iris_resource_copy_region needs to do this,
but iris_transfer_flush_region was already doing it.  The net result
was that we were doing it twice for transfers.

So, move the flushing from iris_copy_region to iris_resource_copy_region
so that it only happens in the callers as I intended.

---

 src/gallium/drivers/iris/iris_blit.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/iris/iris_blit.c b/src/gallium/drivers/iris/iris_blit.c
index 47c2c96846a..1ac56aa4eaf 100644
--- a/src/gallium/drivers/iris/iris_blit.c
+++ b/src/gallium/drivers/iris/iris_blit.c
@@ -572,10 +572,6 @@ iris_copy_region(struct blorp_context *blorp,
       blorp_batch_init(&ice->blorp, &blorp_batch, batch, 0);
       blorp_buffer_copy(&blorp_batch, src_addr, dst_addr, src_box->width);
       blorp_batch_finish(&blorp_batch);
-
-      iris_flush_and_dirty_for_history(ice, batch,
-                                       (struct iris_resource *) dst,
-                                       "cache history: post copy_region");
    } else {
       // XXX: what about one surface being a buffer and not the other?
 
@@ -642,6 +638,9 @@ iris_resource_copy_region(struct pipe_context *ctx,
       iris_copy_region(&ice->blorp, batch, &s_dst_res->base, dst_level, dstx,
                        dsty, dstz, &s_src_res->base, src_level, src_box);
    }
+
+   iris_flush_and_dirty_for_history(ice, batch, (struct iris_resource *) dst,
+                                    "cache history: post copy_region");
 }
 
 void




More information about the mesa-commit mailing list