TextureSetStorageCommand.cs 811 B

1234567891011121314151617181920212223
  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 TextureSetStorageCommand : IGALCommand
  6. {
  7. public CommandType CommandType => CommandType.TextureSetStorage;
  8. private TableRef<ThreadedTexture> _texture;
  9. private BufferRange _storage;
  10. public void Set(TableRef<ThreadedTexture> texture, BufferRange storage)
  11. {
  12. _texture = texture;
  13. _storage = storage;
  14. }
  15. public static void Run(ref TextureSetStorageCommand command, ThreadedRenderer threaded, IRenderer renderer)
  16. {
  17. command._texture.Get(threaded).Base.SetStorage(threaded.Buffers.MapBufferRange(command._storage));
  18. }
  19. }
  20. }