From 5b41c5ae0d93b5d33a97bcd5e9d8938b3b6dffc5 Mon Sep 17 00:00:00 2001 From: Jonathan Hamilton Date: Wed, 23 Aug 2017 11:33:30 -0700 Subject: [PATCH] Fix vulkan crash on drivers without atomic load/store support This would not allocate a SSBO buffer, but still try to update the descriptor said with a NULL buffer. Which naturally crashed. --- Source/Core/VideoBackends/Vulkan/StateTracker.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Core/VideoBackends/Vulkan/StateTracker.cpp b/Source/Core/VideoBackends/Vulkan/StateTracker.cpp index 92ca9d2b4f..33baa86c4c 100644 --- a/Source/Core/VideoBackends/Vulkan/StateTracker.cpp +++ b/Source/Core/VideoBackends/Vulkan/StateTracker.cpp @@ -1118,7 +1118,8 @@ bool StateTracker::UpdateDescriptorSet() m_dirty_flags |= DIRTY_FLAG_DESCRIPTOR_SET_BINDING; } - if ((m_dirty_flags & DIRTY_FLAG_PS_SSBO || + if (IsSSBODescriptorRequired() && + (m_dirty_flags & DIRTY_FLAG_PS_SSBO || m_descriptor_sets[DESCRIPTOR_SET_BIND_POINT_STORAGE_OR_TEXEL_BUFFER] == VK_NULL_HANDLE)) { VkDescriptorSetLayout layout =