Vulkan: Replace Stencil Test Not Working

`GPU_STENCIL_OP_REPLACE` was different compared with OpenGL. This PR
sets the same operations that OpenGL uses.

Pull Request: https://projects.blender.org/blender/blender/pulls/114314
This commit is contained in:
Jeroen Bakker
2023-10-31 13:41:15 +01:00
parent f9928a0f56
commit 17bff13836
@@ -255,8 +255,8 @@ void VKPipelineStateManager::set_stencil_test(const eGPUStencilTest test,
switch (operation) {
case GPU_STENCIL_OP_REPLACE:
depth_stencil_state.front.failOp = VK_STENCIL_OP_KEEP;
depth_stencil_state.front.passOp = VK_STENCIL_OP_KEEP;
depth_stencil_state.front.depthFailOp = VK_STENCIL_OP_REPLACE;
depth_stencil_state.front.passOp = VK_STENCIL_OP_REPLACE;
depth_stencil_state.front.depthFailOp = VK_STENCIL_OP_KEEP;
depth_stencil_state.back = depth_stencil_state.front;
break;