summaryrefslogtreecommitdiffstats
path: root/src/video_core/rasterizer.cpp
diff options
context:
space:
mode:
authorJannik Vogel <email@jannikvogel.de>2016-04-01 15:44:42 +0200
committerJannik Vogel <email@jannikvogel.de>2016-04-08 22:35:22 +0200
commitfa24df73404b1db5e2cff855c2ec88300972be5c (patch)
tree28bddb26d39008cacc01b9517e4f41267133df27 /src/video_core/rasterizer.cpp
parentOpenGL: Keep stencil-test and framebuffer.depth_format in sync (diff)
downloadyuzu-fa24df73404b1db5e2cff855c2ec88300972be5c.tar
yuzu-fa24df73404b1db5e2cff855c2ec88300972be5c.tar.gz
yuzu-fa24df73404b1db5e2cff855c2ec88300972be5c.tar.bz2
yuzu-fa24df73404b1db5e2cff855c2ec88300972be5c.tar.lz
yuzu-fa24df73404b1db5e2cff855c2ec88300972be5c.tar.xz
yuzu-fa24df73404b1db5e2cff855c2ec88300972be5c.tar.zst
yuzu-fa24df73404b1db5e2cff855c2ec88300972be5c.zip
Diffstat (limited to 'src/video_core/rasterizer.cpp')
-rw-r--r--src/video_core/rasterizer.cpp8
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,
auto UpdateStencil = [stencil_test, x, y, &old_stencil](Pica::Regs::StencilAction action) {
u8 new_stencil = PerformStencilAction(action, old_stencil, stencil_test.reference_value);
- SetStencil(x >> 4, y >> 4, (new_stencil & stencil_test.write_mask) | (old_stencil & ~stencil_test.write_mask));
+ if (g_state.regs.framebuffer.allow_depth_stencil_write != 0)
+ SetStencil(x >> 4, y >> 4, (new_stencil & stencil_test.write_mask) | (old_stencil & ~stencil_test.write_mask));
};
if (stencil_action_enable) {
@@ -909,7 +910,7 @@ static void ProcessTriangleInternal(const Shader::OutputVertex& v0,
}
}
- if (output_merger.depth_write_enable)
+ if (regs.framebuffer.allow_depth_stencil_write != 0 && output_merger.depth_write_enable)
SetDepth(x >> 4, y >> 4, z);
// The stencil depth_pass action is executed even if depth testing is disabled
@@ -1133,7 +1134,8 @@ static void ProcessTriangleInternal(const Shader::OutputVertex& v0,
output_merger.alpha_enable ? blend_output.a() : dest.a()
};
- DrawPixel(x >> 4, y >> 4, result);
+ if (regs.framebuffer.allow_color_write != 0)
+ DrawPixel(x >> 4, y >> 4, result);
}
}
}