TextureCreateViewCommand.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 TextureCreateViewCommand : IGALCommand, IGALCommand<TextureCreateViewCommand> 7 { 8 public readonly CommandType CommandType => CommandType.TextureCreateView; 9 private TableRef<ThreadedTexture> _texture; 10 private TableRef<ThreadedTexture> _destination; 11 private TextureCreateInfo _info; 12 private int _firstLayer; 13 private int _firstLevel; 14 15 public void Set(TableRef<ThreadedTexture> texture, TableRef<ThreadedTexture> destination, TextureCreateInfo info, int firstLayer, int firstLevel) 16 { 17 _texture = texture; 18 _destination = destination; 19 _info = info; 20 _firstLayer = firstLayer; 21 _firstLevel = firstLevel; 22 } 23 24 public static void Run(ref TextureCreateViewCommand command, ThreadedRenderer threaded, IRenderer renderer) 25 { 26 ThreadedTexture source = command._texture.Get(threaded); 27 command._destination.Get(threaded).Base = source.Base.CreateView(command._info, command._firstLayer, command._firstLevel); 28 } 29 } 30 }