v3dv: fix incorrect attachment reference

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>
This commit is contained in:
Iago Toral Quiroga
2020-04-06 10:19:53 +02:00
committed by Marge Bot
parent 93fd897c28
commit 03a150c8ab
+1 -1
View File
@@ -1739,7 +1739,7 @@ v3dv_framebuffer_compute_internal_bpp(const struct v3dv_framebuffer *framebuffer
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)