cli: size_of not in prelude
This commit is contained in:
parent
7555bb9024
commit
ed8bf637a9
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue