diff --git a/vulkano/src/framebuffer.rs b/vulkano/src/framebuffer.rs index 49ca5ba1..9d8b8e9c 100644 --- a/vulkano/src/framebuffer.rs +++ b/vulkano/src/framebuffer.rs @@ -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 { None } + #[inline] + fn size_hint(&self) -> (usize, Option) { (0, Some(0)) } + } + + impl ExactSizeIterator for ClearValuesIter {} + }; } /// Describes what the implementation should do with an attachment after all the subpasses have