From b6cebf64394858be8e896c73de7d896f2bb071f7 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Tue, 10 Mar 2020 18:35:15 +0100 Subject: [PATCH] radv: do not recursively begin/end render pass for meta operations To avoid breaking SQTT user markers that are emitted to report barriers and layout transitions to RGP. Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen Tested-by: Marge Bot Part-of: --- src/amd/vulkan/radv_cmd_buffer.c | 40 +++++++++----- src/amd/vulkan/radv_meta_blit.c | 77 ++++++++++++++------------- src/amd/vulkan/radv_meta_blit2d.c | 56 ++++++++++--------- src/amd/vulkan/radv_meta_clear.c | 16 +++--- src/amd/vulkan/radv_meta_decompress.c | 39 +++++++------- src/amd/vulkan/radv_meta_fast_clear.c | 33 ++++++------ src/amd/vulkan/radv_meta_resolve.c | 40 +++++++------- src/amd/vulkan/radv_meta_resolve_fs.c | 25 ++++----- src/amd/vulkan/radv_private.h | 4 ++ 9 files changed, 180 insertions(+), 150 deletions(-) diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index c1ba099893b..c7b03fb19ad 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -4398,12 +4398,10 @@ radv_cmd_buffer_end_subpass(struct radv_cmd_buffer *cmd_buffer) } } -void radv_CmdBeginRenderPass( - VkCommandBuffer commandBuffer, - const VkRenderPassBeginInfo* pRenderPassBegin, - VkSubpassContents contents) +void +radv_cmd_buffer_begin_render_pass(struct radv_cmd_buffer *cmd_buffer, + const VkRenderPassBeginInfo *pRenderPassBegin) { - RADV_FROM_HANDLE(radv_cmd_buffer, cmd_buffer, commandBuffer); RADV_FROM_HANDLE(radv_render_pass, pass, pRenderPassBegin->renderPass); RADV_FROM_HANDLE(radv_framebuffer, framebuffer, pRenderPassBegin->framebuffer); VkResult result; @@ -4419,6 +4417,16 @@ void radv_CmdBeginRenderPass( result = radv_cmd_state_setup_sample_locations(cmd_buffer, pass, pRenderPassBegin); if (result != VK_SUCCESS) return; +} + +void radv_CmdBeginRenderPass( + VkCommandBuffer commandBuffer, + const VkRenderPassBeginInfo* pRenderPassBegin, + VkSubpassContents contents) +{ + RADV_FROM_HANDLE(radv_cmd_buffer, cmd_buffer, commandBuffer); + + radv_cmd_buffer_begin_render_pass(cmd_buffer, pRenderPassBegin); radv_cmd_buffer_begin_subpass(cmd_buffer, 0); } @@ -5270,15 +5278,9 @@ void radv_unaligned_dispatch( radv_dispatch(cmd_buffer, &info); } -void radv_CmdEndRenderPass( - VkCommandBuffer commandBuffer) +void +radv_cmd_buffer_end_render_pass(struct radv_cmd_buffer *cmd_buffer) { - RADV_FROM_HANDLE(radv_cmd_buffer, cmd_buffer, commandBuffer); - - radv_subpass_barrier(cmd_buffer, &cmd_buffer->state.pass->end_barrier); - - radv_cmd_buffer_end_subpass(cmd_buffer); - vk_free(&cmd_buffer->pool->alloc, cmd_buffer->state.attachments); vk_free(&cmd_buffer->pool->alloc, cmd_buffer->state.subpass_sample_locs); @@ -5289,6 +5291,18 @@ void radv_CmdEndRenderPass( cmd_buffer->state.subpass_sample_locs = NULL; } +void radv_CmdEndRenderPass( + VkCommandBuffer commandBuffer) +{ + RADV_FROM_HANDLE(radv_cmd_buffer, cmd_buffer, commandBuffer); + + radv_subpass_barrier(cmd_buffer, &cmd_buffer->state.pass->end_barrier); + + radv_cmd_buffer_end_subpass(cmd_buffer); + + radv_cmd_buffer_end_render_pass(cmd_buffer); +} + void radv_CmdEndRenderPass2( VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo) diff --git a/src/amd/vulkan/radv_meta_blit.c b/src/amd/vulkan/radv_meta_blit.c index c19c1203db6..b7a9205085e 100644 --- a/src/amd/vulkan/radv_meta_blit.c +++ b/src/amd/vulkan/radv_meta_blit.c @@ -350,18 +350,18 @@ meta_emit_blit(struct radv_cmd_buffer *cmd_buffer, unsigned dst_layout = radv_meta_dst_layout_from_layout(dest_image_layout); fs_key = radv_format_meta_fs_key(dest_image->vk_format); - radv_CmdBeginRenderPass(radv_cmd_buffer_to_handle(cmd_buffer), - &(VkRenderPassBeginInfo) { - .sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO, - .renderPass = device->meta_state.blit.render_pass[fs_key][dst_layout], - .framebuffer = fb, - .renderArea = { - .offset = { dest_box.offset.x, dest_box.offset.y }, - .extent = { dest_box.extent.width, dest_box.extent.height }, - }, - .clearValueCount = 0, - .pClearValues = NULL, - }, VK_SUBPASS_CONTENTS_INLINE); + radv_cmd_buffer_begin_render_pass(cmd_buffer, + &(VkRenderPassBeginInfo) { + .sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO, + .renderPass = device->meta_state.blit.render_pass[fs_key][dst_layout], + .framebuffer = fb, + .renderArea = { + .offset = { dest_box.offset.x, dest_box.offset.y }, + .extent = { dest_box.extent.width, dest_box.extent.height }, + }, + .clearValueCount = 0, + .pClearValues = NULL, + }); switch (src_image->type) { case VK_IMAGE_TYPE_1D: pipeline = &device->meta_state.blit.pipeline_1d_src[fs_key]; @@ -379,18 +379,18 @@ meta_emit_blit(struct radv_cmd_buffer *cmd_buffer, } case VK_IMAGE_ASPECT_DEPTH_BIT: { enum radv_blit_ds_layout ds_layout = radv_meta_blit_ds_to_type(dest_image_layout); - radv_CmdBeginRenderPass(radv_cmd_buffer_to_handle(cmd_buffer), - &(VkRenderPassBeginInfo) { - .sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO, - .renderPass = device->meta_state.blit.depth_only_rp[ds_layout], - .framebuffer = fb, - .renderArea = { - .offset = { dest_box.offset.x, dest_box.offset.y }, - .extent = { dest_box.extent.width, dest_box.extent.height }, - }, - .clearValueCount = 0, - .pClearValues = NULL, - }, VK_SUBPASS_CONTENTS_INLINE); + radv_cmd_buffer_begin_render_pass(cmd_buffer, + &(VkRenderPassBeginInfo) { + .sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO, + .renderPass = device->meta_state.blit.depth_only_rp[ds_layout], + .framebuffer = fb, + .renderArea = { + .offset = { dest_box.offset.x, dest_box.offset.y }, + .extent = { dest_box.extent.width, dest_box.extent.height }, + }, + .clearValueCount = 0, + .pClearValues = NULL, + }); switch (src_image->type) { case VK_IMAGE_TYPE_1D: pipeline = &device->meta_state.blit.depth_only_1d_pipeline; @@ -408,18 +408,18 @@ meta_emit_blit(struct radv_cmd_buffer *cmd_buffer, } case VK_IMAGE_ASPECT_STENCIL_BIT: { enum radv_blit_ds_layout ds_layout = radv_meta_blit_ds_to_type(dest_image_layout); - radv_CmdBeginRenderPass(radv_cmd_buffer_to_handle(cmd_buffer), - &(VkRenderPassBeginInfo) { - .sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO, - .renderPass = device->meta_state.blit.stencil_only_rp[ds_layout], - .framebuffer = fb, - .renderArea = { - .offset = { dest_box.offset.x, dest_box.offset.y }, - .extent = { dest_box.extent.width, dest_box.extent.height }, - }, - .clearValueCount = 0, - .pClearValues = NULL, - }, VK_SUBPASS_CONTENTS_INLINE); + radv_cmd_buffer_begin_render_pass(cmd_buffer, + &(VkRenderPassBeginInfo) { + .sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO, + .renderPass = device->meta_state.blit.stencil_only_rp[ds_layout], + .framebuffer = fb, + .renderArea = { + .offset = { dest_box.offset.x, dest_box.offset.y }, + .extent = { dest_box.extent.width, dest_box.extent.height }, + }, + .clearValueCount = 0, + .pClearValues = NULL, + }); switch (src_image->type) { case VK_IMAGE_TYPE_1D: pipeline = &device->meta_state.blit.stencil_only_1d_pipeline; @@ -439,6 +439,9 @@ meta_emit_blit(struct radv_cmd_buffer *cmd_buffer, unreachable("bad VkImageType"); } + radv_cmd_buffer_set_subpass(cmd_buffer, + &cmd_buffer->state.pass->subpasses[0]); + if (!*pipeline) { VkResult ret = build_pipeline(device, src_iview->aspect_mask, translate_sampler_dim(src_image->type), fs_key, pipeline); if (ret != VK_SUCCESS) { @@ -491,7 +494,7 @@ meta_emit_blit(struct radv_cmd_buffer *cmd_buffer, radv_CmdDraw(radv_cmd_buffer_to_handle(cmd_buffer), 3, 1, 0, 0); fail_pipeline: - radv_CmdEndRenderPass(radv_cmd_buffer_to_handle(cmd_buffer)); + radv_cmd_buffer_end_render_pass(cmd_buffer); /* At the point where we emit the draw call, all data from the * descriptor sets, etc. has been used. We are free to delete it. diff --git a/src/amd/vulkan/radv_meta_blit2d.c b/src/amd/vulkan/radv_meta_blit2d.c index 06d95ceeab4..38795038006 100644 --- a/src/amd/vulkan/radv_meta_blit2d.c +++ b/src/amd/vulkan/radv_meta_blit2d.c @@ -299,19 +299,21 @@ radv_meta_blit2d_normal_dst(struct radv_cmd_buffer *cmd_buffer, } } - radv_CmdBeginRenderPass(radv_cmd_buffer_to_handle(cmd_buffer), - &(VkRenderPassBeginInfo) { - .sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO, + radv_cmd_buffer_begin_render_pass(cmd_buffer, + &(VkRenderPassBeginInfo) { + .sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO, .renderPass = device->meta_state.blit2d_render_passes[fs_key][dst_layout], .framebuffer = dst_temps.fb, .renderArea = { - .offset = { rects[r].dst_x, rects[r].dst_y, }, - .extent = { rects[r].width, rects[r].height }, - }, + .offset = { rects[r].dst_x, rects[r].dst_y, }, + .extent = { rects[r].width, rects[r].height }, + }, .clearValueCount = 0, - .pClearValues = NULL, - }, VK_SUBPASS_CONTENTS_INLINE); + .pClearValues = NULL, + }); + radv_cmd_buffer_set_subpass(cmd_buffer, + &cmd_buffer->state.pass->subpasses[0]); bind_pipeline(cmd_buffer, src_type, fs_key, log2_samples); } else if (aspect_mask == VK_IMAGE_ASPECT_DEPTH_BIT) { @@ -325,19 +327,21 @@ radv_meta_blit2d_normal_dst(struct radv_cmd_buffer *cmd_buffer, } } - radv_CmdBeginRenderPass(radv_cmd_buffer_to_handle(cmd_buffer), - &(VkRenderPassBeginInfo) { - .sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO, + radv_cmd_buffer_begin_render_pass(cmd_buffer, + &(VkRenderPassBeginInfo) { + .sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO, .renderPass = device->meta_state.blit2d_depth_only_rp[ds_layout], .framebuffer = dst_temps.fb, .renderArea = { - .offset = { rects[r].dst_x, rects[r].dst_y, }, - .extent = { rects[r].width, rects[r].height }, - }, + .offset = { rects[r].dst_x, rects[r].dst_y, }, + .extent = { rects[r].width, rects[r].height }, + }, .clearValueCount = 0, - .pClearValues = NULL, - }, VK_SUBPASS_CONTENTS_INLINE); + .pClearValues = NULL, + }); + radv_cmd_buffer_set_subpass(cmd_buffer, + &cmd_buffer->state.pass->subpasses[0]); bind_depth_pipeline(cmd_buffer, src_type, log2_samples); @@ -352,19 +356,21 @@ radv_meta_blit2d_normal_dst(struct radv_cmd_buffer *cmd_buffer, } } - radv_CmdBeginRenderPass(radv_cmd_buffer_to_handle(cmd_buffer), - &(VkRenderPassBeginInfo) { - .sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO, + radv_cmd_buffer_begin_render_pass(cmd_buffer, + &(VkRenderPassBeginInfo) { + .sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO, .renderPass = device->meta_state.blit2d_stencil_only_rp[ds_layout], .framebuffer = dst_temps.fb, .renderArea = { - .offset = { rects[r].dst_x, rects[r].dst_y, }, - .extent = { rects[r].width, rects[r].height }, - }, + .offset = { rects[r].dst_x, rects[r].dst_y, }, + .extent = { rects[r].width, rects[r].height }, + }, .clearValueCount = 0, - .pClearValues = NULL, - }, VK_SUBPASS_CONTENTS_INLINE); + .pClearValues = NULL, + }); + radv_cmd_buffer_set_subpass(cmd_buffer, + &cmd_buffer->state.pass->subpasses[0]); bind_stencil_pipeline(cmd_buffer, src_type, log2_samples); } else @@ -387,7 +393,7 @@ radv_meta_blit2d_normal_dst(struct radv_cmd_buffer *cmd_buffer, radv_CmdDraw(radv_cmd_buffer_to_handle(cmd_buffer), 3, 1, 0, 0); - radv_CmdEndRenderPass(radv_cmd_buffer_to_handle(cmd_buffer)); + radv_cmd_buffer_end_render_pass(cmd_buffer); fail_pipeline: /* At the point where we emit the draw call, all data from the diff --git a/src/amd/vulkan/radv_meta_clear.c b/src/amd/vulkan/radv_meta_clear.c index 6d6f11b0662..5ca510dfd62 100644 --- a/src/amd/vulkan/radv_meta_clear.c +++ b/src/amd/vulkan/radv_meta_clear.c @@ -2153,22 +2153,24 @@ radv_clear_image_layer(struct radv_cmd_buffer *cmd_buffer, &cmd_buffer->pool->alloc, &pass); - radv_CmdBeginRenderPass(radv_cmd_buffer_to_handle(cmd_buffer), - &(VkRenderPassBeginInfo) { - .sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO, + radv_cmd_buffer_begin_render_pass(cmd_buffer, + &(VkRenderPassBeginInfo) { + .sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO, .renderArea = { .offset = { 0, 0, }, .extent = { .width = width, .height = height, + }, }, - }, .renderPass = pass, .framebuffer = fb, .clearValueCount = 0, .pClearValues = NULL, - }, - VK_SUBPASS_CONTENTS_INLINE); + }); + + radv_cmd_buffer_set_subpass(cmd_buffer, + &cmd_buffer->state.pass->subpasses[0]); VkClearAttachment clear_att = { .aspectMask = range->aspectMask, @@ -2187,7 +2189,7 @@ radv_clear_image_layer(struct radv_cmd_buffer *cmd_buffer, emit_clear(cmd_buffer, &clear_att, &clear_rect, NULL, NULL, 0, false); - radv_CmdEndRenderPass(radv_cmd_buffer_to_handle(cmd_buffer)); + radv_cmd_buffer_end_render_pass(cmd_buffer); radv_DestroyRenderPass(device_h, pass, &cmd_buffer->pool->alloc); radv_DestroyFramebuffer(device_h, fb, diff --git a/src/amd/vulkan/radv_meta_decompress.c b/src/amd/vulkan/radv_meta_decompress.c index d2cb3f08986..43412f69a63 100644 --- a/src/amd/vulkan/radv_meta_decompress.c +++ b/src/amd/vulkan/radv_meta_decompress.c @@ -454,28 +454,29 @@ radv_process_depth_image_layer(struct radv_cmd_buffer *cmd_buffer, .layers = 1 }, &cmd_buffer->pool->alloc, &fb_h); - radv_CmdBeginRenderPass(radv_cmd_buffer_to_handle(cmd_buffer), - &(VkRenderPassBeginInfo) { - .sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO, - .renderPass = state->depth_decomp[samples_log2].pass, - .framebuffer = fb_h, - .renderArea = { - .offset = { - 0, - 0, + radv_cmd_buffer_begin_render_pass(cmd_buffer, + &(VkRenderPassBeginInfo) { + .sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO, + .renderPass = state->depth_decomp[samples_log2].pass, + .framebuffer = fb_h, + .renderArea = { + .offset = { + 0, + 0, + }, + .extent = { + width, + height, + } }, - .extent = { - width, - height, - } - }, - .clearValueCount = 0, - .pClearValues = NULL, - }, - VK_SUBPASS_CONTENTS_INLINE); + .clearValueCount = 0, + .pClearValues = NULL, + }); + radv_cmd_buffer_set_subpass(cmd_buffer, + &cmd_buffer->state.pass->subpasses[0]); radv_CmdDraw(radv_cmd_buffer_to_handle(cmd_buffer), 3, 1, 0, 0); - radv_CmdEndRenderPass(radv_cmd_buffer_to_handle(cmd_buffer)); + radv_cmd_buffer_end_render_pass(cmd_buffer); radv_DestroyFramebuffer(radv_device_to_handle(device), fb_h, &cmd_buffer->pool->alloc); diff --git a/src/amd/vulkan/radv_meta_fast_clear.c b/src/amd/vulkan/radv_meta_fast_clear.c index 84646a8b5dd..fc80aaf74c8 100644 --- a/src/amd/vulkan/radv_meta_fast_clear.c +++ b/src/amd/vulkan/radv_meta_fast_clear.c @@ -626,31 +626,28 @@ radv_process_color_image_layer(struct radv_cmd_buffer *cmd_buffer, .layers = 1 }, &cmd_buffer->pool->alloc, &fb_h); - radv_CmdBeginRenderPass(radv_cmd_buffer_to_handle(cmd_buffer), - &(VkRenderPassBeginInfo) { - .sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO, - .renderPass = device->meta_state.fast_clear_flush.pass, - .framebuffer = fb_h, - .renderArea = { - .offset = { - 0, - 0, + radv_cmd_buffer_begin_render_pass(cmd_buffer, + &(VkRenderPassBeginInfo) { + .sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO, + .renderPass = device->meta_state.fast_clear_flush.pass, + .framebuffer = fb_h, + .renderArea = { + .offset = { 0, 0, }, + .extent = { width, height, } }, - .extent = { - width, - height, - } - }, - .clearValueCount = 0, - .pClearValues = NULL, - }, VK_SUBPASS_CONTENTS_INLINE); + .clearValueCount = 0, + .pClearValues = NULL, + }); + + radv_cmd_buffer_set_subpass(cmd_buffer, + &cmd_buffer->state.pass->subpasses[0]); radv_CmdDraw(radv_cmd_buffer_to_handle(cmd_buffer), 3, 1, 0, 0); cmd_buffer->state.flush_bits |= RADV_CMD_FLAG_FLUSH_AND_INV_CB | RADV_CMD_FLAG_FLUSH_AND_INV_CB_META; - radv_CmdEndRenderPass(radv_cmd_buffer_to_handle(cmd_buffer)); + radv_cmd_buffer_end_render_pass(cmd_buffer); radv_DestroyFramebuffer(radv_device_to_handle(device), fb_h, &cmd_buffer->pool->alloc); diff --git a/src/amd/vulkan/radv_meta_resolve.c b/src/amd/vulkan/radv_meta_resolve.c index ed66a911284..0a03e62f9cb 100644 --- a/src/amd/vulkan/radv_meta_resolve.c +++ b/src/amd/vulkan/radv_meta_resolve.c @@ -609,25 +609,27 @@ void radv_CmdResolveImage( &cmd_buffer->pool->alloc, &fb_h); - radv_CmdBeginRenderPass(cmd_buffer_h, - &(VkRenderPassBeginInfo) { - .sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO, - .renderPass = device->meta_state.resolve.pass[fs_key], - .framebuffer = fb_h, - .renderArea = { - .offset = { - dstOffset.x, - dstOffset.y, - }, - .extent = { - extent.width, - extent.height, + radv_cmd_buffer_begin_render_pass(cmd_buffer, + &(VkRenderPassBeginInfo) { + .sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO, + .renderPass = device->meta_state.resolve.pass[fs_key], + .framebuffer = fb_h, + .renderArea = { + .offset = { + dstOffset.x, + dstOffset.y, + }, + .extent = { + extent.width, + extent.height, } - }, - .clearValueCount = 0, - .pClearValues = NULL, - }, - VK_SUBPASS_CONTENTS_INLINE); + }, + .clearValueCount = 0, + .pClearValues = NULL, + }); + + radv_cmd_buffer_set_subpass(cmd_buffer, + &cmd_buffer->state.pass->subpasses[0]); emit_resolve(cmd_buffer, dest_iview.vk_format, @@ -640,7 +642,7 @@ void radv_CmdResolveImage( .height = extent.height, }); - radv_CmdEndRenderPass(cmd_buffer_h); + radv_cmd_buffer_end_render_pass(cmd_buffer); radv_DestroyFramebuffer(device_h, fb_h, &cmd_buffer->pool->alloc); diff --git a/src/amd/vulkan/radv_meta_resolve_fs.c b/src/amd/vulkan/radv_meta_resolve_fs.c index 2e8d40f04af..12ff91ab3f3 100644 --- a/src/amd/vulkan/radv_meta_resolve_fs.c +++ b/src/amd/vulkan/radv_meta_resolve_fs.c @@ -1127,20 +1127,21 @@ void radv_meta_resolve_fragment_image(struct radv_cmd_buffer *cmd_buffer, .layers = 1 }, &cmd_buffer->pool->alloc, &fb); - radv_CmdBeginRenderPass(radv_cmd_buffer_to_handle(cmd_buffer), - &(VkRenderPassBeginInfo) { - .sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO, - .renderPass = rp, - .framebuffer = fb, - .renderArea = { - .offset = { dstOffset.x, dstOffset.y, }, - .extent = { extent.width, extent.height }, - }, + radv_cmd_buffer_begin_render_pass(cmd_buffer, + &(VkRenderPassBeginInfo) { + .sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO, + .renderPass = rp, + .framebuffer = fb, + .renderArea = { + .offset = { dstOffset.x, dstOffset.y, }, + .extent = { extent.width, extent.height }, + }, .clearValueCount = 0, .pClearValues = NULL, - }, VK_SUBPASS_CONTENTS_INLINE); - + }); + radv_cmd_buffer_set_subpass(cmd_buffer, + &cmd_buffer->state.pass->subpasses[0]); emit_resolve(cmd_buffer, &src_iview, @@ -1149,7 +1150,7 @@ void radv_meta_resolve_fragment_image(struct radv_cmd_buffer *cmd_buffer, &(VkOffset2D) { dstOffset.x, dstOffset.y }, &(VkExtent2D) { extent.width, extent.height }); - radv_CmdEndRenderPass(radv_cmd_buffer_to_handle(cmd_buffer)); + radv_cmd_buffer_end_render_pass(cmd_buffer); radv_DestroyFramebuffer(radv_device_to_handle(cmd_buffer->device), fb, &cmd_buffer->pool->alloc); } diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h index 83a41a607a3..42a1a43249b 100644 --- a/src/amd/vulkan/radv_private.h +++ b/src/amd/vulkan/radv_private.h @@ -2487,6 +2487,10 @@ si_conv_gl_prim_to_vertices(unsigned gl_prim) } } +void radv_cmd_buffer_begin_render_pass(struct radv_cmd_buffer *cmd_buffer, + const VkRenderPassBeginInfo *pRenderPassBegin); +void radv_cmd_buffer_end_render_pass(struct radv_cmd_buffer *cmd_buffer); + #define RADV_DEFINE_HANDLE_CASTS(__radv_type, __VkType) \ \ static inline struct __radv_type * \ -- 2.30.2