mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-11-16 01:55:27 +00:00
24 lines
748 B
C#
24 lines
748 B
C#
|
using Ryujinx.Graphics.GAL.Multithreading.Model;
|
|||
|
using Ryujinx.Graphics.GAL.Multithreading.Resources;
|
|||
|
|
|||
|
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
|
|||
|
{
|
|||
|
struct SetSamplerCommand : IGALCommand
|
|||
|
{
|
|||
|
public CommandType CommandType => CommandType.SetSampler;
|
|||
|
private int _index;
|
|||
|
private TableRef<ISampler> _sampler;
|
|||
|
|
|||
|
public void Set(int index, TableRef<ISampler> sampler)
|
|||
|
{
|
|||
|
_index = index;
|
|||
|
_sampler = sampler;
|
|||
|
}
|
|||
|
|
|||
|
public static void Run(ref SetSamplerCommand command, ThreadedRenderer threaded, IRenderer renderer)
|
|||
|
{
|
|||
|
renderer.Pipeline.SetSampler(command._index, command._sampler.GetAs<ThreadedSampler>(threaded)?.Base);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|