From 2437ccca0e82b8b2a99d8632acf28ca0cc14c523 Mon Sep 17 00:00:00 2001 From: gdk Date: Thu, 21 Nov 2019 23:46:14 -0300 Subject: Separate sub-channel state --- Ryujinx.Graphics.Gpu/Engine/MethodClear.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Ryujinx.Graphics.Gpu/Engine/MethodClear.cs') 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(MethodOffset.ClearColors); + var clearColor = state.Get(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(MethodOffset.ClearDepthValue); - int stencilValue = _context.State.Get (MethodOffset.ClearStencilValue); + float depthValue = state.Get(MethodOffset.ClearDepthValue); + int stencilValue = state.Get (MethodOffset.ClearStencilValue); int stencilMask = 0; if (clearStencil) { - stencilMask = _context.State.Get(MethodOffset.StencilTestState).FrontMask; + stencilMask = state.Get(MethodOffset.StencilTestState).FrontMask; } _context.Renderer.Pipeline.ClearRenderTargetDepthStencil( -- cgit v1.2.3