v3dv: handle VK_ATTACHMENT_UNUSED properly in more places

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
This commit is contained in:
Iago Toral Quiroga
2020-01-10 13:36:10 +01:00
committed by Marge Bot
parent 04e1a6f359
commit b60e5ef50e
+6
View File
@@ -597,6 +597,9 @@ cmd_buffer_find_first_subpass_for_attachments(struct v3dv_cmd_buffer *cmd_buffer
const struct v3dv_subpass *subpass = &pass->subpasses[i];
for (uint32_t j = 0; j < subpass->color_count; j++) {
uint32_t attachment_idx = subpass->color_attachments[j].attachment;
if (attachment_idx == VK_ATTACHMENT_UNUSED)
continue;
if (j < state->attachments[attachment_idx].first_subpass)
state->attachments[attachment_idx].first_subpass = j;
}
@@ -1062,6 +1065,9 @@ cmd_buffer_emit_render_pass_rcl(struct v3dv_cmd_buffer *cmd_buffer)
for (uint32_t i = 0; i < subpass->color_count; i++) {
uint32_t attachment_idx = subpass->color_attachments[i].attachment;
if (attachment_idx == VK_ATTACHMENT_UNUSED)
continue;
struct v3dv_image_view *iview =
state->framebuffer->attachments[attachment_idx];