spirv_webgpu_transform/
correction.rs

1use super::*;
2
3#[repr(u16)]
4#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
5pub enum CorrectionType {
6    /// A combined image sampler has been split, a new `sampler` object should be inserted.
7    SplitCombined = 0,
8    /// A mixed depth texture / sampler has been split, insert the same object again with a `Regular` bind type.
9    SplitDrefRegular = 1,
10    /// A mixed depth texture / sampler has been split, insert the same object again with a
11    /// `Comparison` bind type.
12    SplitDrefComparison = 2,
13}
14
15#[derive(Debug, Clone, Default)]
16pub struct CorrectionBinding {
17    /// In order, what additional bindings have been appended to this one. 
18    pub corrections: Vec<CorrectionType>,
19}
20
21#[derive(Debug, Clone, Default)]
22pub struct CorrectionSet {
23    pub bindings: HashMap<u32, CorrectionBinding>,
24}
25
26#[derive(Debug, Clone, Default)]
27pub struct CorrectionMap {
28    pub sets: HashMap<u32, CorrectionSet>,
29}