diff options
author | Samuel Pitoiset <[email protected]> | 2019-01-29 22:18:52 +0100 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2019-02-04 13:17:57 +0100 |
commit | e1a0a268c63f2beb4b88586e8060c3f98e37a654 (patch) | |
tree | 9e9bfd17171a0cadc1af8644845e25c265d1f6c9 /src/amd/vulkan | |
parent | a20c2e38d840c0e46a0eec590dd7b17b3e511664 (diff) |
radv: use the new attachments array when starting subpasses
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/vulkan')
-rw-r--r-- | src/amd/vulkan/radv_cmd_buffer.c | 17 |
1 files changed, 5 insertions, 12 deletions
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); |