From ace5f6c88d6145c9e43ba2e2d52715f4380ba81f Mon Sep 17 00:00:00 2001 From: Danylo Piliaiev Date: Thu, 5 Mar 2026 18:48:02 +0100 Subject: [PATCH] tu: Store gmem attachments after custom resolve in dyn RP For dynamic renderpass we created a fake second subpass, which would is used by CmdBeginCustomResolveEXT, however CmdBeginCustomResolveEXT doesn't trigger tile stores, but attachments didn't know they should be stored after fake custom resolve subpass. Fixes: 520e3f3a473 ("tu: Implement VK_EXT_custom_resolve") Signed-off-by: Danylo Piliaiev (cherry picked from commit 67c54c44651016c914b8fc3d60c52a9d5b1a5d3c) Part-of: --- .pick_status.json | 2 +- src/freedreno/vulkan/tu_pass.cc | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index 0d4664798ca..3f903a45656 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1794,7 +1794,7 @@ "description": "tu: Store gmem attachments after custom resolve in dyn RP", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "520e3f3a4732e66bbb2cdfe3b2a72a321ce9c04e", "notes": null diff --git a/src/freedreno/vulkan/tu_pass.cc b/src/freedreno/vulkan/tu_pass.cc index 074bf47a513..8f216215d4c 100644 --- a/src/freedreno/vulkan/tu_pass.cc +++ b/src/freedreno/vulkan/tu_pass.cc @@ -1696,6 +1696,14 @@ tu_setup_dynamic_render_pass(struct tu_cmd_buffer *cmd_buffer, resolve_subpass->fsr_attachment_texel_size = subpass->fsr_attachment_texel_size; resolve_subpass->fsr_attachment = subpass->fsr_attachment; + + /* We don't do stores on vkCmdBeginCustomResolveEXT, so move them + * after custom resolve. + */ + for (uint32_t i = 0; i < pass->user_attachment_count; i++) { + struct tu_render_pass_attachment *att = &pass->attachments[i]; + att->last_subpass_idx = 1; + } } if (TU_DEBUG(FDM) && !tu_render_pass_disable_fdm(device, pass))