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
This commit is contained in:
gdkchan 2020-04-25 10:40:20 -03:00 committed by GitHub
parent bcc5b0d21e
commit 34d19f381c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 81 additions and 37 deletions

View file

@ -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);
}
}