vk: Minor refactor to make early-exit branches trivial and easier to read
This commit is contained in:
@@ -304,8 +304,12 @@ namespace vk
|
||||
resolve_dependencies(cmd, dependency);
|
||||
|
||||
// 2. Signalling won't wait. The caller is responsible for setting up the dependencies correctly.
|
||||
if (m_backend == sync_backend::events_v2)
|
||||
if (m_backend != sync_backend::events_v2)
|
||||
{
|
||||
vkCmdSetEvent(cmd, m_vk_event, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT);
|
||||
return;
|
||||
}
|
||||
|
||||
// We need a memory barrier to keep AMDVLK from hanging
|
||||
VkMemoryBarrier2KHR mem_barrier =
|
||||
{
|
||||
@@ -323,10 +327,6 @@ namespace vk
|
||||
};
|
||||
|
||||
m_device->_vkCmdSetEvent2KHR(cmd, m_vk_event, &empty_dependency);
|
||||
return;
|
||||
}
|
||||
|
||||
vkCmdSetEvent(cmd, m_vk_event, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT);
|
||||
}
|
||||
|
||||
void event::host_signal() const
|
||||
|
||||
Reference in New Issue
Block a user