diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-07-02 15:43:54 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-07-02 15:43:54 +0000 |
| commit | 17a8d2458d717567eae912aeb2c412ab4c3b2752 (patch) | |
| tree | 92be861806080a5c9f8027fbacc445546db150d2 /Graphics/GraphicsEngine | |
| parent | Added detailed reporting of render pass - PSO mismatch in Vulkan (diff) | |
| download | DiligentCore-17a8d2458d717567eae912aeb2c412ab4c3b2752.tar.gz DiligentCore-17a8d2458d717567eae912aeb2c412ab4c3b2752.zip | |
Minor update to DeviceContextBase::SetRenderTargets()
Diffstat (limited to 'Graphics/GraphicsEngine')
| -rw-r--r-- | Graphics/GraphicsEngine/include/DeviceContextBase.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/Graphics/GraphicsEngine/include/DeviceContextBase.h b/Graphics/GraphicsEngine/include/DeviceContextBase.h index e8e339db..a3889bbb 100644 --- a/Graphics/GraphicsEngine/include/DeviceContextBase.h +++ b/Graphics/GraphicsEngine/include/DeviceContextBase.h @@ -407,7 +407,10 @@ inline bool DeviceContextBase<BaseInterface> :: SetRenderTargets( Uint32 NumRend m_FramebufferSlices = 0; ITextureView* pDefaultRTV = nullptr; - if (NumRenderTargets == 0 && pDepthStencil == nullptr) + bool IsDefaultFrambuffer = NumRenderTargets == 0 && pDepthStencil == nullptr; + bBindRenderTargets = (m_IsDefaultFramebufferBound != IsDefaultFrambuffer); + m_IsDefaultFramebufferBound = IsDefaultFrambuffer; + if (m_IsDefaultFramebufferBound) { VERIFY(m_pSwapChain, "Swap chain is not initialized in the device context"); @@ -420,14 +423,7 @@ inline bool DeviceContextBase<BaseInterface> :: SetRenderTargets( Uint32 NumRend m_FramebufferWidth = SwapChainDesc.Width; m_FramebufferHeight = SwapChainDesc.Height; m_FramebufferSlices = 1; - - if (!m_IsDefaultFramebufferBound) - bBindRenderTargets = true; - m_IsDefaultFramebufferBound = true; } - else - m_IsDefaultFramebufferBound = false; - if( NumRenderTargets != m_NumBoundRenderTargets ) { |
