From 0e94752749fffbca119c94ba1cc1d6638eb54153 Mon Sep 17 00:00:00 2001 From: Nathan Adams Date: Sun, 30 Aug 2020 23:33:09 +0200 Subject: [PATCH] Fix write-only stencil state descriptors from not working - fixes #911 --- wgpu-types/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wgpu-types/src/lib.rs b/wgpu-types/src/lib.rs index aee8bf715..73ce7bd09 100644 --- a/wgpu-types/src/lib.rs +++ b/wgpu-types/src/lib.rs @@ -855,7 +855,7 @@ impl StencilStateDescriptor { pub fn is_enabled(&self) -> bool { (self.front != StencilStateFaceDescriptor::IGNORE || self.back != StencilStateFaceDescriptor::IGNORE) - && self.read_mask != 0 + && (self.read_mask != 0 || self.write_mask != 0) } pub fn is_read_only(&self) -> bool { self.write_mask == 0