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/GraphicsEngine/interface/APIInfo.h | 2 +- Graphics/GraphicsEngine/interface/DeviceContext.h | 20 +++++++++++++------- 2 files changed, 14 insertions(+), 8 deletions(-) (limited to 'Graphics/GraphicsEngine') 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. -- cgit v1.2.3