We were using the subpass render target index to index into the framebuffer,
which is not correct, since the framebuffer is defined for the render pass.
We should use the attachment index instead, which we were already computing
but that we were not actually using for indexing by mistake.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
if (att_idx == VK_ATTACHMENT_UNUSED)
continue;
- const struct v3dv_image_view *att = framebuffer->attachments[i];
+ const struct v3dv_image_view *att = framebuffer->attachments[att_idx];
assert(att);
if (att->aspects & VK_IMAGE_ASPECT_COLOR_BIT)