From 0381a092274488277670b6b2b9033cefd2b33718 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Fri, 11 May 2018 20:20:44 -0300 Subject: [PATCH] Fix WidthInGobs on the GPU --- Ryujinx.Core/Gpu/BlockLinearSwizzle.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Ryujinx.Core/Gpu/BlockLinearSwizzle.cs b/Ryujinx.Core/Gpu/BlockLinearSwizzle.cs index eb41ea3001..1b60443088 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;