CreateTextureArrayCommand.cs
1 using Ryujinx.Graphics.GAL.Multithreading.Model; 2 using Ryujinx.Graphics.GAL.Multithreading.Resources; 3 4 namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer 5 { 6 struct CreateTextureArrayCommand : IGALCommand, IGALCommand<CreateTextureArrayCommand> 7 { 8 public readonly CommandType CommandType => CommandType.CreateTextureArray; 9 private TableRef<ThreadedTextureArray> _textureArray; 10 private int _size; 11 private bool _isBuffer; 12 13 public void Set(TableRef<ThreadedTextureArray> textureArray, int size, bool isBuffer) 14 { 15 _textureArray = textureArray; 16 _size = size; 17 _isBuffer = isBuffer; 18 } 19 20 public static void Run(ref CreateTextureArrayCommand command, ThreadedRenderer threaded, IRenderer renderer) 21 { 22 command._textureArray.Get(threaded).Base = renderer.CreateTextureArray(command._size, command._isBuffer); 23 } 24 } 25 }