From abe41ccf9c17a357bb115c85d9987a11e2a82ab2 Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Sun, 12 Sep 2021 10:17:16 -0400 Subject: [PATCH] Fix stencil ops --- wgpu-hal/src/metal/command.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wgpu-hal/src/metal/command.rs b/wgpu-hal/src/metal/command.rs index 247e2cf6ca..70dfe37ceb 100644 --- a/wgpu-hal/src/metal/command.rs +++ b/wgpu-hal/src/metal/command.rs @@ -440,13 +440,13 @@ impl crate::CommandEncoder for super::CommandEncoder { let at_descriptor = descriptor.stencil_attachment().unwrap(); at_descriptor.set_texture(Some(&at.target.view.raw)); - let load_action = if at.depth_ops.contains(crate::AttachmentOps::LOAD) { + let load_action = if at.stencil_ops.contains(crate::AttachmentOps::LOAD) { mtl::MTLLoadAction::Load } else { at_descriptor.set_clear_stencil(at.clear_value.1); mtl::MTLLoadAction::Clear }; - let store_action = if at.depth_ops.contains(crate::AttachmentOps::STORE) { + let store_action = if at.stencil_ops.contains(crate::AttachmentOps::STORE) { mtl::MTLStoreAction::Store } else { mtl::MTLStoreAction::DontCare