From a85347704ba95234da16298f28ba2b431c4f569c Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Sun, 8 Sep 2019 18:04:58 -0700 Subject: Added IRenderDevice::IdleGPU() method (updated API version to 240029) --- Graphics/GraphicsEngineD3D11/include/RenderDeviceD3D11Impl.h | 2 ++ Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp | 8 ++++++++ 2 files changed, 10 insertions(+) (limited to 'Graphics/GraphicsEngineD3D11') 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(); + } +} + } -- cgit v1.2.3