diff --git a/src/freedreno/vulkan/tu_pass.cc b/src/freedreno/vulkan/tu_pass.cc index 3e1a13c3021..2e7d455e7d2 100644 --- a/src/freedreno/vulkan/tu_pass.cc +++ b/src/freedreno/vulkan/tu_pass.cc @@ -649,7 +649,7 @@ tu_render_pass_opt_resolve_unresolve(struct tu_render_pass *pass) */ (j == subpass->color_count ? subpass->depth_stencil_attachment.attachment : - subpass->color_attachments[i].attachment) >= + subpass->color_attachments[j].attachment) >= pass->user_attachment_count && /* Check that it's the last use and the original attachment is * not stored.