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:
@@ -127,12 +127,26 @@ namespace Nz
|
||||
m_executionCallback = std::move(callback);
|
||||
}
|
||||
|
||||
inline void FramePass::SetInputLayout(std::size_t inputIndex, TextureLayout layout)
|
||||
inline void FramePass::SetInputAccess(std::size_t inputIndex, TextureLayout layout, PipelineStageFlags stageFlags, MemoryAccessFlags accessFlags)
|
||||
{
|
||||
assert(inputIndex < m_inputs.size());
|
||||
m_inputs[inputIndex].accessFlags = accessFlags;
|
||||
m_inputs[inputIndex].layout = layout;
|
||||
m_inputs[inputIndex].stageFlags = stageFlags;
|
||||
}
|
||||
|
||||
inline void FramePass::SetInputAssumedLayout(std::size_t inputIndex, TextureLayout layout)
|
||||
{
|
||||
assert(inputIndex < m_inputs.size());
|
||||
m_inputs[inputIndex].assumedLayout = layout;
|
||||
}
|
||||
|
||||
inline void FramePass::SetInputUsage(std::size_t inputIndex, TextureUsageFlags usageFlags)
|
||||
{
|
||||
assert(inputIndex < m_inputs.size());
|
||||
m_inputs[inputIndex].textureUsageFlags = usageFlags;
|
||||
}
|
||||
|
||||
inline void FramePass::SetReadInput(std::size_t inputIndex, bool doesRead)
|
||||
{
|
||||
assert(inputIndex < m_inputs.size());
|
||||
|
||||
Reference in New Issue
Block a user