mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-12 02:58:42 +00:00
vk_rasterizer: Improve stencil clears (#3268)
Some checks failed
Build and Release / clang-format (push) Has been cancelled
Build and Release / get-info (push) Has been cancelled
Build and Release / reuse (push) Has been cancelled
Build and Release / windows-sdl (push) Has been cancelled
Build and Release / windows-qt (push) Has been cancelled
Build and Release / macos-sdl (push) Has been cancelled
Build and Release / macos-qt (push) Has been cancelled
Build and Release / linux-sdl (push) Has been cancelled
Build and Release / linux-qt (push) Has been cancelled
Build and Release / linux-sdl-gcc (push) Has been cancelled
Build and Release / linux-qt-gcc (push) Has been cancelled
Build and Release / pre-release (push) Has been cancelled
Some checks failed
Build and Release / clang-format (push) Has been cancelled
Build and Release / get-info (push) Has been cancelled
Build and Release / reuse (push) Has been cancelled
Build and Release / windows-sdl (push) Has been cancelled
Build and Release / windows-qt (push) Has been cancelled
Build and Release / macos-sdl (push) Has been cancelled
Build and Release / macos-qt (push) Has been cancelled
Build and Release / linux-sdl (push) Has been cancelled
Build and Release / linux-qt (push) Has been cancelled
Build and Release / linux-sdl-gcc (push) Has been cancelled
Build and Release / linux-qt-gcc (push) Has been cancelled
Build and Release / pre-release (push) Has been cancelled
This commit is contained in:
parent
2ae7037c08
commit
0b72a795eb
1 changed files with 3 additions and 1 deletions
|
@ -1211,11 +1211,13 @@ void Rasterizer::UpdateDepthStencilState() const {
|
||||||
} : front_ops;
|
} : front_ops;
|
||||||
dynamic_state.SetStencilOps(front_ops, back_ops);
|
dynamic_state.SetStencilOps(front_ops, back_ops);
|
||||||
|
|
||||||
|
const bool stencil_clear = regs.depth_render_control.stencil_clear_enable;
|
||||||
const auto front = regs.stencil_ref_front;
|
const auto front = regs.stencil_ref_front;
|
||||||
const auto back =
|
const auto back =
|
||||||
regs.depth_control.backface_enable ? regs.stencil_ref_back : regs.stencil_ref_front;
|
regs.depth_control.backface_enable ? regs.stencil_ref_back : regs.stencil_ref_front;
|
||||||
dynamic_state.SetStencilReferences(front.stencil_test_val, back.stencil_test_val);
|
dynamic_state.SetStencilReferences(front.stencil_test_val, back.stencil_test_val);
|
||||||
dynamic_state.SetStencilWriteMasks(front.stencil_write_mask, back.stencil_write_mask);
|
dynamic_state.SetStencilWriteMasks(!stencil_clear ? front.stencil_write_mask.Value() : 0U,
|
||||||
|
!stencil_clear ? back.stencil_write_mask.Value() : 0U);
|
||||||
dynamic_state.SetStencilCompareMasks(front.stencil_mask, back.stencil_mask);
|
dynamic_state.SetStencilCompareMasks(front.stencil_mask, back.stencil_mask);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue