mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-08-07 10:48:28 +02:00
Use correct pitch value when decoding linear swizzle textures
This commit is contained in:
@@ -2,19 +2,18 @@ namespace Ryujinx.Graphics.Gpu
|
||||
{
|
||||
class LinearSwizzle : ISwizzle
|
||||
{
|
||||
private int Pitch;
|
||||
private int Bpp;
|
||||
private int Stride;
|
||||
|
||||
public LinearSwizzle(int Width, int Bpp)
|
||||
public LinearSwizzle(int Pitch, int Bpp)
|
||||
{
|
||||
this.Bpp = Bpp;
|
||||
|
||||
Stride = Width * Bpp;
|
||||
this.Pitch = Pitch;
|
||||
this.Bpp = Bpp;
|
||||
}
|
||||
|
||||
public int GetSwizzleOffset(int X, int Y)
|
||||
{
|
||||
return X * Bpp + Y * Stride;
|
||||
return X * Bpp + Y * Pitch;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user