Skip to content

Commit

Permalink
vk: Fix GPU hang
Browse files Browse the repository at this point in the history
  • Loading branch information
kd-11 committed Jun 28, 2023
1 parent cd5a19f commit b1a9205
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions rpcs3/Emu/RSX/VK/vkutils/sync.cpp
Expand Up @@ -340,18 +340,23 @@ namespace vk

void event::reset() const
{
if (m_backend == sync_backend::gpu_label)
if (m_backend != sync_backend::gpu_label) [[ likely ]]
{
m_label->reset();
vkResetEvent(*m_device, m_vk_event);
return;
}

vkResetEvent(*m_device, m_vk_event);
m_label->reset();
}

VkResult event::status() const
{
return vkGetEventStatus(*m_device, m_vk_event);
if (m_backend != sync_backend::gpu_label) [[ likely ]]
{
return vkGetEventStatus(*m_device, m_vk_event);
}

return m_label->signaled() ? VK_EVENT_SET : VK_EVENT_RESET;
}

gpu_label_pool::gpu_label_pool(const vk::render_device& dev, u32 count)
Expand Down

0 comments on commit b1a9205

Please sign in to comment.