2018-09-08 19:51:50 +02:00
|
|
|
namespace Ryujinx.Graphics.Texture
|
2018-04-08 21:17:35 +02:00
|
|
|
{
|
|
|
|
class LinearSwizzle : ISwizzle
|
|
|
|
{
|
2018-04-08 22:09:41 +02:00
|
|
|
private int Pitch;
|
2018-04-08 21:17:35 +02:00
|
|
|
private int Bpp;
|
|
|
|
|
2018-04-08 22:09:41 +02:00
|
|
|
public LinearSwizzle(int Pitch, int Bpp)
|
2018-04-08 21:17:35 +02:00
|
|
|
{
|
2018-04-08 22:09:41 +02:00
|
|
|
this.Pitch = Pitch;
|
|
|
|
this.Bpp = Bpp;
|
2018-04-08 21:17:35 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public int GetSwizzleOffset(int X, int Y)
|
|
|
|
{
|
2018-04-08 22:09:41 +02:00
|
|
|
return X * Bpp + Y * Pitch;
|
2018-04-08 21:17:35 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|