mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-10-01 12:30:00 +02:00
24 lines
758 B
C#
24 lines
758 B
C#
|
using Ryujinx.Graphics.GAL.Multithreading.Model;
|
|||
|
using Ryujinx.Graphics.GAL.Multithreading.Resources;
|
|||
|
|
|||
|
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
|
|||
|
{
|
|||
|
struct SetTextureCommand : IGALCommand
|
|||
|
{
|
|||
|
public CommandType CommandType => CommandType.SetTexture;
|
|||
|
private int _binding;
|
|||
|
private TableRef<ITexture> _texture;
|
|||
|
|
|||
|
public void Set(int binding, TableRef<ITexture> texture)
|
|||
|
{
|
|||
|
_binding = binding;
|
|||
|
_texture = texture;
|
|||
|
}
|
|||
|
|
|||
|
public static void Run(ref SetTextureCommand command, ThreadedRenderer threaded, IRenderer renderer)
|
|||
|
{
|
|||
|
renderer.Pipeline.SetTexture(command._binding, command._texture.GetAs<ThreadedTexture>(threaded)?.Base);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|