Ryujinx/src/Ryujinx.Graphics.GAL/Multithreading/Commands/SetViewportsCommand.cs
TSRBerry 2989c163a8
editorconfig: Set default encoding to UTF-8 (#5793)
* editorconfig: Add default charset

* Change file encoding from UTF-8-BOM to UTF-8
2023-12-04 14:17:13 +01:00

23 lines
765 B
C#

using Ryujinx.Graphics.GAL.Multithreading.Model;
using System;
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
struct SetViewportsCommand : IGALCommand, IGALCommand<SetViewportsCommand>
{
public readonly CommandType CommandType => CommandType.SetViewports;
private SpanRef<Viewport> _viewports;
public void Set(SpanRef<Viewport> viewports)
{
_viewports = viewports;
}
public static void Run(ref SetViewportsCommand command, ThreadedRenderer threaded, IRenderer renderer)
{
ReadOnlySpan<Viewport> viewports = command._viewports.Get(threaded);
renderer.Pipeline.SetViewports(viewports);
command._viewports.Dispose(threaded);
}
}
}