From 3e3a327fe4be8852400709f6b3c8677f10f075d8 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Sun, 8 Sep 2019 17:05:37 -0700 Subject: Renamed IDeviceContext::Wait to IDeviceContext::WaitForFence (updated API version to 240027). Added FlushContext parameter to the methods --- Graphics/GraphicsEngineVulkan/include/DeviceContextVkImpl.h | 2 +- Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'Graphics/GraphicsEngineVulkan') diff --git a/Graphics/GraphicsEngineVulkan/include/DeviceContextVkImpl.h b/Graphics/GraphicsEngineVulkan/include/DeviceContextVkImpl.h index bce9f300..a7f02919 100644 --- a/Graphics/GraphicsEngineVulkan/include/DeviceContextVkImpl.h +++ b/Graphics/GraphicsEngineVulkan/include/DeviceContextVkImpl.h @@ -159,7 +159,7 @@ public: virtual void SignalFence(IFence* pFence, Uint64 Value)override final; - virtual void Wait(IFence* pFence, Uint64 Value)override final; + virtual void WaitForFence(IFence* pFence, Uint64 Value, bool FlushContext)override final; // Transitions texture subresources from OldState to NewState, and optionally updates // internal texture state. diff --git a/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp index d2252b4a..2a8cafde 100644 --- a/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp +++ b/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp @@ -1916,10 +1916,11 @@ namespace Diligent m_PendingFences.emplace_back( std::make_pair(Value, pFence) ); } - void DeviceContextVkImpl::Wait(IFence* pFence, Uint64 Value) + void DeviceContextVkImpl::WaitForFence(IFence* pFence, Uint64 Value, bool FlushContext) { VERIFY(!m_bIsDeferred, "Fence can only be waited from immediate context"); - Flush(); + if (FlushContext) + Flush(); auto* pFenceVk = ValidatedCast(pFence); pFenceVk->Wait(Value); } -- cgit v1.2.3