summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineD3D12
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2018-10-08 03:05:43 +0000
committerEgor Yusov <egor.yusov@gmail.com>2018-10-08 03:05:43 +0000
commit5afeee8a82d07a18c36f73750114885940802479 (patch)
tree2e1212e51b1cc0bee6b15d6d6544fba658b25990 /Graphics/GraphicsEngineD3D12
parentFew changes to D3D12 and Vulkan backends to make implementations more consistent (diff)
downloadDiligentCore-5afeee8a82d07a18c36f73750114885940802479.tar.gz
DiligentCore-5afeee8a82d07a18c36f73750114885940802479.zip
Couple of minor updates to D3D12 and Vulkan device context implementations
Diffstat (limited to 'Graphics/GraphicsEngineD3D12')
-rw-r--r--Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp
index 6cee61df..64361e5d 100644
--- a/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp
+++ b/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp
@@ -120,7 +120,7 @@ namespace Diligent
if (m_State.NumCommands != 0)
{
LOG_ERROR_MESSAGE(m_bIsDeferred ?
- "There are outstanding commands in the deferred context being destroyed, which indicates that FinishCommandList() has not been called." :
+ "There are outstanding commands in deferred context #", m_ContextId, " being destroyed, which indicates that FinishCommandList() has not been called." :
"There are outstanding commands in the immediate context being destroyed, which indicates the context has not been Flush()'ed.",
" This is unexpected and may result in synchronization errors");
}
@@ -577,7 +577,12 @@ namespace Diligent
void DeviceContextD3D12Impl::Flush()
{
- VERIFY(!m_bIsDeferred, "Flush() should only be called for immediate contexts");
+ if (m_bIsDeferred)
+ {
+ LOG_ERROR_MESSAGE("Flush() should only be called for immediate contexts");
+ return;
+ }
+
Flush(true);
}
@@ -586,7 +591,7 @@ namespace Diligent
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 deferred device context #", m_ContextId, " 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");
}
@@ -1072,7 +1077,7 @@ namespace Diligent
{
if (m_bIsDeferred)
{
- LOG_ERROR("Only immediate context can execute command list");
+ LOG_ERROR_MESSAGE("Only immediate context can execute command list");
return;
}
// First execute commands in this context