aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.GAL/Multithreading/Commands/SetDepthBiasCommand.cs
blob: 0c46fbda281c35849f9a15334f3605f2451bab59 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
    struct SetDepthBiasCommand : IGALCommand, IGALCommand<SetDepthBiasCommand>
    {
        public readonly CommandType CommandType => CommandType.SetDepthBias;
        private PolygonModeMask _enables;
        private float _factor;
        private float _units;
        private float _clamp;

        public void Set(PolygonModeMask enables, float factor, float units, float clamp)
        {
            _enables = enables;
            _factor = factor;
            _units = units;
            _clamp = clamp;
        }

        public static void Run(ref SetDepthBiasCommand command, ThreadedRenderer threaded, IRenderer renderer)
        {
            renderer.Pipeline.SetDepthBias(command._enables, command._factor, command._units, command._clamp);
        }
    }
}