aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/Engine/Methods.cs
diff options
context:
space:
mode:
authorriperiperi <rhy3756547@hotmail.com>2020-07-10 18:23:15 +0100
committerGitHub <noreply@github.com>2020-07-10 14:23:15 -0300
commitf224769c493e80ab2bd9a674be697461749e0b94 (patch)
tree7cf61d4b96a0ceaf87d7877be63a5b2abc2543df /Ryujinx.Graphics.Gpu/Engine/Methods.cs
parent189c0c9c726b3a700272831cd5cf10b2fc817cc2 (diff)
Implement Logical Operation registers and functionality (#1380)
* Implement Logical Operation registers and functionality. * Address Feedback 1
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Engine/Methods.cs')
-rw-r--r--Ryujinx.Graphics.Gpu/Engine/Methods.cs16
1 files changed, 16 insertions, 0 deletions
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();
}
@@ -876,6 +881,17 @@ namespace Ryujinx.Graphics.Gpu.Engine
}
/// <summary>
+ /// Updates host logical operation state, based on guest state.
+ /// </summary>
+ /// <param name="state">Current GPU state</param>
+ public void UpdateLogicOpState(GpuState state)
+ {
+ LogicalOpState logicOpState = state.Get<LogicalOpState>(MethodOffset.LogicOpState);
+
+ _context.Renderer.Pipeline.SetLogicOpState(logicOpState.Enable, logicOpState.LogicalOp);
+ }
+
+ /// <summary>
/// Storage buffer address and size information.
/// </summary>
private struct SbDescriptor