diff --git a/Cargo.toml b/Cargo.toml index 3b56fbb..63b835b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -55,7 +55,7 @@ vello_encoding = { path = "crates/encoding" } bytemuck = { version = "1.12.1", features = ["derive"] } fello = { git = "https://github.com/dfrg/fount", rev = "58a284eaae67512fb61cf76177c5d33238d79cb1" } peniko = { git = "https://github.com/linebender/peniko", rev = "cafdac9a211a0fb2fec5656bd663d1ac770bcc81" } -wgpu = "0.15" +wgpu = "0.16" # Used for examples clap = "4.1.0" diff --git a/src/engine.rs b/src/engine.rs index 28772cf..cd1404e 100644 --- a/src/engine.rs +++ b/src/engine.rs @@ -311,8 +311,8 @@ impl Engine { bytes, wgpu::ImageDataLayout { offset: 0, - bytes_per_row: NonZeroU32::new( - image_proxy.width * format.describe().block_size as u32, + bytes_per_row: Some( + image_proxy.width * format.block_size(None).unwrap(), ), rows_per_image: None, }, @@ -338,9 +338,7 @@ impl Engine { &data[..], wgpu::ImageDataLayout { offset: 0, - bytes_per_row: NonZeroU32::new( - *width * format.describe().block_size as u32, - ), + bytes_per_row: Some(*width * format.block_size(None).unwrap()), rows_per_image: None, }, wgpu::Extent3d {