summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineVulkan
diff options
context:
space:
mode:
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
-rw-r--r--Graphics/GraphicsEngineVulkan/include/DeviceContextVkImpl.h2
-rw-r--r--Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp5
2 files changed, 4 insertions, 3 deletions
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<FenceVkImpl>(pFence);
pFenceVk->Wait(Value);
}