diff --git a/.pick_status.json b/.pick_status.json index 465c255cac4..674012e5ea2 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1014,7 +1014,7 @@ "description": "radeonsi: Update buffer for other planes in si_alloc_resource", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/gallium/drivers/radeonsi/si_buffer.c b/src/gallium/drivers/radeonsi/si_buffer.c index 85d0ea5dffc..f4dfd27881f 100644 --- a/src/gallium/drivers/radeonsi/si_buffer.c +++ b/src/gallium/drivers/radeonsi/si_buffer.c @@ -176,6 +176,15 @@ bool si_alloc_resource(struct si_screen *sscreen, struct si_resource *res) util_range_set_empty(&res->valid_buffer_range); res->TC_L2_dirty = false; + if (res->b.b.target != PIPE_BUFFER && !(res->b.b.flags & SI_RESOURCE_AUX_PLANE)) { + /* The buffer is shared with other planes. */ + struct si_resource *plane = (struct si_resource *)res->b.b.next; + for (; plane; plane = (struct si_resource *)plane->b.b.next) { + radeon_bo_reference(sscreen->ws, &plane->buf, res->buf); + plane->gpu_address = res->gpu_address; + } + } + /* Print debug information. */ if (sscreen->debug_flags & DBG(VM) && res->b.b.target == PIPE_BUFFER) { fprintf(stderr, "VM start=0x%" PRIX64 " end=0x%" PRIX64 " | Buffer %" PRIu64 " bytes | Flags: ",