diff options
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/iris/iris_resource.c | 6 | ||||
-rw-r--r-- | src/gallium/drivers/iris/iris_resource.h | 9 |
2 files changed, 12 insertions, 3 deletions
diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c index 349e4efe022..c40b3e6575c 100644 --- a/src/gallium/drivers/iris/iris_resource.c +++ b/src/gallium/drivers/iris/iris_resource.c @@ -1061,6 +1061,12 @@ iris_transfer_map(struct pipe_context *ctx, (usage & PIPE_TRANSFER_MAP_DIRECTLY)) return NULL; + if (resource->target != PIPE_BUFFER) { + iris_resource_access_raw(ice, &ice->batches[IRIS_BATCH_RENDER], res, + level, box->z, box->depth, + usage & PIPE_TRANSFER_WRITE); + } + if (!(usage & PIPE_TRANSFER_UNSYNCHRONIZED)) { for (int i = 0; i < IRIS_BATCH_COUNT; i++) { if (iris_batch_references(&ice->batches[i], res->bo)) diff --git a/src/gallium/drivers/iris/iris_resource.h b/src/gallium/drivers/iris/iris_resource.h index c31f70ba058..8e57b861437 100644 --- a/src/gallium/drivers/iris/iris_resource.h +++ b/src/gallium/drivers/iris/iris_resource.h @@ -298,12 +298,15 @@ iris_resource_access_raw(struct iris_context *ice, struct iris_batch *batch, struct iris_resource *res, uint32_t level, uint32_t layer, + uint32_t num_layers, bool write) { - iris_resource_prepare_access(ice, batch, res, level, 1, layer, 1, + iris_resource_prepare_access(ice, batch, res, level, 1, layer, num_layers, ISL_AUX_USAGE_NONE, false); - if (write) - iris_resource_finish_write(ice, res, level, layer, 1, ISL_AUX_USAGE_NONE); + if (write) { + iris_resource_finish_write(ice, res, level, layer, num_layers, + ISL_AUX_USAGE_NONE); + } } enum isl_aux_usage iris_resource_texture_aux_usage(struct iris_context *ice, |