TextureCopyToScaledCommand.cs 1.2 KB

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