aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Texture/LayoutConverter.cs
diff options
context:
space:
mode:
authorgdk <gab.dark.100@gmail.com>2019-10-13 22:48:09 -0300
committerThog <thog@protonmail.com>2020-01-09 02:13:00 +0100
commit1bb08742c1df4ac1a9d4a5240fdf186db77bfbcc (patch)
treeb3ab6033e2eff9db0e685b9d469ef332ae2d6c99 /Ryujinx.Graphics.Texture/LayoutConverter.cs
parent1876b346fea647e8284a66bb6d62c38801035cff (diff)
Calculate width from stride on texture copies
Diffstat (limited to 'Ryujinx.Graphics.Texture/LayoutConverter.cs')
-rw-r--r--Ryujinx.Graphics.Texture/LayoutConverter.cs7
1 files changed, 2 insertions, 5 deletions
diff --git a/Ryujinx.Graphics.Texture/LayoutConverter.cs b/Ryujinx.Graphics.Texture/LayoutConverter.cs
index 36ae522b..ef80144e 100644
--- a/Ryujinx.Graphics.Texture/LayoutConverter.cs
+++ b/Ryujinx.Graphics.Texture/LayoutConverter.cs
@@ -108,11 +108,8 @@ namespace Ryujinx.Graphics.Texture
{
int outOffs = 0;
- int w = width;
- int h = height;
-
- w = BitUtils.DivRoundUp(w, blockWidth);
- h = BitUtils.DivRoundUp(h, blockHeight);
+ int w = BitUtils.DivRoundUp(width, blockWidth);
+ int h = BitUtils.DivRoundUp(height, blockHeight);
int outStride = BitUtils.AlignUp(w * bytesPerPixel, AlignmentSize);