aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics/Gpu/TextureFactory.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/TextureFactory.cs
parentb9aa3966c00b4bb3ff0292dc28ed53ad26cf284b (diff)
Use correct pitch value when decoding linear swizzle textures
Diffstat (limited to 'Ryujinx.Graphics/Gpu/TextureFactory.cs')
-rw-r--r--Ryujinx.Graphics/Gpu/TextureFactory.cs3
1 files changed, 3 insertions, 0 deletions
diff --git a/Ryujinx.Graphics/Gpu/TextureFactory.cs b/Ryujinx.Graphics/Gpu/TextureFactory.cs
index 0a0497f3..7f8580d9 100644
--- a/Ryujinx.Graphics/Gpu/TextureFactory.cs
+++ b/Ryujinx.Graphics/Gpu/TextureFactory.cs
@@ -20,6 +20,8 @@ namespace Ryujinx.Graphics.Gpu
TextureSwizzle Swizzle = (TextureSwizzle)((Tic[2] >> 21) & 7);
+ int Pitch = (Tic[3] & 0xffff) << 5;
+
int BlockHeightLog2 = (Tic[3] >> 3) & 7;
int BlockHeight = 1 << BlockHeightLog2;
@@ -31,6 +33,7 @@ namespace Ryujinx.Graphics.Gpu
TextureAddress,
Width,
Height,
+ Pitch,
BlockHeight,
Swizzle,
Format);