diff options
| author | assiduous <assiduous@diligentgraphics.com> | 2020-08-07 03:41:08 +0000 |
|---|---|---|
| committer | assiduous <assiduous@diligentgraphics.com> | 2020-08-07 03:41:08 +0000 |
| commit | a72d485f4b157d5c8fb488bc2afb3b9278e465b7 (patch) | |
| tree | c542c04aee507fe12757f7d76dcf4f30df4513bf /Graphics/GraphicsEngineD3D12 | |
| parent | Added few debug checks (diff) | |
| download | DiligentCore-a72d485f4b157d5c8fb488bc2afb3b9278e465b7.tar.gz DiligentCore-a72d485f4b157d5c8fb488bc2afb3b9278e465b7.zip | |
Treating subpass render target and depth stencil attachments as current RT and DS buffers
Diffstat (limited to 'Graphics/GraphicsEngineD3D12')
| -rw-r--r-- | Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp index ba443c13..85d0154b 100644 --- a/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp +++ b/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp @@ -975,6 +975,14 @@ void DeviceContextD3D12Impl::SetRenderTargets(Uint32 Num ITextureView* pDepthStencil, RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) { +#ifdef DILIGENT_DEVELOPMENT + if (m_pActiveRenderPass != nullptr) + { + LOG_ERROR_MESSAGE("Calling SetRenderTargets inside active render pass is invalid. End the render pass first"); + return; + } +#endif + if (TDeviceContextBase::SetRenderTargets(NumRenderTargets, ppRenderTargets, pDepthStencil)) { CommitRenderTargets(StateTransitionMode); |
