diff options
author | Kenneth Graunke <[email protected]> | 2018-11-20 09:00:22 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2019-02-21 10:26:10 -0800 |
commit | f1a7392be17573169460971b487ad25cb2ce43df (patch) | |
tree | c77fc1e0687c6af4cfbfc500ebb765520315810b /src/gallium/drivers/iris/iris_resource.c | |
parent | c2a77efa71f4b36708575652b89165745c4ad054 (diff) |
iris: Put batches in an array
We keep re-making this array all over the place
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)) |