/ src / Ryujinx.Graphics.GAL / Multithreading / Commands / Texture / TextureCopyToScaledCommand.cs
TextureCopyToScaledCommand.cs
 1  using Ryujinx.Graphics.GAL.Multithreading.Model;
 2  using Ryujinx.Graphics.GAL.Multithreading.Resources;
 3  
 4  namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Texture
 5  {
 6      struct TextureCopyToScaledCommand : IGALCommand, IGALCommand<TextureCopyToScaledCommand>
 7      {
 8          public readonly CommandType CommandType => CommandType.TextureCopyToScaled;
 9          private TableRef<ThreadedTexture> _texture;
10          private TableRef<ThreadedTexture> _destination;
11          private Extents2D _srcRegion;
12          private Extents2D _dstRegion;
13          private bool _linearFilter;
14  
15          public void Set(TableRef<ThreadedTexture> texture, TableRef<ThreadedTexture> destination, Extents2D srcRegion, Extents2D dstRegion, bool linearFilter)
16          {
17              _texture = texture;
18              _destination = destination;
19              _srcRegion = srcRegion;
20              _dstRegion = dstRegion;
21              _linearFilter = linearFilter;
22          }
23  
24          public static void Run(ref TextureCopyToScaledCommand command, ThreadedRenderer threaded, IRenderer renderer)
25          {
26              ThreadedTexture source = command._texture.Get(threaded);
27              source.Base.CopyTo(command._destination.Get(threaded).Base, command._srcRegion, command._dstRegion, command._linearFilter);
28          }
29      }
30  }