aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics/Gal/ShaderDeclInfo.cs
blob: ed1955cdbb1f7c48f9532150e03ee7da164f0101 (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
using Ryujinx.Graphics.Texture;

namespace Ryujinx.Graphics.Gal
{
    public class ShaderDeclInfo
    {
        public string Name { get; private set; }

        public int  Index { get; private set; }
        public bool IsCb  { get; private set; }
        public int  Cbuf  { get; private set; }
        public int  Size  { get; private set; }

        public GalTextureTarget TextureTarget { get; private set; }

        public TextureInstructionSuffix TextureSuffix { get; private set; }

        public ShaderDeclInfo(
            string Name,
            int    Index,
            bool   IsCb = false,
            int    Cbuf = 0,
            int    Size = 1,
            GalTextureTarget         TextureTarget = GalTextureTarget.TwoD,
            TextureInstructionSuffix TextureSuffix = TextureInstructionSuffix.None)
        {
            this.Name        = Name;
            this.Index       = Index;
            this.IsCb        = IsCb;
            this.Cbuf        = Cbuf;
            this.Size        = Size;

            this.TextureTarget = TextureTarget;
            this.TextureSuffix = TextureSuffix;
        }

        internal void Enlarge(int NewSize)
        {
            if (Size < NewSize)
            {
                Size = NewSize;
            }
        }
    }
}