use crate::{format::Format, render_pass::Subpass};
#[derive(Clone, Debug)]
pub enum PipelineRenderPassType {
BeginRenderPass(Subpass),
BeginRendering(PipelineRenderingCreateInfo),
}
impl From<Subpass> for PipelineRenderPassType {
#[inline]
fn from(val: Subpass) -> Self {
Self::BeginRenderPass(val)
}
}
impl From<PipelineRenderingCreateInfo> for PipelineRenderPassType {
#[inline]
fn from(val: PipelineRenderingCreateInfo) -> Self {
Self::BeginRendering(val)
}
}
#[derive(Clone, Debug)]
pub struct PipelineRenderingCreateInfo {
pub view_mask: u32,
pub color_attachment_formats: Vec<Option<Format>>,
pub depth_attachment_format: Option<Format>,
pub stencil_attachment_format: Option<Format>,
pub _ne: crate::NonExhaustive,
}
impl Default for PipelineRenderingCreateInfo {
#[inline]
fn default() -> Self {
Self {
view_mask: 0,
color_attachment_formats: Vec::new(),
depth_attachment_format: None,
stencil_attachment_format: None,
_ne: crate::NonExhaustive(()),
}
}
}