Mesa (master): iris: Don't flush the batch for unsynchronized mappings

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Mar 18 08:02:34 UTC 2019


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

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Mon Mar 18 00:18:32 2019 -0700

iris: Don't flush the batch for unsynchronized mappings

I messed this up when adding the GPU copy path.

---

 src/gallium/drivers/iris/iris_resource.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c
index 78a6d15ed72..e0824723676 100644
--- a/src/gallium/drivers/iris/iris_resource.c
+++ b/src/gallium/drivers/iris/iris_resource.c
@@ -1256,9 +1256,11 @@ iris_transfer_map(struct pipe_context *ctx,
       iris_map_copy_region(map);
    } else {
       /* Otherwise we're free to map on the CPU.  Flush if needed. */
-      for (int i = 0; i < IRIS_BATCH_COUNT; i++) {
-         if (iris_batch_references(&ice->batches[i], res->bo))
-            iris_batch_flush(&ice->batches[i]);
+      if (!(usage & PIPE_TRANSFER_UNSYNCHRONIZED)) {
+         for (int i = 0; i < IRIS_BATCH_COUNT; i++) {
+            if (iris_batch_references(&ice->batches[i], res->bo))
+               iris_batch_flush(&ice->batches[i]);
+         }
       }
 
       if (surf->tiling == ISL_TILING_W) {




More information about the mesa-commit mailing list