aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics/Gpu/LinearSwizzle.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2018-04-08 17:09:41 -0300
committergdkchan <gab.dark.100@gmail.com>2018-04-08 17:09:41 -0300
commit36dfd20c879967fc67721ed46ac773d341aa80d9 (patch)
tree6f7569630d5cf5955358bc4ebcc0705f16912065 /Ryujinx.Graphics/Gpu/LinearSwizzle.cs
parentb9aa3966c00b4bb3ff0292dc28ed53ad26cf284b (diff)
Use correct pitch value when decoding linear swizzle textures
Diffstat (limited to 'Ryujinx.Graphics/Gpu/LinearSwizzle.cs')
-rw-r--r--Ryujinx.Graphics/Gpu/LinearSwizzle.cs11
1 files changed, 5 insertions, 6 deletions
diff --git a/Ryujinx.Graphics/Gpu/LinearSwizzle.cs b/Ryujinx.Graphics/Gpu/LinearSwizzle.cs
index 01f09f81..c7a6b304 100644
--- a/Ryujinx.Graphics/Gpu/LinearSwizzle.cs
+++ b/Ryujinx.Graphics/Gpu/LinearSwizzle.cs
@@ -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;
}
}
} \ No newline at end of file