diff options
Diffstat (limited to 'src/gallium/drivers/iris/iris_resource.c')
-rw-r--r-- | src/gallium/drivers/iris/iris_resource.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c index 0ea72a9075b..de0456258cb 100644 --- a/src/gallium/drivers/iris/iris_resource.c +++ b/src/gallium/drivers/iris/iris_resource.c @@ -813,14 +813,11 @@ iris_transfer_map(struct pipe_context *ctx, (usage & PIPE_TRANSFER_MAP_DIRECTLY)) return NULL; - if (!(usage & PIPE_TRANSFER_UNSYNCHRONIZED) && - iris_batch_references(&ice->render_batch, res->bo)) { - 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_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 ((usage & PIPE_TRANSFER_DONTBLOCK) && iris_bo_busy(res->bo)) |