Use correct pitch value when decoding linear swizzle textures
This commit is contained in:
parent
b9aa3966c0
commit
36dfd20c87
4 changed files with 19 additions and 14 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue