mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2025-02-17 01:23:00 +00:00
Default the inital RP attachment layout to Undefined
This commit is contained in:
parent
4396525aa9
commit
1b06a69eb2
@ -335,6 +335,17 @@ macro_rules! ordered_passes_renderpass {
|
||||
})*
|
||||
|
||||
$(if $atch_name == num {
|
||||
// If the clear OP is Clear or DontCare, default to the Undefined layout.
|
||||
if initial_layout == Some(Layout::DepthStencilAttachmentOptimal) ||
|
||||
initial_layout == Some(Layout::ColorAttachmentOptimal)
|
||||
{
|
||||
if $crate::framebuffer::LoadOp::$load == $crate::framebuffer::LoadOp::Clear ||
|
||||
$crate::framebuffer::LoadOp::$load == $crate::framebuffer::LoadOp::DontCare
|
||||
{
|
||||
initial_layout = Some(Layout::Undefined);
|
||||
}
|
||||
}
|
||||
|
||||
$(initial_layout = Some($init_layout);)*
|
||||
$(final_layout = Some($final_layout);)*
|
||||
})*
|
||||
|
Loading…
Reference in New Issue
Block a user