mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-10 09:48:58 +02:00
[vulkan] Reset event before setting them
fixes the said error: Render.Vulkan <Warning> video_core/vulkan_common/vulkan_debug_callback.cpp:71:DebugUtilCallback: vkCmdSetEvent(): commandBuffer VkCommandBuffer 0xb400007cfb508310 sets event VkEvent 0x6970000000697 which was already set (in this command buffer or in the executed secondary command buffers). If this is not the desired behavior, the event must be reset before it is set again.
This commit is contained in:
parent
f2c46eadc1
commit
588ffbfc7d
3 changed files with 7 additions and 0 deletions
|
|
@ -818,6 +818,7 @@ void RasterizerVulkan::WaitForIdle() {
|
|||
|
||||
scheduler.RequestOutsideRenderPassOperationContext();
|
||||
scheduler.Record([event = *wfi_event, flags](vk::CommandBuffer cmdbuf) {
|
||||
cmdbuf.ResetEvent(event, flags);
|
||||
cmdbuf.SetEvent(event, flags);
|
||||
cmdbuf.WaitEvents(event, flags, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, {}, {}, {});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -127,6 +127,7 @@ void Load(VkDevice device, DeviceDispatch& dld) noexcept {
|
|||
X(vkCmdPipelineBarrier);
|
||||
X(vkCmdPushConstants);
|
||||
X(vkCmdPushDescriptorSetWithTemplateKHR);
|
||||
X(vkCmdResetEvent);
|
||||
X(vkCmdSetBlendConstants);
|
||||
X(vkCmdSetDepthBias);
|
||||
X(vkCmdSetDepthBias2EXT);
|
||||
|
|
|
|||
|
|
@ -230,6 +230,7 @@ struct DeviceDispatch : InstanceDispatch {
|
|||
PFN_vkCmdPushConstants vkCmdPushConstants{};
|
||||
PFN_vkCmdPushDescriptorSetWithTemplateKHR vkCmdPushDescriptorSetWithTemplateKHR{};
|
||||
PFN_vkCmdResolveImage vkCmdResolveImage{};
|
||||
PFN_vkCmdResetEvent vkCmdResetEvent{};
|
||||
PFN_vkCmdSetBlendConstants vkCmdSetBlendConstants{};
|
||||
PFN_vkCmdSetCullModeEXT vkCmdSetCullModeEXT{};
|
||||
PFN_vkCmdSetDepthBias vkCmdSetDepthBias{};
|
||||
|
|
@ -1414,6 +1415,10 @@ public:
|
|||
dld->vkCmdSetEvent(handle, event, stage_flags);
|
||||
}
|
||||
|
||||
void ResetEvent(VkEvent event, VkPipelineStageFlags stage_mask) const noexcept {
|
||||
dld->vkCmdResetEvent(handle, event, stage_mask);
|
||||
}
|
||||
|
||||
void WaitEvents(Span<VkEvent> events, VkPipelineStageFlags src_stage_mask,
|
||||
VkPipelineStageFlags dst_stage_mask, Span<VkMemoryBarrier> memory_barriers,
|
||||
Span<VkBufferMemoryBarrier> buffer_barriers,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue