From e5d8b731e410e4bd05b452ac4b92bda5a5edd67c Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Wed, 17 Feb 2021 18:00:14 +0100 Subject: [PATCH] radv: emit missing subpass resolve marker for SQTT RGP now shows CmdEndRenderPassResolve() in the Event timing panel. Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen Part-of: --- src/amd/vulkan/layers/radv_sqtt_layer.c | 12 ++++++++++++ src/amd/vulkan/radv_meta_resolve.c | 7 +++++++ src/amd/vulkan/radv_private.h | 2 ++ 3 files changed, 21 insertions(+) diff --git a/src/amd/vulkan/layers/radv_sqtt_layer.c b/src/amd/vulkan/layers/radv_sqtt_layer.c index 8a7590a..87b32dd 100644 --- a/src/amd/vulkan/layers/radv_sqtt_layer.c +++ b/src/amd/vulkan/layers/radv_sqtt_layer.c @@ -215,6 +215,18 @@ radv_describe_end_render_pass_clear(struct radv_cmd_buffer *cmd_buffer) } void +radv_describe_begin_render_pass_resolve(struct radv_cmd_buffer *cmd_buffer) +{ + cmd_buffer->state.current_event_type = EventRenderPassResolve; +} + +void +radv_describe_end_render_pass_resolve(struct radv_cmd_buffer *cmd_buffer) +{ + cmd_buffer->state.current_event_type = EventInternalUnknown; +} + +void radv_describe_barrier_end_delayed(struct radv_cmd_buffer *cmd_buffer) { struct rgp_sqtt_marker_barrier_end marker = {0}; diff --git a/src/amd/vulkan/radv_meta_resolve.c b/src/amd/vulkan/radv_meta_resolve.c index 44f39ec..649ba4a 100644 --- a/src/amd/vulkan/radv_meta_resolve.c +++ b/src/amd/vulkan/radv_meta_resolve.c @@ -826,6 +826,11 @@ radv_cmd_buffer_resolve_subpass(struct radv_cmd_buffer *cmd_buffer) const struct radv_subpass *subpass = cmd_buffer->state.subpass; enum radv_resolve_method resolve_method = RESOLVE_HW; + if (!subpass->has_color_resolve && !subpass->ds_resolve_attachment) + return; + + radv_describe_begin_render_pass_resolve(cmd_buffer); + if (subpass->ds_resolve_attachment) { struct radv_subpass_attachment src_att = *subpass->depth_stencil_attachment; struct radv_subpass_attachment dst_att = *subpass->ds_resolve_attachment; @@ -935,6 +940,8 @@ radv_cmd_buffer_resolve_subpass(struct radv_cmd_buffer *cmd_buffer) unreachable("Invalid resolve method"); } } + + radv_describe_end_render_pass_resolve(cmd_buffer); } /** diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h index 4118d05..7b4d291 100644 --- a/src/amd/vulkan/radv_private.h +++ b/src/amd/vulkan/radv_private.h @@ -2598,6 +2598,8 @@ void radv_describe_dispatch(struct radv_cmd_buffer *cmd_buffer, int x, int y, in void radv_describe_begin_render_pass_clear(struct radv_cmd_buffer *cmd_buffer, VkImageAspectFlagBits aspects); void radv_describe_end_render_pass_clear(struct radv_cmd_buffer *cmd_buffer); +void radv_describe_begin_render_pass_resolve(struct radv_cmd_buffer *cmd_buffer); +void radv_describe_end_render_pass_resolve(struct radv_cmd_buffer *cmd_buffer); void radv_describe_barrier_start(struct radv_cmd_buffer *cmd_buffer, enum rgp_barrier_reason reason); void radv_describe_barrier_end(struct radv_cmd_buffer *cmd_buffer); -- 2.7.4