Skip to main content

row_pitch

Function row_pitch 

Source
pub fn row_pitch(
    elements_per_row: usize,
    element_size: usize,
    alignment: usize,
) -> usize
Expand description

Stride (in bytes) of a row in a 2-D buffer, given the element count per row and the required alignment.

This mirrors wgpuDeviceGetSupportedSurfaceFormats style pitch calculation.