tu: Don't patch GMEM for input attachments never in GMEM

This can happen if we resolve to a resolve attachment and then use that
resolve attachment as an input attachment in a later subpass. We don't
need to put it in GMEM, but it's still considered "written" because
input attachment reads need a dependency after the resolve.

MSRTSS input attachment tests effectively created such a scenario after
lowering to transient multisample attachments and inserting resolves.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37919>
This commit is contained in:
Connor Abbott
2025-10-14 21:08:27 -04:00
committed by Marge Bot
parent 7a8b7fc480
commit d491a79027

View File

@@ -425,7 +425,8 @@ tu_render_pass_patch_input_gmem(struct tu_render_pass *pass)
written[a] = true;
subpass->feedback_invalidate = true;
}
subpass->input_attachments[j].patch_input_gmem = written[a];
subpass->input_attachments[j].patch_input_gmem =
written[a] && pass->attachments[a].gmem;
}
for (unsigned j = 0; j < subpass->color_count; j++) {