Initial pipeline abstraction

This commit is contained in:
Werner
2021-11-23 20:09:05 -03:00
parent b23bc27f55
commit f45d465c3f
23 changed files with 943 additions and 58 deletions

View File

@ -0,0 +1,36 @@
use serde::{Deserialize, Serialize};
/// Operation to perform on the stencil value.
#[repr(C)]
#[derive(Copy, Clone, Debug, Hash, Eq, PartialEq, Serialize, Deserialize)]
pub enum StencilOperation {
/// Keep stencil value unchanged.
Keep = 0,
/// Set stencil value to zero.
Zero = 1,
/// Replace stencil value with value provided in most recent call to [`RenderPass::set_stencil_reference`].
Replace = 2,
/// Bitwise inverts stencil value.
Invert = 3,
/// Increments stencil value by one, clamping on overflow.
IncrementClamp = 4,
/// Decrements stencil value by one, clamping on underflow.
DecrementClamp = 5,
/// Increments stencil value by one, wrapping on overflow.
IncrementWrap = 6,
/// Decrements stencil value by one, wrapping on underflow.
DecrementWrap = 7,
}
impl Default for StencilOperation {
fn default() -> Self {
Self::Keep
}
}