diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2019-09-08 22:10:19 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2019-09-08 22:10:19 +0000 |
| commit | 5dd10dfb1a77df67f0e9b599470d445f6f52bb2b (patch) | |
| tree | 185f6acc5304d0fd3cb61633ebe8dbb44ab5f24c /Graphics/GraphicsEngineD3D12 | |
| parent | Added IDeviceContext::Wait() method (updated API version to 240026) (diff) | |
| download | DiligentCore-5dd10dfb1a77df67f0e9b599470d445f6f52bb2b.tar.gz DiligentCore-5dd10dfb1a77df67f0e9b599470d445f6f52bb2b.zip | |
Updated ICommandQueueD3D12::Wait method to return HRESULT
Diffstat (limited to 'Graphics/GraphicsEngineD3D12')
4 files changed, 6 insertions, 5 deletions
diff --git a/Graphics/GraphicsEngineD3D12/include/CommandQueueD3D12Impl.h b/Graphics/GraphicsEngineD3D12/include/CommandQueueD3D12Impl.h index e1d29f2e..16b9b317 100644 --- a/Graphics/GraphicsEngineD3D12/include/CommandQueueD3D12Impl.h +++ b/Graphics/GraphicsEngineD3D12/include/CommandQueueD3D12Impl.h @@ -58,7 +58,7 @@ public: virtual void SignalFence(ID3D12Fence* pFence, Uint64 Value)override final; - virtual void Wait(ID3D12Fence* pFence, Uint64 Value)override final; + virtual HRESULT Wait(ID3D12Fence* pFence, Uint64 Value)override final; private: // A value that will be signaled by the command queue next diff --git a/Graphics/GraphicsEngineD3D12/interface/CommandQueueD3D12.h b/Graphics/GraphicsEngineD3D12/interface/CommandQueueD3D12.h index 5ad649fa..7df57a3a 100644 --- a/Graphics/GraphicsEngineD3D12/interface/CommandQueueD3D12.h +++ b/Graphics/GraphicsEngineD3D12/interface/CommandQueueD3D12.h @@ -58,7 +58,7 @@ public: virtual void SignalFence(ID3D12Fence* pFence, Uint64 Value) = 0; /// Waits until the specified fence reaches or exceeds the specified value. - virtual void Wait(ID3D12Fence* pFence, Uint64 Value) = 0; + virtual HRESULT Wait(ID3D12Fence* pFence, Uint64 Value) = 0; }; } diff --git a/Graphics/GraphicsEngineD3D12/src/CommandQueueD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/CommandQueueD3D12Impl.cpp index df423816..23bf48ae 100644 --- a/Graphics/GraphicsEngineD3D12/src/CommandQueueD3D12Impl.cpp +++ b/Graphics/GraphicsEngineD3D12/src/CommandQueueD3D12Impl.cpp @@ -99,10 +99,10 @@ void CommandQueueD3D12Impl::SignalFence(ID3D12Fence* pFence, Uint64 Value) m_pd3d12CmdQueue->Signal(pFence, Value); } -void CommandQueueD3D12Impl::Wait(ID3D12Fence* pFence, Uint64 Value) +HRESULT CommandQueueD3D12Impl::Wait(ID3D12Fence* pFence, Uint64 Value) { std::lock_guard<std::mutex> Lock(m_QueueMtx); - m_pd3d12CmdQueue->Wait(pFence, Value); + return m_pd3d12CmdQueue->Wait(pFence, Value); } } diff --git a/Graphics/GraphicsEngineD3D12/src/RenderDeviceD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/RenderDeviceD3D12Impl.cpp index e7ee520e..0b04c709 100644 --- a/Graphics/GraphicsEngineD3D12/src/RenderDeviceD3D12Impl.cpp +++ b/Graphics/GraphicsEngineD3D12/src/RenderDeviceD3D12Impl.cpp @@ -204,7 +204,8 @@ void RenderDeviceD3D12Impl::WaitForFence(Uint32 QueueIndex, IFence* pFence, Uint auto* pFenceD3D12Impl = ValidatedCast<FenceD3D12Impl>(pFence); auto* pd3d12Fence = pFenceD3D12Impl->GetD3D12Fence(); - m_CommandQueues[QueueIndex].CmdQueue->Wait(pd3d12Fence, Value); + auto res = m_CommandQueues[QueueIndex].CmdQueue->Wait(pd3d12Fence, Value); + VERIFY_EXPR(res == S_OK); (void)res; PurgeReleaseQueue(QueueIndex); } |
