CreateTextureCommand.cs 865 B

12345678910111213141516171819202122232425
  1. using Ryujinx.Graphics.GAL.Multithreading.Model;
  2. using Ryujinx.Graphics.GAL.Multithreading.Resources;
  3. namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer
  4. {
  5. struct CreateTextureCommand : IGALCommand
  6. {
  7. public CommandType CommandType => CommandType.CreateTexture;
  8. private TableRef<ThreadedTexture> _texture;
  9. private TextureCreateInfo _info;
  10. private float _scale;
  11. public void Set(TableRef<ThreadedTexture> texture, TextureCreateInfo info, float scale)
  12. {
  13. _texture = texture;
  14. _info = info;
  15. _scale = scale;
  16. }
  17. public static void Run(ref CreateTextureCommand command, ThreadedRenderer threaded, IRenderer renderer)
  18. {
  19. command._texture.Get(threaded).Base = renderer.CreateTexture(command._info, command._scale);
  20. }
  21. }
  22. }