iris: Directly access BOs rather than using iris_resource_bo(...)
iris_resource_bo() is convenient when we only have a pipe_resource * variable, and don't need to do a lot with it other than get at the BO. When we need to do more with a resource, we usually cast it to iris_resource *, at which point we can just use res->bo instead. This patch updates iris_copy_region to use src_res->bo, dst_res->bo, rather than iris_resource_bo(src) and iris_resource_bo(dst), since we already have those cast versions on hand. Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14667>
This commit is contained in:
parent
33c668a0e0
commit
77b93cf3b1
|
@ -640,20 +640,20 @@ iris_copy_region(struct blorp_context *blorp,
|
|||
|
||||
if (dst->target == PIPE_BUFFER && src->target == PIPE_BUFFER) {
|
||||
struct blorp_address src_addr = {
|
||||
.buffer = iris_resource_bo(src), .offset = src_box->x,
|
||||
.buffer = src_res->bo, .offset = src_box->x,
|
||||
.mocs = iris_mocs(src_res->bo, &screen->isl_dev,
|
||||
ISL_SURF_USAGE_RENDER_TARGET_BIT),
|
||||
};
|
||||
struct blorp_address dst_addr = {
|
||||
.buffer = iris_resource_bo(dst), .offset = dstx,
|
||||
.buffer = dst_res->bo, .offset = dstx,
|
||||
.reloc_flags = EXEC_OBJECT_WRITE,
|
||||
.mocs = iris_mocs(dst_res->bo, &screen->isl_dev,
|
||||
ISL_SURF_USAGE_TEXTURE_BIT),
|
||||
};
|
||||
|
||||
iris_emit_buffer_barrier_for(batch, iris_resource_bo(src),
|
||||
iris_emit_buffer_barrier_for(batch, src_res->bo,
|
||||
IRIS_DOMAIN_OTHER_READ);
|
||||
iris_emit_buffer_barrier_for(batch, iris_resource_bo(dst),
|
||||
iris_emit_buffer_barrier_for(batch, dst_res->bo,
|
||||
IRIS_DOMAIN_RENDER_WRITE);
|
||||
|
||||
iris_batch_maybe_flush(batch, 1500);
|
||||
|
@ -679,9 +679,9 @@ iris_copy_region(struct blorp_context *blorp,
|
|||
dstz, src_box->depth,
|
||||
dst_aux_usage, dst_clear_supported);
|
||||
|
||||
iris_emit_buffer_barrier_for(batch, iris_resource_bo(src),
|
||||
iris_emit_buffer_barrier_for(batch, src_res->bo,
|
||||
IRIS_DOMAIN_OTHER_READ);
|
||||
iris_emit_buffer_barrier_for(batch, iris_resource_bo(dst),
|
||||
iris_emit_buffer_barrier_for(batch, dst_res->bo,
|
||||
IRIS_DOMAIN_RENDER_WRITE);
|
||||
|
||||
blorp_batch_init(&ice->blorp, &blorp_batch, batch, 0);
|
||||
|
|
Loading…
Reference in New Issue