2018-06-11 02:46:42 +02:00
|
|
|
namespace Ryujinx.HLE.Gpu
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|