Skip to content

Commit

Permalink
Merge gfx-rs#282
Browse files Browse the repository at this point in the history
282: Fix dynamic stencil values r=grovesNL a=kvark

Fixes gfx-rs#279

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
  • Loading branch information
bors[bot] and kvark committed Aug 14, 2019
2 parents 213e3f8 + 1ce7957 commit 3504b75
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions wgpu-native/src/conv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,17 @@ pub fn map_depth_stencil_state_descriptor(
&desc.stencil_back,
),
},
read_masks: hal::pso::State::Dynamic,
write_masks: hal::pso::State::Dynamic,
reference_values: hal::pso::State::Dynamic,
read_masks: hal::pso::State::Static(
hal::pso::Sided::new(desc.stencil_read_mask),
),
write_masks: hal::pso::State::Static(
hal::pso::Sided::new(desc.stencil_write_mask),
),
reference_values: if desc.needs_stencil_reference() {
hal::pso::State::Dynamic
} else {
hal::pso::State::Static(hal::pso::Sided::new(0))
},
})
} else {
None
Expand Down

0 comments on commit 3504b75

Please sign in to comment.