aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.GAL/Multithreading/Commands/ImageArray/ImageArrayDisposeCommand.cs
blob: ac2ac933b788eb7f609b11593680f5b2d26dd47a (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.ImageArray
{
    struct ImageArrayDisposeCommand : IGALCommand, IGALCommand<ImageArrayDisposeCommand>
    {
        public readonly CommandType CommandType => CommandType.ImageArrayDispose;
        private TableRef<ThreadedImageArray> _imageArray;

        public void Set(TableRef<ThreadedImageArray> imageArray)
        {
            _imageArray = imageArray;
        }

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