From 881e6c1415660cd1b60eb58428281a589de00f6b 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 b6370bbe2..74564695b 100644 --- a/wgpu-types/src/lib.rs +++ b/wgpu-types/src/lib.rs @@ -844,7 +844,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