From: Samuel Pitoiset Date: Tue, 29 Jan 2019 21:18:52 +0000 (+0100) Subject: radv: use the new attachments array when starting subpasses X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e1a0a268c63f2beb4b88586e8060c3f98e37a654;p=mesa.git radv: use the new attachments array when starting subpasses Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen --- diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index 440f09a363c..914ff0055d9 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -3401,20 +3401,13 @@ radv_cmd_buffer_begin_subpass(struct radv_cmd_buffer *cmd_buffer, radv_subpass_barrier(cmd_buffer, &subpass->start_barrier); - for (unsigned i = 0; i < subpass->color_count; ++i) { - if (subpass->color_attachments[i].attachment != VK_ATTACHMENT_UNUSED) - radv_handle_subpass_image_transition(cmd_buffer, - subpass->color_attachments[i]); - } - - for (unsigned i = 0; i < subpass->input_count; ++i) { - radv_handle_subpass_image_transition(cmd_buffer, - subpass->input_attachments[i]); - } + for (uint32_t i = 0; i < subpass->attachment_count; ++i) { + const uint32_t a = subpass->attachments[i].attachment; + if (a == VK_ATTACHMENT_UNUSED) + continue; - if (subpass->depth_stencil_attachment) { radv_handle_subpass_image_transition(cmd_buffer, - *subpass->depth_stencil_attachment); + subpass->attachments[i]); } radv_cmd_buffer_set_subpass(cmd_buffer, subpass);