aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/Gpu/LinearSwizzle.cs
blob: 995866ad67a25c5ac50905cf4c2b2db937742538 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
namespace Ryujinx.HLE.Gpu
{
    class LinearSwizzle : ISwizzle
    {
        private int Pitch;
        private int Bpp;

        public LinearSwizzle(int Pitch, int Bpp)
        {
            this.Pitch = Pitch;
            this.Bpp   = Bpp;
        }

        public int GetSwizzleOffset(int X, int Y)
        {
            return X * Bpp + Y * Pitch;
        }
    }
}