Fix the headless example for wgpu 0.16

This commit is contained in:
Arman Uguray 2023-04-24 10:41:25 -07:00
parent bc903d1c3b
commit 51f00fbd1f

View file

@ -1,6 +1,5 @@
use std::{
fs::File,
num::NonZeroU32,
path::{Path, PathBuf},
};
@ -189,7 +188,7 @@ async fn render(mut scenes: SceneSet, index: usize, args: &Args) -> Result<()> {
buffer: &buffer,
layout: wgpu::ImageDataLayout {
offset: 0,
bytes_per_row: NonZeroU32::new(padded_byte_width),
bytes_per_row: Some(padded_byte_width),
rows_per_image: None,
},
},