2018-06-24 02:39:25 +02:00
|
|
|
namespace Ryujinx.HLE.Gpu.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
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|