Graphics/FrameGraph: Reuse textures if possible
This commit is contained in:
@@ -38,6 +38,25 @@ namespace Nz
|
||||
|
||||
return outputIndex;
|
||||
}
|
||||
template<typename F>
|
||||
void FramePass::ForEachAttachment(F&& func) const
|
||||
{
|
||||
for (const auto& input : m_inputs)
|
||||
func(input.attachmentId);
|
||||
|
||||
for (const auto& output : m_outputs)
|
||||
func(output.attachmentId);
|
||||
|
||||
if (m_depthStencilInput != FramePass::InvalidAttachmentId)
|
||||
{
|
||||
func(m_depthStencilInput);
|
||||
|
||||
if (m_depthStencilOutput != FramePass::InvalidAttachmentId && m_depthStencilOutput != m_depthStencilInput)
|
||||
func(m_depthStencilOutput);
|
||||
}
|
||||
else if (m_depthStencilOutput != FramePass::InvalidAttachmentId)
|
||||
func(m_depthStencilOutput);
|
||||
}
|
||||
|
||||
inline auto FramePass::GetCommandCallback() const -> const CommandCallback&
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user