summaryrefslogtreecommitdiff
path: root/extensions/webgpu/texture.rs
diff options
context:
space:
mode:
authorLuca Casonato <hello@lcas.dev>2021-07-08 11:07:49 +0200
committerGitHub <noreply@github.com>2021-07-08 11:07:49 +0200
commit215f6f2c9e0522c7c8d794f35713225884540cd7 (patch)
treebc520f0abb813bb22c32dc9fa13e87cb0544bf7b /extensions/webgpu/texture.rs
parentce587a15daa7238db3cf8d3dee9d41a71bc2fc6a (diff)
chore: update wgpu to 0.9.0 (#11315)
Diffstat (limited to 'extensions/webgpu/texture.rs')
-rw-r--r--extensions/webgpu/texture.rs32
1 files changed, 17 insertions, 15 deletions
diff --git a/extensions/webgpu/texture.rs b/extensions/webgpu/texture.rs
index 1c79248b0..587ac46a7 100644
--- a/extensions/webgpu/texture.rs
+++ b/extensions/webgpu/texture.rs
@@ -215,23 +215,25 @@ pub fn op_webgpu_create_texture_view(
.map(|s| serialize_texture_format(&s))
.transpose()?,
dimension: args.dimension.map(|s| serialize_dimension(&s)),
- aspect: match args.aspect {
- Some(aspect) => match aspect.as_str() {
- "all" => wgpu_types::TextureAspect::All,
- "stencil-only" => wgpu_types::TextureAspect::StencilOnly,
- "depth-only" => wgpu_types::TextureAspect::DepthOnly,
- _ => unreachable!(),
+ range: wgpu_types::ImageSubresourceRange {
+ aspect: match args.aspect {
+ Some(aspect) => match aspect.as_str() {
+ "all" => wgpu_types::TextureAspect::All,
+ "stencil-only" => wgpu_types::TextureAspect::StencilOnly,
+ "depth-only" => wgpu_types::TextureAspect::DepthOnly,
+ _ => unreachable!(),
+ },
+ None => wgpu_types::TextureAspect::All,
},
- None => wgpu_types::TextureAspect::All,
+ base_mip_level: args.base_mip_level.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),
+ ),
},
- base_mip_level: args.base_mip_level.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),
- ),
};
gfx_put!(texture => instance.texture_create_view(