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