aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/Gpu/Texture/LinearSwizzle.cs
blob: 720f78322ac359ea06e7c9843a2c99359d35513d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
namespace Ryujinx.HLE.Gpu.Texture
{
    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;
        }
    }
}