From 43b4b34376cdea486906f8bb4058dda3be7e1bd8 Mon Sep 17 00:00:00 2001 From: riperiperi Date: Thu, 12 May 2022 14:47:13 +0100 Subject: Implement Viewport Transform Disable (#3328) * Initial implementation (no specialization) * Use specialization * Fix render scale, increase code gen version * Revert accidental change * Address Feedback --- Ryujinx.Graphics.GAL/Multithreading/Commands/SetViewportsCommand.cs | 6 ++++-- Ryujinx.Graphics.GAL/Multithreading/ThreadedPipeline.cs | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'Ryujinx.Graphics.GAL/Multithreading') diff --git a/Ryujinx.Graphics.GAL/Multithreading/Commands/SetViewportsCommand.cs b/Ryujinx.Graphics.GAL/Multithreading/Commands/SetViewportsCommand.cs index e11b00e8..b208d9fe 100644 --- a/Ryujinx.Graphics.GAL/Multithreading/Commands/SetViewportsCommand.cs +++ b/Ryujinx.Graphics.GAL/Multithreading/Commands/SetViewportsCommand.cs @@ -9,17 +9,19 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands public CommandType CommandType => CommandType.SetViewports; private int _first; private SpanRef _viewports; + private bool _disableTransform; - public void Set(int first, SpanRef viewports) + public void Set(int first, SpanRef viewports, bool disableTransform) { _first = first; _viewports = viewports; + _disableTransform = disableTransform; } public static void Run(ref SetViewportsCommand command, ThreadedRenderer threaded, IRenderer renderer) { ReadOnlySpan viewports = command._viewports.Get(threaded); - renderer.Pipeline.SetViewports(command._first, viewports); + renderer.Pipeline.SetViewports(command._first, viewports, command._disableTransform); command._viewports.Dispose(threaded); } } diff --git a/Ryujinx.Graphics.GAL/Multithreading/ThreadedPipeline.cs b/Ryujinx.Graphics.GAL/Multithreading/ThreadedPipeline.cs index b6acfaa8..010ee7e6 100644 --- a/Ryujinx.Graphics.GAL/Multithreading/ThreadedPipeline.cs +++ b/Ryujinx.Graphics.GAL/Multithreading/ThreadedPipeline.cs @@ -304,9 +304,9 @@ namespace Ryujinx.Graphics.GAL.Multithreading _renderer.QueueCommand(); } - public void SetViewports(int first, ReadOnlySpan viewports) + public void SetViewports(int first, ReadOnlySpan viewports, bool disableTransform) { - _renderer.New().Set(first, _renderer.CopySpan(viewports)); + _renderer.New().Set(first, _renderer.CopySpan(viewports), disableTransform); _renderer.QueueCommand(); } -- cgit v1.2.3