radv/sqtt: describe begin/end subpass barriers with user markers
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 3 Mar 2020 14:03:25 +0000 (15:03 +0100)
committerMarge Bot <eric+marge@anholt.net>
Thu, 12 Mar 2020 17:04:55 +0000 (17:04 +0000)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4138>

src/amd/vulkan/radv_cmd_buffer.c

index c7b03fb19ad239431bd1d38b09263bf0c6da26ba..170f5c54791838ad5e4babe92c641c058228cf11 100644 (file)
@@ -4359,6 +4359,8 @@ radv_cmd_buffer_begin_subpass(struct radv_cmd_buffer *cmd_buffer,
 
        radv_cmd_buffer_set_subpass(cmd_buffer, subpass);
 
+       radv_describe_barrier_start(cmd_buffer, RGP_BARRIER_EXTERNAL_RENDER_PASS_SYNC);
+
        for (uint32_t i = 0; i < subpass->attachment_count; ++i) {
                const uint32_t a = subpass->attachments[i].attachment;
                if (a == VK_ATTACHMENT_UNUSED)
@@ -4369,6 +4371,8 @@ radv_cmd_buffer_begin_subpass(struct radv_cmd_buffer *cmd_buffer,
                                                     true);
        }
 
+       radv_describe_barrier_end(cmd_buffer);
+
        radv_cmd_buffer_clear_subpass(cmd_buffer);
 
        assert(cmd_buffer->cs->cdw <= cdw_max);
@@ -4383,6 +4387,8 @@ radv_cmd_buffer_end_subpass(struct radv_cmd_buffer *cmd_buffer)
 
        radv_cmd_buffer_resolve_subpass(cmd_buffer);
 
+       radv_describe_barrier_start(cmd_buffer, RGP_BARRIER_EXTERNAL_RENDER_PASS_SYNC);
+
        for (uint32_t i = 0; i < subpass->attachment_count; ++i) {
                const uint32_t a = subpass->attachments[i].attachment;
                if (a == VK_ATTACHMENT_UNUSED)
@@ -4396,6 +4402,8 @@ radv_cmd_buffer_end_subpass(struct radv_cmd_buffer *cmd_buffer)
                struct radv_subpass_attachment att = { a, layout, stencil_layout };
                radv_handle_subpass_image_transition(cmd_buffer, att, false);
        }
+
+       radv_describe_barrier_end(cmd_buffer);
 }
 
 void