From 62f26367cd99dde081afdde16eda5ad9077c53d0 Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Fri, 20 Aug 2021 11:56:49 -0400 Subject: [PATCH] Fix the check for depth+stencil aspect of views --- CHANGELOG.md | 1 + wgpu-core/src/device/mod.rs | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index db0fe4821..95432c1c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## TBD - All: - expose more formats via adapter-specific feature + - fix creation of depth+stencil views - Metal: - fix usage of work group memory diff --git a/wgpu-core/src/device/mod.rs b/wgpu-core/src/device/mod.rs index 51408efcc..b831ac77c 100644 --- a/wgpu-core/src/device/mod.rs +++ b/wgpu-core/src/device/mod.rs @@ -1568,7 +1568,9 @@ impl Device { expected: &'static str, ) -> Result<(wgt::TextureUsages, hal::TextureUses), binding_model::CreateBindGroupError> { use crate::binding_model::CreateBindGroupError as Error; - if hal::FormatAspects::from(view.desc.format) + if view + .desc + .aspects() .contains(hal::FormatAspects::DEPTH | hal::FormatAspects::STENCIL) { return Err(Error::DepthStencilAspect);