From ae289a9d49ab469a5fc1962274b4b0fd7eb8dfb1 Mon Sep 17 00:00:00 2001 From: assiduous Date: Sat, 13 Mar 2021 18:57:23 -0800 Subject: Unified fence implementations in all backends --- Graphics/GraphicsEngineVulkan/include/FenceVkImpl.hpp | 3 --- Graphics/GraphicsEngineVulkan/src/FenceVkImpl.cpp | 9 --------- 2 files changed, 12 deletions(-) (limited to 'Graphics/GraphicsEngineVulkan') diff --git a/Graphics/GraphicsEngineVulkan/include/FenceVkImpl.hpp b/Graphics/GraphicsEngineVulkan/include/FenceVkImpl.hpp index b720d604..21b2a7b9 100644 --- a/Graphics/GraphicsEngineVulkan/include/FenceVkImpl.hpp +++ b/Graphics/GraphicsEngineVulkan/include/FenceVkImpl.hpp @@ -76,11 +76,8 @@ public: void Wait(Uint64 Value); private: - inline void UpdateLastCompletedFenceValue(uint64_t NewValue); - VulkanUtilities::VulkanFencePool m_FencePool; std::deque> m_PendingFences; - std::atomic_uint64_t m_LastCompletedFenceValue{0}; }; } // namespace Diligent diff --git a/Graphics/GraphicsEngineVulkan/src/FenceVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/FenceVkImpl.cpp index 9170516a..656e3333 100644 --- a/Graphics/GraphicsEngineVulkan/src/FenceVkImpl.cpp +++ b/Graphics/GraphicsEngineVulkan/src/FenceVkImpl.cpp @@ -64,15 +64,6 @@ FenceVkImpl::~FenceVkImpl() } } -void FenceVkImpl::UpdateLastCompletedFenceValue(uint64_t NewValue) -{ - auto LastCompletedValue = m_LastCompletedFenceValue.load(); - while (!m_LastCompletedFenceValue.compare_exchange_strong(LastCompletedValue, std::max(LastCompletedValue, NewValue))) - { - // If exchange fails, LastCompletedValue will hold the actual value of m_LastCompletedFenceValue. - } -} - Uint64 FenceVkImpl::GetCompletedValue() { const auto& LogicalDevice = m_pDevice->GetLogicalDevice(); -- cgit v1.2.3