/ src / Ryujinx.Graphics.GAL / Multithreading / Commands / Texture / TextureSetStorageCommand.cs
TextureSetStorageCommand.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 TextureSetStorageCommand : IGALCommand, IGALCommand<TextureSetStorageCommand>
 7      {
 8          public readonly CommandType CommandType => CommandType.TextureSetStorage;
 9          private TableRef<ThreadedTexture> _texture;
10          private BufferRange _storage;
11  
12          public void Set(TableRef<ThreadedTexture> texture, BufferRange storage)
13          {
14              _texture = texture;
15              _storage = storage;
16          }
17  
18          public static void Run(ref TextureSetStorageCommand command, ThreadedRenderer threaded, IRenderer renderer)
19          {
20              command._texture.Get(threaded).Base.SetStorage(threaded.Buffers.MapBufferRange(command._storage));
21          }
22      }
23  }