iris/compute: Wait on compute batch when mapping
authorJordan Justen <jordan.l.justen@intel.com>
Tue, 18 Sep 2018 22:04:14 +0000 (15:04 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:09 +0000 (10:26 -0800)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
src/gallium/drivers/iris/iris_resource.c

index 40d52e90b7ab52b7448e7dad7b6d83bfb05fad89..d35b182045302887259d0354d52124873ea2d0e2 100644 (file)
@@ -810,6 +810,11 @@ iris_transfer_map(struct pipe_context *ctx,
       iris_batch_flush(&ice->render_batch);
    }
 
+   if (!(usage & PIPE_TRANSFER_UNSYNCHRONIZED) &&
+       iris_batch_references(&ice->compute_batch, res->bo)) {
+      iris_batch_flush(&ice->compute_batch);
+   }
+
    if ((usage & PIPE_TRANSFER_DONTBLOCK) && iris_bo_busy(res->bo))
       return NULL;