Update deprecated wgpu structs
This commit is contained in:
parent
5d7159c490
commit
1d9a771986
|
|
@ -427,14 +427,14 @@ fn load_dem_texture(source: &Dem, device: &wgpu::Device, queue: &wgpu::Queue) ->
|
|||
});
|
||||
|
||||
queue.write_texture(
|
||||
wgpu::ImageCopyTexture {
|
||||
wgpu::TexelCopyTextureInfo {
|
||||
texture: &texture,
|
||||
mip_level: 0,
|
||||
origin: wgpu::Origin3d::ZERO,
|
||||
aspect: wgpu::TextureAspect::All,
|
||||
},
|
||||
bytemuck::cast_slice(&source.grid[..]),
|
||||
wgpu::ImageDataLayout {
|
||||
wgpu::TexelCopyBufferLayout {
|
||||
offset: 0,
|
||||
bytes_per_row: Some(std::mem::size_of::<u16>() as u32 * source.num_cells_x),
|
||||
rows_per_image: Some(source.num_cells_y),
|
||||
|
|
@ -470,14 +470,14 @@ fn create_dembvh_texture(
|
|||
|
||||
for (level, grid) in source.layers.iter().enumerate() {
|
||||
queue.write_texture(
|
||||
wgpu::ImageCopyTexture {
|
||||
wgpu::TexelCopyTextureInfo {
|
||||
texture: &texture,
|
||||
mip_level: level as u32,
|
||||
origin: wgpu::Origin3d::ZERO,
|
||||
aspect: wgpu::TextureAspect::All,
|
||||
},
|
||||
bytemuck::cast_slice(&grid.data[..]),
|
||||
wgpu::ImageDataLayout {
|
||||
wgpu::TexelCopyBufferLayout {
|
||||
offset: 0,
|
||||
bytes_per_row: Some(std::mem::size_of::<u16>() as u32 * 2 * grid.size),
|
||||
rows_per_image: Some(grid.size),
|
||||
|
|
|
|||
Loading…
Reference in New Issue