diff options
| author | 2015-08-21 09:48:43 -0500 | |
|---|---|---|
| committer | 2015-08-21 09:48:43 -0500 | |
| commit | 8e6336d96bf7ee0e31ca51064c85f1b65913fe7a (patch) | |
| tree | 0ec894d5bda08780179968a3fc82a146574c6a7c /src/video_core/rasterizer.cpp | |
| parent | Rasterizer: Abstract duplicated stencil code into a lambda. (diff) | |
| download | yuzu-8e6336d96bf7ee0e31ca51064c85f1b65913fe7a.tar.gz yuzu-8e6336d96bf7ee0e31ca51064c85f1b65913fe7a.tar.xz yuzu-8e6336d96bf7ee0e31ca51064c85f1b65913fe7a.zip | |
SWRenderer: The stencil depth_pass action is executed even if depth testing is disabled.
The HW renderer already did this.
Diffstat (limited to 'src/video_core/rasterizer.cpp')
| -rw-r--r-- | src/video_core/rasterizer.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/video_core/rasterizer.cpp b/src/video_core/rasterizer.cpp index c768a5eea..696839da6 100644 --- a/src/video_core/rasterizer.cpp +++ b/src/video_core/rasterizer.cpp | |||
| @@ -888,21 +888,19 @@ static void ProcessTriangleInternal(const Shader::OutputVertex& v0, | |||
| 888 | } | 888 | } |
| 889 | 889 | ||
| 890 | if (!pass) { | 890 | if (!pass) { |
| 891 | if (stencil_action_enable) { | 891 | if (stencil_action_enable) |
| 892 | UpdateStencil(stencil_test.action_depth_fail); | 892 | UpdateStencil(stencil_test.action_depth_fail); |
| 893 | } | ||
| 894 | continue; | 893 | continue; |
| 895 | } | 894 | } |
| 896 | 895 | ||
| 897 | if (output_merger.depth_write_enable) | 896 | if (output_merger.depth_write_enable) |
| 898 | SetDepth(x >> 4, y >> 4, z); | 897 | SetDepth(x >> 4, y >> 4, z); |
| 899 | |||
| 900 | if (stencil_action_enable) { | ||
| 901 | // TODO: What happens if stencil testing is enabled, but depth testing is not? Will stencil get updated anyway? | ||
| 902 | UpdateStencil(stencil_test.action_depth_pass); | ||
| 903 | } | ||
| 904 | } | 898 | } |
| 905 | 899 | ||
| 900 | // The stencil depth_pass action is executed even if depth testing is disabled | ||
| 901 | if (stencil_action_enable) | ||
| 902 | UpdateStencil(stencil_test.action_depth_pass); | ||
| 903 | |||
| 906 | auto dest = GetPixel(x >> 4, y >> 4); | 904 | auto dest = GetPixel(x >> 4, y >> 4); |
| 907 | Math::Vec4<u8> blend_output = combiner_output; | 905 | Math::Vec4<u8> blend_output = combiner_output; |
| 908 | 906 | ||