pub struct Plan {
pub phase1: Dispatch,
pub tail: Option<Dispatch>,
}Expand description
The dispatches that build a mip_count-deep pyramid over a width x
height depth source.
Fields§
§phase1: DispatchDepth source to mips 0..6. Always present.
tail: Option<Dispatch>Mip 6 to mips 7..12. Absent when the pyramid stops at mip 6 or shallower.
Implementations§
Source§impl Plan
impl Plan
Sourcepub fn new(width: u32, height: u32, mip_count: u32, sample_count: u32) -> Self
pub fn new(width: u32, height: u32, mip_count: u32, sample_count: u32) -> Self
Plan the two dispatches. mip_count is clamped to MAX_MIPS; a
shallower pyramid than requested only costs the cull a coarser level to
pick from, which makes it more permissive rather than wrong.
Sourcepub fn mip_count(&self) -> u32
pub fn mip_count(&self) -> u32
Pyramid depth this plan actually writes. The image and the cull’s mip count must both use it: a mip the plan skipped is never written, and sampling one would feed the cull uninitialised memory.
Sourcepub fn bound_mips(base_mip: u32, mip_count: u32) -> impl Iterator<Item = u32>
pub fn bound_mips(base_mip: u32, mip_count: u32) -> impl Iterator<Item = u32>
Mips the dispatch starting at base_mip binds, clamped to the pyramid’s
actual depth. Descriptors past the end repeat the last live mip so the
array is fully populated; the kernel’s level_count keeps it from
writing them.
Trait Implementations§
impl Copy for Plan
impl Eq for Plan
impl StructuralPartialEq for Plan
Auto Trait Implementations§
impl Freeze for Plan
impl RefUnwindSafe for Plan
impl Send for Plan
impl Sync for Plan
impl Unpin for Plan
impl UnsafeUnpin for Plan
impl UnwindSafe for Plan
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.