iris: Don't flush the batch for unsynchronized mappings
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 18 Mar 2019 07:18:32 +0000 (00:18 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 18 Mar 2019 08:02:18 +0000 (01:02 -0700)
I messed this up when adding the GPU copy path.

src/gallium/drivers/iris/iris_resource.c

index 78a6d15ed72c724143bc880f513f8f07b56d32eb..e08247236761aa90d4a13a0dbf5b1bc3e0a6127e 100644 (file)
@@ -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) {