summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineD3D11
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-09-09 01:04:58 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-09-09 01:04:58 +0000
commita85347704ba95234da16298f28ba2b431c4f569c (patch)
treee1ca567d87bd81106731c4b97fa511b55db770af /Graphics/GraphicsEngineD3D11
parentAdded IDeviceContext::WaitForIdle() method (updated API version to 240028) (diff)
downloadDiligentCore-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.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp8
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();
+ }
+}
+
}