mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-09-10 09:48:51 +02:00
20 lines
379 B
C#
20 lines
379 B
C#
|
namespace Ryujinx.Graphics.Gpu
|
||
|
{
|
||
|
class LinearSwizzle : ISwizzle
|
||
|
{
|
||
|
private int Bpp;
|
||
|
private int Stride;
|
||
|
|
||
|
public LinearSwizzle(int Width, int Bpp)
|
||
|
{
|
||
|
this.Bpp = Bpp;
|
||
|
|
||
|
Stride = Width * Bpp;
|
||
|
}
|
||
|
|
||
|
public int GetSwizzleOffset(int X, int Y)
|
||
|
{
|
||
|
return X * Bpp + Y * Stride;
|
||
|
}
|
||
|
}
|
||
|
}
|