From 03a150c8ab59ca919db046bffc27d0704a06452d Mon Sep 17 00:00:00 2001 From: Iago Toral Quiroga Date: Mon, 6 Apr 2020 10:19:53 +0200 Subject: [PATCH] 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: --- src/broadcom/vulkan/v3dv_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/broadcom/vulkan/v3dv_device.c b/src/broadcom/vulkan/v3dv_device.c index 6dbf38a4e6a..6a25e231b60 100644 --- a/src/broadcom/vulkan/v3dv_device.c +++ b/src/broadcom/vulkan/v3dv_device.c @@ -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)