AnyPS5/core/libs
Gerard L. b6a9530723 fix(agc): use gfx1013's smaller mip tail limits for 8 and 16 bpp SW_64KB_Z_X
The smallest mip levels of a tiled surface are packed together into one
block, the mip tail. A size limit decides which level is the first to
go into the tail.

For SW_64KB_Z_X, AnyPS5 used the same limit as the other 64 KiB modes.
In addrlib, that is only the case on Navi10. On every other GFX10 chip,
including the PS5's gfx1013, addrlib halves the limit for 8 and 16 bpp
Z_X surfaces: the width at both sizes, and also the height at 8 bpp.
The setting behind this is dsMipmapHtileFix (see HwlConvertChipFamily
and ComputeSurfaceInfoMacroTiled in gfx10addrlib.cpp).

With the larger limit, the tail started too early. For example, a
256x256 R8 surface with 9 levels started its tail at mip 1 instead of
mip 2, and took 131072 bytes instead of 196608. Every level was then
read and written back at the wrong offset.

GetMipTailLayout now halves the limits the same way. Only the level
where the tail starts changes; the tail slot positions stay the same.
This follows addrlib's setting for gfx1013. The console's own layout
has not been measured.

Fixes #1590

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 20:06:51 +02:00
..
nid fix(nid): reject libraries that define symbol versions 2026-10-08 03:04:07 +00:00
prx fix(agc): use gfx1013's smaller mip tail limits for 8 and 16 bpp SW_64KB_Z_X 2026-10-09 20:06:51 +02:00
tests Merge pull request #1711 from SleglJan/feat/libkernel-socketpair 2026-10-09 22:55:53 +13:00
CMakeLists.txt test(libs): load every patched library with its imports bound 2026-10-09 09:05:19 +02:00
HitLog.hpp style(prx): apply CONVENTIONS.md to misc PRX additions 2026-09-29 04:24:39 +03:00
SceShaders.hpp feat(libs): libSce types impl + shaders refactor 2026-09-08 10:20:57 +03:00
SceTypes.hpp feat(http): accept sceHttpSetAuthInfoCallback 2026-10-08 20:42:24 +02:00