diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-12-30 03:08:32 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-02-28 21:56:42 +0100 |
commit | 37536d7a4996d0008d8988f50dcbc7c126a99c14 (patch) | |
tree | b64ed591078ed28bb662f100db64de90838d63d5 /src/video_core/renderer_opengl/gl_state_tracker.cpp | |
parent | gl_state_tracker: Implement depth dirty flags (diff) | |
download | yuzu-37536d7a4996d0008d8988f50dcbc7c126a99c14.tar yuzu-37536d7a4996d0008d8988f50dcbc7c126a99c14.tar.gz yuzu-37536d7a4996d0008d8988f50dcbc7c126a99c14.tar.bz2 yuzu-37536d7a4996d0008d8988f50dcbc7c126a99c14.tar.lz yuzu-37536d7a4996d0008d8988f50dcbc7c126a99c14.tar.xz yuzu-37536d7a4996d0008d8988f50dcbc7c126a99c14.tar.zst yuzu-37536d7a4996d0008d8988f50dcbc7c126a99c14.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/gl_state_tracker.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_state_tracker.cpp b/src/video_core/renderer_opengl/gl_state_tracker.cpp index 999440656..eae47827b 100644 --- a/src/video_core/renderer_opengl/gl_state_tracker.cpp +++ b/src/video_core/renderer_opengl/gl_state_tracker.cpp @@ -136,6 +136,19 @@ void SetupDirtyDepthTest(Tables& tables) { table[OFF(depth_test_func)] = DepthTest; } +void SetupDirtyStencilTest(Tables& tables) { + static constexpr std::array offsets = { + OFF(stencil_enable), OFF(stencil_front_func_func), OFF(stencil_front_func_ref), + OFF(stencil_front_func_mask), OFF(stencil_front_op_fail), OFF(stencil_front_op_zfail), + OFF(stencil_front_op_zpass), OFF(stencil_front_mask), OFF(stencil_two_side_enable), + OFF(stencil_back_func_func), OFF(stencil_back_func_ref), OFF(stencil_back_func_mask), + OFF(stencil_back_op_fail), OFF(stencil_back_op_zfail), OFF(stencil_back_op_zpass), + OFF(stencil_back_mask)}; + for (const auto offset : offsets) { + tables[0][offset] = StencilTest; + } +} + void SetupDirtyBlend(Tables& tables) { FillBlock(tables[0], OFF(blend_color), NUM(blend_color), BlendColor); @@ -177,6 +190,7 @@ void StateTracker::Initialize() { SetupDirtyVertexFormat(tables); SetupDirtyShaders(tables); SetupDirtyDepthTest(tables); + SetupDirtyStencilTest(tables); SetupDirtyBlend(tables); SetupDirtyMisc(tables); |