Fix write-only stencil state descriptors from not working - fixes #911

This commit is contained in:
Nathan Adams 2020-08-30 23:33:09 +02:00 committed by Dzmitry Malyshau
parent d1279638fc
commit 881e6c1415

View File

@ -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