#[non_exhaustive]pub enum RowAlign {
Tight,
Cache64,
PixelCache64,
Samples(u16),
}Expand description
Full re-export of zenpixels core types (zero module name collisions!).
Row-start alignment policy for allocated buffers.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Tight
Tightly packed rows (stride == width * bytes_per_pixel).
Cache64
64-byte row alignment (widest SIMD vector & cache line), with a +64 B
cache-set anti-aliasing bump whenever the rounded stride is a nonzero multiple of
4096 bytes (4 KiB, preventing L1 cache-set thrashing on vertical stencils/transposes).
PixelCache64
Whole-pixel 64-byte alignment (lcm(bytes_per_pixel, 64)), plus one alignment step
whenever the rounded stride is a nonzero multiple of 4096 bytes so whole-pixel
stride consumers like imgref stay aligned without 4 KiB set aliasing.
Samples(u16)
Align row stride to a multiple of N samples (0 treated as 1).
Implementations§
Source§impl RowAlign
impl RowAlign
Sourcepub const fn from_bytes(bytes: u16, sample: SampleType) -> Option<RowAlign>
pub const fn from_bytes(bytes: u16, sample: SampleType) -> Option<RowAlign>
Convert a byte pitch (such as wgpu’s 256-byte alignment) into RowAlign::Samples.