Fix the check for depth+stencil aspect of views

This commit is contained in:
Dzmitry Malyshau authored and Dzmitry Malyshau committed 2021-08-20 12:11:57 -04:00
1 parent 8f02b73655
commit 62f26367cd
2 files changed
+4 -1

No files matched your search

+1
View File
@@ -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
+3 -1
View File
@@ -1568,7 +1568,9 @@ impl<A: HalApi> Device<A> {
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);