From 9c824aa0b59893cb88b2a89b0d2795af17208999 Mon Sep 17 00:00:00 2001 From: kd-11 Date: Mon, 23 May 2022 21:11:46 +0300 Subject: [PATCH] vk: Enable event scope hack for INTEL proprietary drivers --- rpcs3/Emu/RSX/VK/vkutils/sync.cpp | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/rpcs3/Emu/RSX/VK/vkutils/sync.cpp b/rpcs3/Emu/RSX/VK/vkutils/sync.cpp index 71d559ecc0..f2ae6b4298 100644 --- a/rpcs3/Emu/RSX/VK/vkutils/sync.cpp +++ b/rpcs3/Emu/RSX/VK/vkutils/sync.cpp @@ -74,19 +74,12 @@ namespace vk event::event(const render_device& dev, sync_domain domain) : m_device(dev) { - if (domain == sync_domain::gpu || dev.gpu().get_driver_vendor() != driver_vendor::AMD) + const auto vendor = dev.gpu().get_driver_vendor(); + if (domain != sync_domain::gpu && + (vendor == vk::driver_vendor::AMD || vendor == vk::driver_vendor::INTEL)) { - VkEventCreateInfo info - { - .sType = VK_STRUCTURE_TYPE_EVENT_CREATE_INFO, - .pNext = nullptr, - .flags = 0 - }; - vkCreateEvent(dev, &info, nullptr, &m_vk_event); - } - else - { - // Work around AMD's broken event signals + // Work around AMD and INTEL broken event signal synchronization scope + // Will be dropped after transitioning to VK1.3 m_buffer = std::make_unique ( dev, @@ -101,6 +94,16 @@ namespace vk m_value = reinterpret_cast(m_buffer->map(0, 4)); *m_value = 0xCAFEBABE; } + else + { + VkEventCreateInfo info + { + .sType = VK_STRUCTURE_TYPE_EVENT_CREATE_INFO, + .pNext = nullptr, + .flags = 0 + }; + vkCreateEvent(dev, &info, nullptr, &m_vk_event); + } } event::~event()