aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Ryujinx.Core/Gpu/BlockLinearSwizzle.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Ryujinx.Core/Gpu/BlockLinearSwizzle.cs b/Ryujinx.Core/Gpu/BlockLinearSwizzle.cs
index eb41ea30..1b604430 100644
--- a/Ryujinx.Core/Gpu/BlockLinearSwizzle.cs
+++ b/Ryujinx.Core/Gpu/BlockLinearSwizzle.cs
@@ -1,3 +1,5 @@
+using System;
+
namespace Ryujinx.Core.Gpu
{
class BlockLinearSwizzle : ISwizzle
@@ -16,7 +18,7 @@ namespace Ryujinx.Core.Gpu
BhShift = CountLsbZeros(BlockHeight * 8);
BppShift = CountLsbZeros(Bpp);
- int WidthInGobs = Width * Bpp / 64;
+ int WidthInGobs = (int)MathF.Ceiling(Width * Bpp / 64f);
GobStride = 512 * BlockHeight * WidthInGobs;