mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-22 14:56:42 +00:00
Handle situation where no attachment is loaded with Clear
This commit is contained in:
parent
46ce11e1b1
commit
1b1f489b80
@ -585,11 +585,11 @@ macro_rules! ordered_passes_renderpass {
|
||||
ordered_passes_renderpass!{__impl_clear_values__ [$num+1] [$($s)*] [$($rest)*] }
|
||||
};
|
||||
|
||||
(__impl_clear_values__ [$total:expr] [$($atch:ident [$num:expr] $format:ident,)*] []) => {
|
||||
(__impl_clear_values__ [$total:expr] [$($atch:ident [$num:expr] $format:ident,)+] []) => {
|
||||
pub struct ClearValues {
|
||||
$(
|
||||
pub $atch: <$crate::format::$format as $crate::format::FormatDesc>::ClearValue,
|
||||
)*
|
||||
)+
|
||||
}
|
||||
|
||||
pub struct ClearValuesIter(ClearValues, usize);
|
||||
@ -622,6 +622,22 @@ macro_rules! ordered_passes_renderpass {
|
||||
|
||||
impl ExactSizeIterator for ClearValuesIter {}
|
||||
};
|
||||
|
||||
(__impl_clear_values__ [$total:expr] [] []) => {
|
||||
pub type ClearValues = ();
|
||||
|
||||
pub struct ClearValuesIter((), usize);
|
||||
|
||||
impl Iterator for ClearValuesIter {
|
||||
type Item = $crate::format::ClearValue;
|
||||
#[inline]
|
||||
fn next(&mut self) -> Option<Self::Item> { None }
|
||||
#[inline]
|
||||
fn size_hint(&self) -> (usize, Option<usize>) { (0, Some(0)) }
|
||||
}
|
||||
|
||||
impl ExactSizeIterator for ClearValuesIter {}
|
||||
};
|
||||
}
|
||||
|
||||
/// Describes what the implementation should do with an attachment after all the subpasses have
|
||||
|
Loading…
Reference in New Issue
Block a user