summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineD3D12
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2018-10-07 02:08:06 +0000
committerEgor Yusov <egor.yusov@gmail.com>2018-10-07 02:08:06 +0000
commit9d1014f0afdcf2c5897019448f42e1352ae8c1f2 (patch)
tree6e0247c4eed0609926bd80cbd81440bf4ac83860 /Graphics/GraphicsEngineD3D12
parentFixed minor potential issue in ~CPUDescriptorHeap() (diff)
downloadDiligentCore-9d1014f0afdcf2c5897019448f42e1352ae8c1f2.tar.gz
DiligentCore-9d1014f0afdcf2c5897019448f42e1352ae8c1f2.zip
Added debug check to DeviceContextD3D12Impl::FinishFrame() to verify there are no outstanding commands in the context
Diffstat (limited to 'Graphics/GraphicsEngineD3D12')
-rw-r--r--Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp
index 263e4ecd..719c5f48 100644
--- a/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp
+++ b/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp
@@ -576,6 +576,11 @@ namespace Diligent
void DeviceContextD3D12Impl::FinishFrame()
{
+ if (GetNumCommandsInCtx() != 0)
+ LOG_ERROR_MESSAGE(m_bIsDeferred ?
+ "There are outstanding commands in the deferred device context when finishing the frame. This is an error and may cause unpredicted behaviour. Close all deferred contexts and execute them before finishing the frame" :
+ "There are outstanding commands in the immediate device context when finishing the frame. This is an error and may cause unpredicted behaviour. Call Flush() to submit all commands for execution before finishing the frame");
+
VERIFY_EXPR(m_bIsDeferred || m_SubmittedBuffersCmdQueueMask == (Uint64{1}<<m_CommandQueueId));
// Released pages are returned to the global dynamic memory manager hosted by render device.