aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2018-05-11 20:20:44 -0300
committergdkchan <gab.dark.100@gmail.com>2018-05-11 20:20:44 -0300
commit0381a092274488277670b6b2b9033cefd2b33718 (patch)
treee152032329155d067d48006cf436fd64e4bffead
parentfee4b0eb8afb52901bb399b7b151cb907c5680f3 (diff)
Fix WidthInGobs on the GPU
-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;