Graphics/FrameGraph: Handle invalidation and flush barriers

This commit is contained in:
Jérôme Leclercq
2021-12-16 18:29:40 +01:00
parent 38b143ce8f
commit 07199301df
4 changed files with 59 additions and 65 deletions

View File

@@ -50,7 +50,7 @@ namespace Nz
BakedFrameGraph(std::vector<PassData> passes, std::vector<TextureData> textures, AttachmentIdToTextureId attachmentIdToTextureMapping, PassIdToPhysicalPassIndex passIdToPhysicalPassMapping);
struct TextureTransition
struct TextureBarrier
{
std::size_t textureId;
MemoryAccessFlags dstAccessMask;
@@ -75,7 +75,7 @@ namespace Nz
std::vector<std::size_t> outputTextureIndices;
std::vector<CommandBufferBuilder::ClearValues> outputClearValues;
std::vector<SubpassData> subpasses;
std::vector<TextureTransition> transitions;
std::vector<TextureBarrier> invalidationBarriers;
FramePass::ExecutionCallback executionCallback;
Recti renderRect;
bool forceCommandBufferRegeneration = true;

View File

@@ -50,7 +50,7 @@ namespace Nz
using AttachmentIdToPassId = std::unordered_map<std::size_t /*attachmentId*/, std::size_t /*passId*/>;
using AttachmentIdToTextureId = std::unordered_map<std::size_t /*attachmentId*/, std::size_t /*textureId*/>;
using PassIdToPhysicalPassIndex = std::unordered_map<std::size_t /*passId*/, std::size_t /*physicalPassId*/>;
using TextureTransition = BakedFrameGraph::TextureTransition;
using TextureBarrier = BakedFrameGraph::TextureBarrier;
struct AttachmentProxy
{
@@ -80,7 +80,7 @@ namespace Nz
};
std::string name;
std::vector<TextureTransition> textureTransitions;
std::vector<TextureBarrier> textureBarrier;
std::vector<Subpass> passes;
};