From bd371f3a5b0ef248ae5cc16431f6495c064edb1f Mon Sep 17 00:00:00 2001 From: MoochMcGee Date: Tue, 21 Jul 2015 19:50:27 -0500 Subject: [PATCH] Implement stencil action 2 in SW renderer --- src/video_core/pica.h | 1 + src/video_core/rasterizer.cpp | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/video_core/pica.h b/src/video_core/pica.h index aec6f0660..62f595339 100644 --- a/src/video_core/pica.h +++ b/src/video_core/pica.h @@ -431,6 +431,7 @@ struct Regs { enum class StencilAction : u32 { Keep = 0, + AndReverse = 2, Xor = 5, }; diff --git a/src/video_core/rasterizer.cpp b/src/video_core/rasterizer.cpp index e2b90ad1c..572797b4e 100644 --- a/src/video_core/rasterizer.cpp +++ b/src/video_core/rasterizer.cpp @@ -221,6 +221,9 @@ static u8 PerformStencilAction(Regs::StencilAction action, u8 dest, u8 ref) { case Regs::StencilAction::Keep: return dest; + case Regs::StencilAction::AndReverse: + return dest & ~ref; + case Regs::StencilAction::Xor: return dest ^ ref;