diff options
| author | JPikachu <jpikachu.eden@gmail.com> | 2025-06-29 17:16:47 +0000 |
|---|---|---|
| committer | JPikachu <jpikachu@noreply.localhost> | 2025-06-29 17:16:47 +0000 |
| commit | 5ddc889d8da8f6d811a0665b3a7ee9bde76ea3a0 (patch) | |
| tree | 74552f8c2c40256b5ce9c765a2b9eef0a5c775db /src/video_core/renderer_vulkan/blit_image.cpp | |
| parent | 11b152ab587ba52af9e6165c8203687d85185d5a (diff) | |
[vk] Enable trivial stencil for games like EOW (#234)
Fixes rift clipping in LoZ: EOW + possible fixes for other games.
NOTE: Flickering may occur, this is for testing purposes.
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/234
Co-authored-by: JPikachu <jpikachu.eden@gmail.com>
Co-committed-by: JPikachu <jpikachu.eden@gmail.com>
Diffstat (limited to 'src/video_core/renderer_vulkan/blit_image.cpp')
| -rw-r--r-- | src/video_core/renderer_vulkan/blit_image.cpp | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/src/video_core/renderer_vulkan/blit_image.cpp b/src/video_core/renderer_vulkan/blit_image.cpp index 7fb428d996..ddbb5581f0 100644 --- a/src/video_core/renderer_vulkan/blit_image.cpp +++ b/src/video_core/renderer_vulkan/blit_image.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -189,9 +192,25 @@ constexpr VkPipelineDepthStencilStateCreateInfo PIPELINE_DEPTH_STENCIL_STATE_CRE .depthWriteEnable = VK_TRUE, .depthCompareOp = VK_COMPARE_OP_ALWAYS, .depthBoundsTestEnable = VK_FALSE, - .stencilTestEnable = VK_FALSE, - .front = VkStencilOpState{}, - .back = VkStencilOpState{}, + .stencilTestEnable = VK_TRUE, + .front = VkStencilOpState{ + .failOp = VK_STENCIL_OP_REPLACE, + .passOp = VK_STENCIL_OP_REPLACE, + .depthFailOp = VK_STENCIL_OP_KEEP, + .compareOp = VK_COMPARE_OP_ALWAYS, + .compareMask = 0x0, + .writeMask = 0xFFFFFFFF, + .reference = 0x00, + }, + .back = VkStencilOpState{ + .failOp = VK_STENCIL_OP_REPLACE, + .passOp = VK_STENCIL_OP_REPLACE, + .depthFailOp = VK_STENCIL_OP_KEEP, + .compareOp = VK_COMPARE_OP_ALWAYS, + .compareMask = 0x0, + .writeMask = 0xFFFFFFFF, + .reference = 0x00, + }, .minDepthBounds = 0.0f, .maxDepthBounds = 0.0f, }; |
