+ vk.EndCommandBuffer(pass_buffer);
+
+ device.get_transfer_queue().dispatch_transfers(primary_buffer);
+
+ Synchronizer &sync = device.get_synchronizer();
+ sync.reset();
+ if(!fb_is_swapchain)
+ framebuffer->prepare_image_layouts(discard_fb_contents);
+ sync.barrier(primary_buffer);
+
+ const VkRenderPassBeginInfo &begin_info = *reinterpret_cast<const VkRenderPassBeginInfo *>(pass_begin_info.data());
+ vk.CmdBeginRenderPass(primary_buffer, begin_info, VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS);
+ vk.CmdExecuteCommands(primary_buffer, 1, &pass_buffer);
+ vk.CmdEndRenderPass(primary_buffer);
+