diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/renderer_vulkan/vk_rasterizer.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index 841a6b846..3bcd6d6cc 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp | |||
| @@ -765,12 +765,7 @@ void RasterizerVulkan::UpdateStencilOp(Tegra::Engines::Maxwell3D::Regs& regs) { | |||
| 765 | const Maxwell::StencilOp zpass = regs.stencil_front_op_zpass; | 765 | const Maxwell::StencilOp zpass = regs.stencil_front_op_zpass; |
| 766 | const Maxwell::ComparisonOp compare = regs.stencil_front_func_func; | 766 | const Maxwell::ComparisonOp compare = regs.stencil_front_func_func; |
| 767 | if (regs.stencil_two_side_enable) { | 767 | if (regs.stencil_two_side_enable) { |
| 768 | scheduler.Record([fail, zfail, zpass, compare](vk::CommandBuffer cmdbuf) { | 768 | // Separate stencil op per face |
| 769 | cmdbuf.SetStencilOpEXT(VK_STENCIL_FACE_FRONT_AND_BACK, MaxwellToVK::StencilOp(fail), | ||
| 770 | MaxwellToVK::StencilOp(zpass), MaxwellToVK::StencilOp(zfail), | ||
| 771 | MaxwellToVK::ComparisonOp(compare)); | ||
| 772 | }); | ||
| 773 | } else { | ||
| 774 | const Maxwell::StencilOp back_fail = regs.stencil_back_op_fail; | 769 | const Maxwell::StencilOp back_fail = regs.stencil_back_op_fail; |
| 775 | const Maxwell::StencilOp back_zfail = regs.stencil_back_op_zfail; | 770 | const Maxwell::StencilOp back_zfail = regs.stencil_back_op_zfail; |
| 776 | const Maxwell::StencilOp back_zpass = regs.stencil_back_op_zpass; | 771 | const Maxwell::StencilOp back_zpass = regs.stencil_back_op_zpass; |
| @@ -785,6 +780,13 @@ void RasterizerVulkan::UpdateStencilOp(Tegra::Engines::Maxwell3D::Regs& regs) { | |||
| 785 | MaxwellToVK::StencilOp(back_zfail), | 780 | MaxwellToVK::StencilOp(back_zfail), |
| 786 | MaxwellToVK::ComparisonOp(back_compare)); | 781 | MaxwellToVK::ComparisonOp(back_compare)); |
| 787 | }); | 782 | }); |
| 783 | } else { | ||
| 784 | // Front face defines the stencil op of both faces | ||
| 785 | scheduler.Record([fail, zfail, zpass, compare](vk::CommandBuffer cmdbuf) { | ||
| 786 | cmdbuf.SetStencilOpEXT(VK_STENCIL_FACE_FRONT_AND_BACK, MaxwellToVK::StencilOp(fail), | ||
| 787 | MaxwellToVK::StencilOp(zpass), MaxwellToVK::StencilOp(zfail), | ||
| 788 | MaxwellToVK::ComparisonOp(compare)); | ||
| 789 | }); | ||
| 788 | } | 790 | } |
| 789 | } | 791 | } |
| 790 | 792 | ||