From f224769c493e80ab2bd9a674be697461749e0b94 Mon Sep 17 00:00:00 2001 From: riperiperi Date: Fri, 10 Jul 2020 18:23:15 +0100 Subject: Implement Logical Operation registers and functionality (#1380) * Implement Logical Operation registers and functionality. * Address Feedback 1 --- Ryujinx.Graphics.Gpu/Engine/Methods.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'Ryujinx.Graphics.Gpu/Engine/Methods.cs') diff --git a/Ryujinx.Graphics.Gpu/Engine/Methods.cs b/Ryujinx.Graphics.Gpu/Engine/Methods.cs index 5677c8a0..06298cdf 100644 --- a/Ryujinx.Graphics.Gpu/Engine/Methods.cs +++ b/Ryujinx.Graphics.Gpu/Engine/Methods.cs @@ -252,6 +252,11 @@ namespace Ryujinx.Graphics.Gpu.Engine UpdateBlendState(state); } + if (state.QueryModified(MethodOffset.LogicOpState)) + { + UpdateLogicOpState(state); + } + CommitBindings(); } @@ -875,6 +880,17 @@ namespace Ryujinx.Graphics.Gpu.Engine } } + /// + /// Updates host logical operation state, based on guest state. + /// + /// Current GPU state + public void UpdateLogicOpState(GpuState state) + { + LogicalOpState logicOpState = state.Get(MethodOffset.LogicOpState); + + _context.Renderer.Pipeline.SetLogicOpState(logicOpState.Enable, logicOpState.LogicalOp); + } + /// /// Storage buffer address and size information. /// -- cgit v1.2.3