aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Shader/TextureDescriptor.cs
blob: a9900fb89261c7b7c8cfd564422d930c2af5cd5c (plain)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
namespace Ryujinx.Graphics.Shader
{
    public struct TextureDescriptor
    {
        public string Name { get; }

        public SamplerType Type { get; }

        public int HandleIndex { get; }

        public bool IsBindless { get; }

        public int CbufSlot   { get; }
        public int CbufOffset { get; }

        public TextureUsageFlags Flags { get; set; }

        public TextureDescriptor(string name, SamplerType type, int handleIndex)
        {
            Name        = name;
            Type        = type;
            HandleIndex = handleIndex;

            IsBindless = false;

            CbufSlot   = 0;
            CbufOffset = 0;

            Flags = TextureUsageFlags.None;
        }

        public TextureDescriptor(string name, SamplerType type, int cbufSlot, int cbufOffset)
        {
            Name        = name;
            Type        = type;
            HandleIndex = 0;

            IsBindless = true;

            CbufSlot   = cbufSlot;
            CbufOffset = cbufOffset;

            Flags = TextureUsageFlags.None;
        }
    }
}