From fcd0364857f6a0460a7058eea422b46644b9da98 Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Tue, 18 Sep 2018 15:04:14 -0700 Subject: [PATCH] iris/compute: Wait on compute batch when mapping Signed-off-by: Jordan Justen --- src/gallium/drivers/iris/iris_resource.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c index 40d52e90b7a..d35b1820453 100644 --- a/src/gallium/drivers/iris/iris_resource.c +++ b/src/gallium/drivers/iris/iris_resource.c @@ -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; -- 2.30.2