diff options
Diffstat (limited to 'extensions/webgpu/texture.rs')
-rw-r--r-- | extensions/webgpu/texture.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/extensions/webgpu/texture.rs b/extensions/webgpu/texture.rs index cad4585a6..720c17be0 100644 --- a/extensions/webgpu/texture.rs +++ b/extensions/webgpu/texture.rs @@ -126,7 +126,7 @@ pub fn serialize_dimension( pub struct GpuExtent3D { pub width: Option<u32>, pub height: Option<u32>, - pub depth: Option<u32>, + pub depth_or_array_layers: Option<u32>, } #[derive(Deserialize)] @@ -159,7 +159,7 @@ pub fn op_webgpu_create_texture( size: wgpu_types::Extent3d { width: args.size.width.unwrap_or(1), height: args.size.height.unwrap_or(1), - depth: args.size.depth.unwrap_or(1), + depth_or_array_layers: args.size.depth_or_array_layers.unwrap_or(1), }, mip_level_count: args.mip_level_count.unwrap_or(1), sample_count: args.sample_count.unwrap_or(1), @@ -226,7 +226,9 @@ pub fn op_webgpu_create_texture_view( None => wgpu_types::TextureAspect::All, }, base_mip_level: args.base_mip_level.unwrap_or(0), - level_count: std::num::NonZeroU32::new(args.mip_level_count.unwrap_or(0)), + mip_level_count: std::num::NonZeroU32::new( + args.mip_level_count.unwrap_or(0), + ), base_array_layer: args.base_array_layer.unwrap_or(0), array_layer_count: std::num::NonZeroU32::new( args.array_layer_count.unwrap_or(0), |