use crate::device::Device;
#[derive(Clone, Copy, PartialEq, Debug)]
pub enum LoadOp {
Clear([f64; 4]),
Load,
}
#[derive(Clone, Copy, PartialEq, Debug)]
pub enum DepthLoadOp {
Clear(f32),
Load,
}
#[derive(Debug)]
pub struct ColorAttachment<'a, D: Device> {
pub view: &'a D::TextureView,
pub load: LoadOp,
}
#[derive(Debug)]
pub struct DepthAttachment<'a, D: Device> {
pub view: &'a D::TextureView,
pub load: DepthLoadOp,
pub read_only: bool,
}
#[derive(Debug)]
pub struct RenderPassDesc<'a, D: Device> {
pub label: &'static str,
pub colors: &'a [ColorAttachment<'a, D>],
pub depth: Option<DepthAttachment<'a, D>>,
pub timestamps: Option<TimestampWrites<'a, D>>,
}
#[derive(Debug)]
pub struct ComputePassDesc<'a, D: Device> {
pub label: &'static str,
pub timestamps: Option<TimestampWrites<'a, D>>,
}
#[derive(Debug)]
pub struct TimestampWrites<'a, D: Device> {
pub queries: &'a D::QuerySet,
pub beginning: Option<u32>,
pub end: Option<u32>,
}
impl<D: Device> Copy for TimestampWrites<'_, D> {}
impl<D: Device> Clone for TimestampWrites<'_, D> {
fn clone(&self) -> Self {
*self
}
}