diff options
| author | 2016-04-09 11:19:23 -0400 | |
|---|---|---|
| committer | 2016-04-09 11:19:23 -0400 | |
| commit | 069e040500302afff0f4dcadd0657f6afec1c193 (patch) | |
| tree | b8dd1b101291b1cddf4dde90201a6aadf7b0ff25 /src/video_core/rasterizer.cpp | |
| parent | Merge pull request #1644 from polaris-/gdb-fixes (diff) | |
| parent | OpenGL: Respect buffer-write allow registers (diff) | |
| download | yuzu-069e040500302afff0f4dcadd0657f6afec1c193.tar.gz yuzu-069e040500302afff0f4dcadd0657f6afec1c193.tar.xz yuzu-069e040500302afff0f4dcadd0657f6afec1c193.zip | |
Merge pull request #1624 from JayFoxRox/buffer-allow-write
Implement buffer-write allow registers
Diffstat (limited to 'src/video_core/rasterizer.cpp')
| -rw-r--r-- | src/video_core/rasterizer.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/video_core/rasterizer.cpp b/src/video_core/rasterizer.cpp index fd02aa652..5b9ed7c64 100644 --- a/src/video_core/rasterizer.cpp +++ b/src/video_core/rasterizer.cpp | |||
| @@ -809,7 +809,8 @@ static void ProcessTriangleInternal(const Shader::OutputVertex& v0, | |||
| 809 | 809 | ||
| 810 | auto UpdateStencil = [stencil_test, x, y, &old_stencil](Pica::Regs::StencilAction action) { | 810 | auto UpdateStencil = [stencil_test, x, y, &old_stencil](Pica::Regs::StencilAction action) { |
| 811 | u8 new_stencil = PerformStencilAction(action, old_stencil, stencil_test.reference_value); | 811 | u8 new_stencil = PerformStencilAction(action, old_stencil, stencil_test.reference_value); |
| 812 | SetStencil(x >> 4, y >> 4, (new_stencil & stencil_test.write_mask) | (old_stencil & ~stencil_test.write_mask)); | 812 | if (g_state.regs.framebuffer.allow_depth_stencil_write != 0) |
| 813 | SetStencil(x >> 4, y >> 4, (new_stencil & stencil_test.write_mask) | (old_stencil & ~stencil_test.write_mask)); | ||
| 813 | }; | 814 | }; |
| 814 | 815 | ||
| 815 | if (stencil_action_enable) { | 816 | if (stencil_action_enable) { |
| @@ -909,7 +910,7 @@ static void ProcessTriangleInternal(const Shader::OutputVertex& v0, | |||
| 909 | } | 910 | } |
| 910 | } | 911 | } |
| 911 | 912 | ||
| 912 | if (output_merger.depth_write_enable) | 913 | if (regs.framebuffer.allow_depth_stencil_write != 0 && output_merger.depth_write_enable) |
| 913 | SetDepth(x >> 4, y >> 4, z); | 914 | SetDepth(x >> 4, y >> 4, z); |
| 914 | 915 | ||
| 915 | // The stencil depth_pass action is executed even if depth testing is disabled | 916 | // The stencil depth_pass action is executed even if depth testing is disabled |
| @@ -1133,7 +1134,8 @@ static void ProcessTriangleInternal(const Shader::OutputVertex& v0, | |||
| 1133 | output_merger.alpha_enable ? blend_output.a() : dest.a() | 1134 | output_merger.alpha_enable ? blend_output.a() : dest.a() |
| 1134 | }; | 1135 | }; |
| 1135 | 1136 | ||
| 1136 | DrawPixel(x >> 4, y >> 4, result); | 1137 | if (regs.framebuffer.allow_color_write != 0) |
| 1138 | DrawPixel(x >> 4, y >> 4, result); | ||
| 1137 | } | 1139 | } |
| 1138 | } | 1140 | } |
| 1139 | } | 1141 | } |