aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.GAL/Multithreading/Resources/Programs/BinaryProgramRequest.cs
blob: b4c6853f25d8fd7242a3b1369b678d0a0e68c07b (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
25
namespace Ryujinx.Graphics.GAL.Multithreading.Resources.Programs
{
    class BinaryProgramRequest : IProgramRequest
    {
        public ThreadedProgram Threaded { get; set; }

        private byte[] _data;
        private bool _hasFragmentShader;
        private ShaderInfo _info;

        public BinaryProgramRequest(ThreadedProgram program, byte[] data, bool hasFragmentShader, ShaderInfo info)
        {
            Threaded = program;

            _data = data;
            _hasFragmentShader = hasFragmentShader;
            _info = info;
        }

        public IProgram Create(IRenderer renderer)
        {
            return renderer.LoadProgramBinary(_data, _hasFragmentShader, _info);
        }
    }
}