diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2019-09-09 01:04:58 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2019-09-09 01:04:58 +0000 |
| commit | a85347704ba95234da16298f28ba2b431c4f569c (patch) | |
| tree | e1ca567d87bd81106731c4b97fa511b55db770af /Graphics/GraphicsEngineD3D11 | |
| parent | Added IDeviceContext::WaitForIdle() method (updated API version to 240028) (diff) | |
| download | DiligentCore-a85347704ba95234da16298f28ba2b431c4f569c.tar.gz DiligentCore-a85347704ba95234da16298f28ba2b431c4f569c.zip | |
Added IRenderDevice::IdleGPU() method (updated API version to 240029)
Diffstat (limited to 'Graphics/GraphicsEngineD3D11')
| -rw-r--r-- | Graphics/GraphicsEngineD3D11/include/RenderDeviceD3D11Impl.h | 2 | ||||
| -rw-r--r-- | Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp | 8 |
2 files changed, 10 insertions, 0 deletions
diff --git a/Graphics/GraphicsEngineD3D11/include/RenderDeviceD3D11Impl.h b/Graphics/GraphicsEngineD3D11/include/RenderDeviceD3D11Impl.h index 5416d9b1..e7216d1a 100644 --- a/Graphics/GraphicsEngineD3D11/include/RenderDeviceD3D11Impl.h +++ b/Graphics/GraphicsEngineD3D11/include/RenderDeviceD3D11Impl.h @@ -68,6 +68,8 @@ public: virtual void ReleaseStaleResources(bool ForceRelease = false)override final {} + virtual void IdleGPU()override final; + size_t GetCommandQueueCount()const { return 1; } Uint64 GetCommandQueueMask()const { return Uint64{1};} diff --git a/Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp index ebae97fc..ba1e6829 100644 --- a/Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp +++ b/Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp @@ -291,4 +291,12 @@ void RenderDeviceD3D11Impl::CreateFence(const FenceDesc& Desc, IFence** ppFence) ); } +void RenderDeviceD3D11Impl::IdleGPU() +{ + if (auto pImmediateCtx = m_wpImmediateContext.Lock()) + { + pImmediateCtx->WaitForIdle(); + } +} + } |
