From 3883552af7b01aa6699a6a18ba405537dd0968dd Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Fri, 6 Dec 2019 18:50:10 -0800 Subject: Added DiligentCoreAPITest --- Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'Graphics/GraphicsEngineD3D12') 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, -- cgit v1.2.3