summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineD3D12
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-12-07 02:50:10 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-12-07 02:50:10 +0000
commit3883552af7b01aa6699a6a18ba405537dd0968dd (patch)
treea01946b2826378e2e4cb9777694bd59ae4f5785c /Graphics/GraphicsEngineD3D12
parentAdded ADAPTER_TYPE enum and AdapterType member to AdapterAttribs struct (API ... (diff)
downloadDiligentCore-3883552af7b01aa6699a6a18ba405537dd0968dd.tar.gz
DiligentCore-3883552af7b01aa6699a6a18ba405537dd0968dd.zip
Added DiligentCoreAPITest
Diffstat (limited to 'Graphics/GraphicsEngineD3D12')
-rw-r--r--Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp
index d616e636..5e3b9bd1 100644
--- a/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp
+++ b/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp
@@ -983,9 +983,11 @@ void DeviceContextD3D12Impl::CommitRenderTargets(RESOURCE_STATE_TRANSITION_MODE
}
}
- VERIFY_EXPR(NumRenderTargets > 0 || DSVHandle.ptr != 0);
- // No need to flush resource barriers as this is a CPU-side command
- CmdCtx.AsGraphicsContext().GetCommandList()->OMSetRenderTargets(NumRenderTargets, RTVHandles, FALSE, DSVHandle.ptr != 0 ? &DSVHandle : nullptr);
+ if (NumRenderTargets > 0 || DSVHandle.ptr != 0)
+ {
+ // No need to flush resource barriers as this is a CPU-side command
+ CmdCtx.AsGraphicsContext().GetCommandList()->OMSetRenderTargets(NumRenderTargets, RTVHandles, FALSE, DSVHandle.ptr != 0 ? &DSVHandle : nullptr);
+ }
}
void DeviceContextD3D12Impl::SetRenderTargets(Uint32 NumRenderTargets,