pub fn estimate_texture_bytes(
format: TextureFormat,
width: u32,
height: u32,
depth_or_array_layers: u32,
sample_count: u32,
mip_level_count: u32,
) -> u64Available on crate feature
wgpu only.Expand description
Estimate the on-device byte footprint of a 2D / 3D texture.
Charges every mip level and every array layer / depth slice. Mip
dimensions follow the wgpu convention (max(1, dim >> level)). Sample
count multiplies the base level only (mip levels above 0 of an MSAA
texture are not allocated by any current driver — sample expansion on
level > 0 is a validation error in wgpu and every hardware spec we
care about).