diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2019-12-07 02:50:10 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2019-12-07 02:50:10 +0000 |
| commit | 3883552af7b01aa6699a6a18ba405537dd0968dd (patch) | |
| tree | a01946b2826378e2e4cb9777694bd59ae4f5785c /Graphics/GraphicsEngineD3D12 | |
| parent | Added ADAPTER_TYPE enum and AdapterType member to AdapterAttribs struct (API ... (diff) | |
| download | DiligentCore-3883552af7b01aa6699a6a18ba405537dd0968dd.tar.gz DiligentCore-3883552af7b01aa6699a6a18ba405537dd0968dd.zip | |
Added DiligentCoreAPITest
Diffstat (limited to 'Graphics/GraphicsEngineD3D12')
| -rw-r--r-- | Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp | 8 |
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, |
