aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/State/MemoryLayout.cs
blob: 8e53a36a1efa591a7063d58d2eca599741c39975 (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
namespace Ryujinx.Graphics.Gpu.State
{
    struct MemoryLayout
    {
        public uint Packed;

        public int UnpackGobBlocksInX()
        {
            return 1 << (int)(Packed & 0xf);
        }

        public int UnpackGobBlocksInY()
        {
            return 1 << (int)((Packed >> 4) & 0xf);
        }

        public int UnpackGobBlocksInZ()
        {
            return 1 << (int)((Packed >> 8) & 0xf);
        }

        public bool UnpackIsLinear()
        {
            return (Packed & 0x1000) != 0;
        }

        public bool UnpackIsTarget3D()
        {
            return (Packed & 0x10000) != 0;
        }
    }
}