mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
Fix stencil ops
This commit is contained in:
committed by
Dzmitry Malyshau
parent
34c6d3a7f3
commit
abe41ccf9c
@@ -440,13 +440,13 @@ impl crate::CommandEncoder<super::Api> 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
|
||||
|
||||
Reference in New Issue
Block a user