From 34d19f381cd496ec5e6d4fb13b45d47c141b7a63 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Sat, 25 Apr 2020 10:40:20 -0300 Subject: Fix texture level offset/size calculation when sparse tile width is > 1 (#1142) * Fix texture level offset/size calculation when sparse tile width is > 1 * Sparse tile width affects layer size alignment aswell --- Ryujinx.Graphics.Gpu/Image/Texture.cs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'Ryujinx.Graphics.Gpu/Image') diff --git a/Ryujinx.Graphics.Gpu/Image/Texture.cs b/Ryujinx.Graphics.Gpu/Image/Texture.cs index 957c3465..d02c3665 100644 --- a/Ryujinx.Graphics.Gpu/Image/Texture.cs +++ b/Ryujinx.Graphics.Gpu/Image/Texture.cs @@ -870,13 +870,6 @@ namespace Ryujinx.Graphics.Gpu.Image { int depth = Math.Max(1, info.GetDepth() >> level); - (int gobBlocksInY, int gobBlocksInZ) = SizeCalculator.GetMipGobBlockSizes( - height, - depth, - info.FormatInfo.BlockHeight, - info.GobBlocksInY, - info.GobBlocksInZ); - return SizeCalculator.GetBlockLinearAlignedSize( width, height, @@ -884,8 +877,8 @@ namespace Ryujinx.Graphics.Gpu.Image info.FormatInfo.BlockWidth, info.FormatInfo.BlockHeight, info.FormatInfo.BytesPerPixel, - gobBlocksInY, - gobBlocksInZ, + info.GobBlocksInY, + info.GobBlocksInZ, info.GobBlocksInTileX); } } -- cgit v1.2.3