1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 18:53:28 +01:00

Add flags to handle sync domain with v2 events

This commit is contained in:
kd-11 2023-06-26 20:46:22 +03:00 committed by kd-11
parent 322b5dac79
commit 3e8f9cbbf2

View File

@ -174,7 +174,7 @@ namespace vk
return m_handle;
}
event::event(const render_device& dev, sync_domain /*domain*/)
event::event(const render_device& dev, sync_domain domain)
: m_device(&dev), v2(dev.get_synchronization2_support())
{
VkEventCreateInfo info
@ -183,6 +183,12 @@ namespace vk
.pNext = nullptr,
.flags = 0
};
if (v2 && domain == sync_domain::gpu)
{
info.flags = VK_EVENT_CREATE_DEVICE_ONLY_BIT_KHR;
}
CHECK_RESULT(vkCreateEvent(dev, &info, nullptr, &m_vk_event));
}