cli: size_of not in prelude

This commit is contained in:
chyyran 2024-10-06 13:13:19 -04:00
parent 7555bb9024
commit ed8bf637a9

View file

@ -35,7 +35,7 @@ struct BufferDimensions {
impl BufferDimensions { impl BufferDimensions {
fn new(width: usize, height: usize) -> Self { fn new(width: usize, height: usize) -> Self {
let bytes_per_pixel = size_of::<u32>(); let bytes_per_pixel = std::mem::size_of::<u32>();
let unpadded_bytes_per_row = width * bytes_per_pixel; let unpadded_bytes_per_row = width * bytes_per_pixel;
let align = wgpu::COPY_BYTES_PER_ROW_ALIGNMENT as usize; let align = wgpu::COPY_BYTES_PER_ROW_ALIGNMENT as usize;
let padded_bytes_per_row_padding = (align - unpadded_bytes_per_row % align) % align; let padded_bytes_per_row_padding = (align - unpadded_bytes_per_row % align) % align;