From 0e1c32baaa333e3a96799ebe3a004f8256f7ec19 Mon Sep 17 00:00:00 2001 From: Zan Dobersek Date: Mon, 26 Jan 2026 16:54:15 +0100 Subject: [PATCH] tu: allocate transient attachments used for LRZ When proceeding with rendering, any transient attachment that will be used as LRZ buffer should also be allocated. With GMEM rendering, these attachments otherwise remained unloaded and subsequent LRZ clears produced GPU faults. Signed-off-by: Zan Dobersek Fixes: 764b3d9161c ("tu: Implement transient attachments and lazily allocated memory") Fixes: #14604 (cherry picked from commit b6a049ea4ba1c8ebf16463abe18729693c5b497d) Part-of: --- .pick_status.json | 2 +- src/freedreno/vulkan/tu_cmd_buffer.cc | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index a1eed0c45aa..bacd62ac9df 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -154,7 +154,7 @@ "description": "tu: allocate transient attachments used for LRZ", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "764b3d9161c27afb57d20536c6968fa5085f34f1", "notes": null diff --git a/src/freedreno/vulkan/tu_cmd_buffer.cc b/src/freedreno/vulkan/tu_cmd_buffer.cc index 4b550c38bbe..43c982fc2c2 100644 --- a/src/freedreno/vulkan/tu_cmd_buffer.cc +++ b/src/freedreno/vulkan/tu_cmd_buffer.cc @@ -3133,7 +3133,8 @@ tu_allocate_transient_attachments(struct tu_cmd_buffer *cmd, bool sysmem) (sysmem || rp->attachments[i].load || rp->attachments[i].load_stencil || rp->attachments[i].store || - rp->attachments[i].store_stencil)) { + rp->attachments[i].store_stencil || + iview == cmd->state.lrz.image_view)) { VkResult result = tu_allocate_lazy_memory(cmd->device, iview->image->mem); if (result != VK_SUCCESS)