From: Jordan Justen Date: Tue, 18 Sep 2018 22:04:14 +0000 (-0700) Subject: iris/compute: Wait on compute batch when mapping X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fcd0364857f6a0460a7058eea422b46644b9da98;p=mesa.git iris/compute: Wait on compute batch when mapping Signed-off-by: Jordan Justen --- 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;