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:
parent
bcc5b0d21e
commit
34d19f381c
3 changed files with 81 additions and 37 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue