aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.GAL/Multithreading/Commands/Shader/ShaderDisposeCommand.cs
blob: ebb2c927fb682942ff6f2304c7996c83cb56201d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
using Ryujinx.Graphics.GAL.Multithreading.Model;
using Ryujinx.Graphics.GAL.Multithreading.Resources;

namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Shader
{
    struct ShaderDisposeCommand : IGALCommand
    {
        public CommandType CommandType => CommandType.ShaderDispose;
        private TableRef<ThreadedShader> _shader;

        public void Set(TableRef<ThreadedShader> shader)
        {
            _shader = shader;
        }

        public static void Run(ref ShaderDisposeCommand command, ThreadedRenderer threaded, IRenderer renderer)
        {
            command._shader.Get(threaded).Base.Dispose();
        }
    }
}