From 5eb314fbbb12db9256e9ab5576b1d2b7d7e72ea4 Mon Sep 17 00:00:00 2001 From: kd-11 Date: Sat, 29 Feb 2020 15:13:35 +0300 Subject: [PATCH] vk: Add execution barriers. - Useful for debugging --- rpcs3/Emu/RSX/VK/VKHelpers.cpp | 5 +++++ rpcs3/Emu/RSX/VK/VKHelpers.h | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/rpcs3/Emu/RSX/VK/VKHelpers.cpp b/rpcs3/Emu/RSX/VK/VKHelpers.cpp index cd72ce0731..4170b41a29 100644 --- a/rpcs3/Emu/RSX/VK/VKHelpers.cpp +++ b/rpcs3/Emu/RSX/VK/VKHelpers.cpp @@ -601,6 +601,11 @@ namespace vk vkCmdPipelineBarrier(cmd, src_stage, dst_stage, 0, 0, nullptr, 0, nullptr, 1, &barrier); } + void insert_execution_barrier(VkCommandBuffer cmd, VkPipelineStageFlags src_stage, VkPipelineStageFlags dst_stage) + { + vkCmdPipelineBarrier(cmd, src_stage, dst_stage, 0, 0, nullptr, 0, nullptr, 0, nullptr); + } + void change_image_layout(VkCommandBuffer cmd, VkImage image, VkImageLayout current_layout, VkImageLayout new_layout, const VkImageSubresourceRange& range) { //Prepare an image to match the new layout.. diff --git a/rpcs3/Emu/RSX/VK/VKHelpers.h b/rpcs3/Emu/RSX/VK/VKHelpers.h index b90a4d604f..ac9608bc44 100644 --- a/rpcs3/Emu/RSX/VK/VKHelpers.h +++ b/rpcs3/Emu/RSX/VK/VKHelpers.h @@ -208,6 +208,10 @@ namespace vk VkPipelineStageFlags src_stage, VkPipelineStageFlags dst_stage, VkAccessFlags src_mask, VkAccessFlags dst_mask, const VkImageSubresourceRange& range); + void insert_execution_barrier(VkCommandBuffer cmd, + VkPipelineStageFlags src_stage = VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, + VkPipelineStageFlags dst_stage = VK_PIPELINE_STAGE_ALL_COMMANDS_BIT); + void raise_status_interrupt(runtime_state status); void clear_status_interrupt(runtime_state status); bool test_status_interrupt(runtime_state status);