summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngine
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-09-09 00:05:37 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-09-09 00:05:37 +0000
commit3e3a327fe4be8852400709f6b3c8677f10f075d8 (patch)
tree592193d248342b4a54a6d6b02d84c65f835d2e9d /Graphics/GraphicsEngine
parentD3D12 backend: fixed issue with fences not being signaled if there is no comm... (diff)
downloadDiligentCore-3e3a327fe4be8852400709f6b3c8677f10f075d8.tar.gz
DiligentCore-3e3a327fe4be8852400709f6b3c8677f10f075d8.zip
Renamed IDeviceContext::Wait to IDeviceContext::WaitForFence (updated API version to 240027). Added FlushContext parameter to the methods
Diffstat (limited to 'Graphics/GraphicsEngine')
-rw-r--r--Graphics/GraphicsEngine/interface/APIInfo.h2
-rw-r--r--Graphics/GraphicsEngine/interface/DeviceContext.h20
2 files changed, 14 insertions, 8 deletions
diff --git a/Graphics/GraphicsEngine/interface/APIInfo.h b/Graphics/GraphicsEngine/interface/APIInfo.h
index 59bd261a..82ff31e0 100644
--- a/Graphics/GraphicsEngine/interface/APIInfo.h
+++ b/Graphics/GraphicsEngine/interface/APIInfo.h
@@ -26,7 +26,7 @@
/// \file
/// Diligent API information
-#define DILIGENT_API_VERSION 240026
+#define DILIGENT_API_VERSION 240027
#include "../../../Primitives/interface/BasicTypes.h"
diff --git a/Graphics/GraphicsEngine/interface/DeviceContext.h b/Graphics/GraphicsEngine/interface/DeviceContext.h
index 62aee8a1..ea40f058 100644
--- a/Graphics/GraphicsEngine/interface/DeviceContext.h
+++ b/Graphics/GraphicsEngine/interface/DeviceContext.h
@@ -799,20 +799,26 @@ public:
virtual void SignalFence(IFence* pFence, Uint64 Value) = 0;
- /// Waits until the specified fence reaches or exceeds the specified value.
+ /// Waits until the specified fence reaches or exceeds the specified value, on the host.
/// \note The method blocks the execution of the calling thread until the wait is complete.
///
- /// \param [in] pFence - The fence to wait.
- /// \param [in] Value - The value that the context is waiting for the fence to reach.
+ /// \param [in] pFence - The fence to wait.
+ /// \param [in] Value - The value that the context is waiting for the fence to reach.
+ /// \param [in] FlushContext - Whether to flush the commands in the context before initiating the wait.
///
/// \remarks Wait is only allowed for immediate contexts.\n
- /// The method flushes the context before initiating the wait (see IDeviceContext::Flush()),
- /// so an application must explicitly reset the PSO and bind all required shader
- /// resources after waiting for a fence.\n
+ /// When FlushContext is true, the method flushes the context before initiating the wait
+ /// (see IDeviceContext::Flush()), so an application must explicitly reset the PSO and
+ /// bind all required shader resources after waiting for the fence.\n
+ /// If FlushContext is false, the commands preceding the fence (including signaling the fence itself)
+ /// may not have been submitted to the GPU and the method may never return. If an application does
+ /// not explicitly flush the context, it should typically set FlushContext to true.\n
+ /// If the value the context is waiting for has never been signaled, the method
+ /// may never return.\n
/// The fence can only be waited for from the same context it has
/// previously been signaled.
- virtual void Wait(IFence* pFence, Uint64 Value) = 0;
+ virtual void WaitForFence(IFence* pFence, Uint64 Value, bool FlushContext) = 0;
/// Submits all pending commands in the context for execution to the command queue.