2018-06-24 00:39:25 +00:00
|
|
|
namespace Ryujinx.HLE.Gpu.Texture
|
2018-04-08 19:17:35 +00:00
|
|
|
{
|
|
|
|
class LinearSwizzle : ISwizzle
|
|
|
|
{
|
2018-04-08 20:09:41 +00:00
|
|
|
private int Pitch;
|
2018-04-08 19:17:35 +00:00
|
|
|
private int Bpp;
|
|
|
|
|
2018-04-08 20:09:41 +00:00
|
|
|
public LinearSwizzle(int Pitch, int Bpp)
|
2018-04-08 19:17:35 +00:00
|
|
|
{
|
2018-04-08 20:09:41 +00:00
|
|
|
this.Pitch = Pitch;
|
|
|
|
this.Bpp = Bpp;
|
2018-04-08 19:17:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public int GetSwizzleOffset(int X, int Y)
|
|
|
|
{
|
2018-04-08 20:09:41 +00:00
|
|
|
return X * Bpp + Y * Pitch;
|
2018-04-08 19:17:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|