aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/Engine/MethodClear.cs
diff options
context:
space:
mode:
authorgdk <gab.dark.100@gmail.com>2019-11-21 23:46:14 -0300
committerThog <thog@protonmail.com>2020-01-09 02:13:00 +0100
commit2437ccca0e82b8b2a99d8632acf28ca0cc14c523 (patch)
treefff04c08f5812b602378f352650144736983497a /Ryujinx.Graphics.Gpu/Engine/MethodClear.cs
parent3ca675223a495f7d0a9d2130b8d88d9c5c79747e (diff)
Separate sub-channel state
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Engine/MethodClear.cs')
-rw-r--r--Ryujinx.Graphics.Gpu/Engine/MethodClear.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/Ryujinx.Graphics.Gpu/Engine/MethodClear.cs b/Ryujinx.Graphics.Gpu/Engine/MethodClear.cs
index b50a1766..da6c94e5 100644
--- a/Ryujinx.Graphics.Gpu/Engine/MethodClear.cs
+++ b/Ryujinx.Graphics.Gpu/Engine/MethodClear.cs
@@ -5,9 +5,9 @@ namespace Ryujinx.Graphics.Gpu.Engine
{
partial class Methods
{
- private void Clear(int argument)
+ private void Clear(GpuState state, int argument)
{
- UpdateRenderTargetStateIfNeeded();
+ UpdateRenderTargetStateIfNeeded(state);
_textureManager.CommitGraphicsBindings();
@@ -20,7 +20,7 @@ namespace Ryujinx.Graphics.Gpu.Engine
if (componentMask != 0)
{
- var clearColor = _context.State.Get<ClearColors>(MethodOffset.ClearColors);
+ var clearColor = state.Get<ClearColors>(MethodOffset.ClearColors);
ColorF color = new ColorF(
clearColor.Red,
@@ -33,14 +33,14 @@ namespace Ryujinx.Graphics.Gpu.Engine
if (clearDepth || clearStencil)
{
- float depthValue = _context.State.Get<float>(MethodOffset.ClearDepthValue);
- int stencilValue = _context.State.Get<int> (MethodOffset.ClearStencilValue);
+ float depthValue = state.Get<float>(MethodOffset.ClearDepthValue);
+ int stencilValue = state.Get<int> (MethodOffset.ClearStencilValue);
int stencilMask = 0;
if (clearStencil)
{
- stencilMask = _context.State.Get<StencilTestState>(MethodOffset.StencilTestState).FrontMask;
+ stencilMask = state.Get<StencilTestState>(MethodOffset.StencilTestState).FrontMask;
}
_context.Renderer.Pipeline.ClearRenderTargetDepthStencil(