Integrate render target handling in frame graphs (#411)
* Graphics: Integrate RenderTarget in FrameGraph - This handles the blit to texture/swapchain in the FrameGraph and fixes RenderTextureBlit - Dummy attachments were added to the FrameGraph class to handle link without texture (used to setup a dependency between two passes with no texture) - FramePass now supports custom access/layout/usage for inputs * Graphics/RenderTarget: Allow to set any RenderTarget as output
This commit is contained in:
@@ -73,7 +73,9 @@ namespace Nz
|
||||
inline void SetDepthStencilInput(std::size_t attachmentId);
|
||||
inline void SetDepthStencilOutput(std::size_t attachmentId);
|
||||
inline void SetExecutionCallback(ExecutionCallback callback);
|
||||
inline void SetInputLayout(std::size_t inputIndex, TextureLayout layout);
|
||||
inline void SetInputAccess(std::size_t inputIndex, TextureLayout layout, PipelineStageFlags stageFlags, MemoryAccessFlags accessFlags);
|
||||
inline void SetInputAssumedLayout(std::size_t inputIndex, TextureLayout layout);
|
||||
inline void SetInputUsage(std::size_t inputIndex, TextureUsageFlags usageFlags);
|
||||
inline void SetReadInput(std::size_t inputIndex, bool doesRead);
|
||||
|
||||
FramePass& operator=(const FramePass&) = delete;
|
||||
@@ -90,7 +92,11 @@ namespace Nz
|
||||
struct Input
|
||||
{
|
||||
std::optional<TextureLayout> assumedLayout;
|
||||
std::optional<TextureUsageFlags> textureUsageFlags;
|
||||
std::size_t attachmentId;
|
||||
MemoryAccessFlags accessFlags = MemoryAccess::ShaderRead;
|
||||
PipelineStageFlags stageFlags = PipelineStage::FragmentShader;
|
||||
TextureLayout layout = TextureLayout::ColorInput;
|
||||
bool doesRead = true;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user