|
1 | 1 | /* |
2 | | - * Copyright 2019-2022 Diligent Graphics LLC |
| 2 | + * Copyright 2019-2025 Diligent Graphics LLC |
3 | 3 | * Copyright 2015-2019 Egor Yusov |
4 | 4 | * |
5 | 5 | * Licensed under the Apache License, Version 2.0 (the "License"); |
@@ -86,47 +86,47 @@ FramebufferGLImpl::FramebufferGLImpl(IReferenceCounters* pRefCounters, |
86 | 86 | GLContextState& CtxState) : |
87 | 87 | TFramebufferBase{pRefCounters, pDevice, Desc} |
88 | 88 | { |
89 | | - const auto& RPDesc = m_Desc.pRenderPass->GetDesc(); |
| 89 | + const RenderPassDesc& RPDesc = m_Desc.pRenderPass->GetDesc(); |
90 | 90 | m_SubpassFramebuffers.reserve(RPDesc.SubpassCount); |
91 | 91 | for (Uint32 subpass = 0; subpass < RPDesc.SubpassCount; ++subpass) |
92 | 92 | { |
93 | | - const auto& SubpassDesc = RPDesc.pSubpasses[subpass]; |
| 93 | + const SubpassDesc& SPDesc = RPDesc.pSubpasses[subpass]; |
94 | 94 |
|
95 | 95 | TextureViewGLImpl* ppRTVs[MAX_RENDER_TARGETS] = {}; |
96 | 96 | TextureViewGLImpl* pDSV = nullptr; |
97 | 97 |
|
98 | | - for (Uint32 rt = 0; rt < SubpassDesc.RenderTargetAttachmentCount; ++rt) |
| 98 | + for (Uint32 rt = 0; rt < SPDesc.RenderTargetAttachmentCount; ++rt) |
99 | 99 | { |
100 | | - const auto& RTAttachmentRef = SubpassDesc.pRenderTargetAttachments[rt]; |
| 100 | + const AttachmentReference& RTAttachmentRef = SPDesc.pRenderTargetAttachments[rt]; |
101 | 101 | if (RTAttachmentRef.AttachmentIndex != ATTACHMENT_UNUSED) |
102 | 102 | { |
103 | 103 | ppRTVs[rt] = ClassPtrCast<TextureViewGLImpl>(m_Desc.ppAttachments[RTAttachmentRef.AttachmentIndex]); |
104 | 104 | } |
105 | 105 | } |
106 | 106 |
|
107 | | - if (SubpassDesc.pDepthStencilAttachment != nullptr && SubpassDesc.pDepthStencilAttachment->AttachmentIndex != ATTACHMENT_UNUSED) |
| 107 | + if (SPDesc.pDepthStencilAttachment != nullptr && SPDesc.pDepthStencilAttachment->AttachmentIndex != ATTACHMENT_UNUSED) |
108 | 108 | { |
109 | | - pDSV = ClassPtrCast<TextureViewGLImpl>(m_Desc.ppAttachments[SubpassDesc.pDepthStencilAttachment->AttachmentIndex]); |
| 109 | + pDSV = ClassPtrCast<TextureViewGLImpl>(m_Desc.ppAttachments[SPDesc.pDepthStencilAttachment->AttachmentIndex]); |
110 | 110 | } |
111 | | - auto RenderTargetFBO = UseDefaultFBO(SubpassDesc.RenderTargetAttachmentCount, ppRTVs, pDSV) ? |
| 111 | + GLObjectWrappers::GLFrameBufferObj RenderTargetFBO = UseDefaultFBO(SPDesc.RenderTargetAttachmentCount, ppRTVs, pDSV) ? |
112 | 112 | GLObjectWrappers::GLFrameBufferObj{false} : |
113 | | - FBOCache::CreateFBO(CtxState, SubpassDesc.RenderTargetAttachmentCount, ppRTVs, pDSV, Desc.Width, Desc.Height); |
| 113 | + FBOCache::CreateFBO(CtxState, SPDesc.RenderTargetAttachmentCount, ppRTVs, pDSV, Desc.Width, Desc.Height); |
114 | 114 |
|
115 | 115 | GLObjectWrappers::GLFrameBufferObj ResolveFBO{false}; |
116 | | - if (SubpassDesc.pResolveAttachments != nullptr) |
| 116 | + if (SPDesc.pResolveAttachments != nullptr) |
117 | 117 | { |
118 | 118 | TextureViewGLImpl* ppRsvlViews[MAX_RENDER_TARGETS] = {}; |
119 | | - for (Uint32 rt = 0; rt < SubpassDesc.RenderTargetAttachmentCount; ++rt) |
| 119 | + for (Uint32 rt = 0; rt < SPDesc.RenderTargetAttachmentCount; ++rt) |
120 | 120 | { |
121 | | - const auto& RslvAttachmentRef = SubpassDesc.pResolveAttachments[rt]; |
| 121 | + const AttachmentReference& RslvAttachmentRef = SPDesc.pResolveAttachments[rt]; |
122 | 122 | if (RslvAttachmentRef.AttachmentIndex != ATTACHMENT_UNUSED) |
123 | 123 | { |
124 | 124 | ppRsvlViews[rt] = ClassPtrCast<TextureViewGLImpl>(m_Desc.ppAttachments[RslvAttachmentRef.AttachmentIndex]); |
125 | 125 | } |
126 | 126 | } |
127 | | - ResolveFBO = UseDefaultFBO(SubpassDesc.RenderTargetAttachmentCount, ppRsvlViews, nullptr) ? |
| 127 | + ResolveFBO = UseDefaultFBO(SPDesc.RenderTargetAttachmentCount, ppRsvlViews, nullptr) ? |
128 | 128 | GLObjectWrappers::GLFrameBufferObj{false} : |
129 | | - FBOCache::CreateFBO(CtxState, SubpassDesc.RenderTargetAttachmentCount, ppRsvlViews, nullptr, Desc.Width, Desc.Height); |
| 129 | + FBOCache::CreateFBO(CtxState, SPDesc.RenderTargetAttachmentCount, ppRsvlViews, nullptr, Desc.Width, Desc.Height); |
130 | 130 | } |
131 | 131 |
|
132 | 132 | RenderTargetFBO.SetName(m_Desc.Name); |
|
0 commit comments