mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-21 22:33:49 +00:00
extract set_stencil_reference
from render_pass_end_impl
This commit is contained in:
parent
49800c30de
commit
5c941bf1f0
@ -1560,17 +1560,7 @@ impl Global {
|
||||
set_blend_constant(&mut state, color);
|
||||
}
|
||||
ArcRenderCommand::SetStencilReference(value) => {
|
||||
api_log!("RenderPass::set_stencil_reference {value}");
|
||||
|
||||
state.stencil_reference = value;
|
||||
if state
|
||||
.pipeline_flags
|
||||
.contains(PipelineFlags::STENCIL_REFERENCE)
|
||||
{
|
||||
unsafe {
|
||||
state.raw_encoder.set_stencil_reference(value);
|
||||
}
|
||||
}
|
||||
set_stencil_reference(&mut state, value);
|
||||
}
|
||||
ArcRenderCommand::SetViewport {
|
||||
ref rect,
|
||||
@ -2569,6 +2559,20 @@ fn set_blend_constant<A: HalApi>(state: &mut State<A>, color: &Color) {
|
||||
}
|
||||
}
|
||||
|
||||
fn set_stencil_reference<A: HalApi>(state: &mut State<A>, value: u32) {
|
||||
api_log!("RenderPass::set_stencil_reference {value}");
|
||||
|
||||
state.stencil_reference = value;
|
||||
if state
|
||||
.pipeline_flags
|
||||
.contains(PipelineFlags::STENCIL_REFERENCE)
|
||||
{
|
||||
unsafe {
|
||||
state.raw_encoder.set_stencil_reference(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Global {
|
||||
pub fn render_pass_set_bind_group(
|
||||
&self,
|
||||
|
Loading…
Reference in New Issue
Block a user