Graphics: Add RenderElement and ElementRenderer (WIP)

This commit is contained in:
Jérôme Leclercq
2021-07-25 21:13:24 +02:00
parent d647fdc59b
commit 08921b36a6
27 changed files with 3239 additions and 38 deletions

View File

@@ -789,6 +789,8 @@ namespace Nz
if (first)
{
bool canDiscard = true;
// Check if a future pass reads from the DS buffer or if we can discard it after this pass
if (auto readIt = m_pending.attachmentReadList.find(dsInputAttachment); readIt != m_pending.attachmentReadList.end())
{
@@ -798,11 +800,13 @@ namespace Nz
if (readPhysicalPassIndex > physicalPassIndex) //< Read in a future pass?
{
// Yes, store it
dsAttachment.storeOp = AttachmentStoreOp::Store;
canDiscard = false;
break;
}
}
}
dsAttachment.storeOp = (canDiscard) ? AttachmentStoreOp::Discard : AttachmentStoreOp::Store;
}
depthStencilAttachment = RenderPass::AttachmentReference{