diff options
author | Samuel Pitoiset <[email protected]> | 2019-05-30 15:13:59 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2019-06-06 10:00:29 +0200 |
commit | b9d3a6b6565952855bc6609f22986ee25638dada (patch) | |
tree | 1e29389026383762b5067d27d82792b91b1fa609 /src/amd | |
parent | d6724471a5775cbbeaafff1e1982f322b1d04c94 (diff) |
radv: set the subpass before any initial subpass transitions
This might fix initial subpass transitions when multiview is used.
Noticed while implementing sample locations during layout transitions.
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-By: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r-- | src/amd/vulkan/radv_cmd_buffer.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index 12e112f95c8..b570bda35ae 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -2654,7 +2654,7 @@ static void radv_handle_subpass_image_transition(struct radv_cmd_buffer *cmd_buf range.baseArrayLayer = view->base_layer; range.layerCount = cmd_buffer->state.framebuffer->layers; - if (cmd_buffer->state.subpass && cmd_buffer->state.subpass->view_mask) { + if (cmd_buffer->state.subpass->view_mask) { /* If the current subpass uses multiview, the driver might have * performed a fast color/depth clear to the whole image * (including all layers). To make sure the driver will @@ -3691,6 +3691,8 @@ radv_cmd_buffer_begin_subpass(struct radv_cmd_buffer *cmd_buffer, radv_subpass_barrier(cmd_buffer, &subpass->start_barrier); + radv_cmd_buffer_set_subpass(cmd_buffer, subpass); + for (uint32_t i = 0; i < subpass->attachment_count; ++i) { const uint32_t a = subpass->attachments[i].attachment; if (a == VK_ATTACHMENT_UNUSED) @@ -3700,7 +3702,6 @@ radv_cmd_buffer_begin_subpass(struct radv_cmd_buffer *cmd_buffer, subpass->attachments[i]); } - radv_cmd_buffer_set_subpass(cmd_buffer, subpass); radv_cmd_buffer_clear_subpass(cmd_buffer); assert(cmd_buffer->cs->cdw <= cdw_max); |