1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-26 04:32:35 +01:00

vk: Add execution barriers.

- Useful for debugging
This commit is contained in:
kd-11 2020-02-29 15:13:35 +03:00 committed by Ivan
parent 655f7ce8a2
commit 5eb314fbbb
2 changed files with 9 additions and 0 deletions

View File

@ -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..

View File

@ -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);