summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngine
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-11-11 02:06:24 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-11-11 02:06:24 +0000
commit81618891065f897e238039b4ed2312eaf3e49102 (patch)
tree5ae4a970a82cba1ed7581317c8c0009528defe01 /Graphics/GraphicsEngine
parentOpenGL backend: fixed setting RTV and DSV from the swap chain (diff)
downloadDiligentCore-81618891065f897e238039b4ed2312eaf3e49102.tar.gz
DiligentCore-81618891065f897e238039b4ed2312eaf3e49102.zip
Added comments to Vulkan backend implementation
Diffstat (limited to 'Graphics/GraphicsEngine')
-rw-r--r--Graphics/GraphicsEngine/include/DeviceContextBase.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/Graphics/GraphicsEngine/include/DeviceContextBase.h b/Graphics/GraphicsEngine/include/DeviceContextBase.h
index 9f0439b5..f67756e9 100644
--- a/Graphics/GraphicsEngine/include/DeviceContextBase.h
+++ b/Graphics/GraphicsEngine/include/DeviceContextBase.h
@@ -535,14 +535,13 @@ inline bool DeviceContextBase<BaseInterface,ImplementationTraits> ::
pDefaultRTV = m_pSwapChain->GetCurrentBackBufferRTV();
pDepthStencil = m_pSwapChain->GetDepthBufferDSV();
- // In OpenGL, default RTV and DSV are null
if (pDefaultRTV != nullptr)
{
NumRenderTargets = 1;
ppRenderTargets = &pDefaultRTV;
}
- const auto &SwapChainDesc = m_pSwapChain->GetDesc();
+ const auto& SwapChainDesc = m_pSwapChain->GetDesc();
m_FramebufferWidth = SwapChainDesc.Width;
m_FramebufferHeight = SwapChainDesc.Height;
m_FramebufferSlices = 1;
@@ -551,7 +550,7 @@ inline bool DeviceContextBase<BaseInterface,ImplementationTraits> ::
if (NumRenderTargets != m_NumBoundRenderTargets)
{
bBindRenderTargets = true;
- for(Uint32 rt = NumRenderTargets; rt < m_NumBoundRenderTargets; ++rt )
+ for (Uint32 rt = NumRenderTargets; rt < m_NumBoundRenderTargets; ++rt )
m_pBoundRenderTargets[rt].Release();
m_NumBoundRenderTargets = NumRenderTargets;
@@ -560,7 +559,7 @@ inline bool DeviceContextBase<BaseInterface,ImplementationTraits> ::
for (Uint32 rt = 0; rt < NumRenderTargets; ++rt)
{
auto* pRTView = ppRenderTargets[rt];
- if ( pRTView )
+ if (pRTView)
{
const auto &RTVDesc = pRTView->GetDesc();
#ifdef DEVELOPMENT
@@ -602,7 +601,7 @@ inline bool DeviceContextBase<BaseInterface,ImplementationTraits> ::
if (pDepthStencil != nullptr)
{
- const auto &DSVDesc = pDepthStencil->GetDesc();
+ const auto& DSVDesc = pDepthStencil->GetDesc();
#ifdef DEVELOPMENT
if (DSVDesc.ViewType != TEXTURE_VIEW_DEPTH_STENCIL)
LOG_ERROR("Texture view object named '", DSVDesc.Name ? DSVDesc.Name : "", "' has incorrect view type (", GetTexViewTypeLiteralName(DSVDesc.ViewType), "). Depth stencil view is expected" );
@@ -612,7 +611,7 @@ inline bool DeviceContextBase<BaseInterface,ImplementationTraits> ::
if (m_FramebufferWidth == 0)
{
auto* pTex = pDepthStencil->GetTexture();
- const auto &TexDesc = pTex->GetDesc();
+ const auto& TexDesc = pTex->GetDesc();
m_FramebufferWidth = std::max(TexDesc.Width >> DSVDesc.MostDetailedMip, 1U);
m_FramebufferHeight = std::max(TexDesc.Height >> DSVDesc.MostDetailedMip, 1U);
m_FramebufferSlices = DSVDesc.NumArraySlices;
@@ -631,7 +630,7 @@ inline bool DeviceContextBase<BaseInterface,ImplementationTraits> ::
}
}
- if ( m_pBoundDepthStencil != pDepthStencil)
+ if (m_pBoundDepthStencil != pDepthStencil)
{
m_pBoundDepthStencil = ValidatedCast<TextureViewImplType>(pDepthStencil);
bBindRenderTargets = true;