AGC: 8 and 16 bpp SW_64KB_Z_X mip tails use Navi10's limits; addrlib halves them on gfx1013 (dsMipmapHtileFix) #1590
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by kr4y4 on 2026-10-08T13:54:37Z.
ComputeMipLayoutgives 8 and 16 bppSW_64KB_Z_Xsurfaces the same mip-tail limits as Navi10. AMD's addrlib uses smaller limits for every GFX10 chip except Navi10, including gfx1013. On those chips, the mipmapped Z_X layouts AnyPS5 computes are too small and every level is shifted.addrlib (Mesa main,
src/amd/addrlib/src/gfx10/gfx10addrlib.cpp):m_settings.dsMipmapHtileFix = 1(L1003), and onlyASICREV_IS_NAVI10_Pclears it (L1008-1010).Block256_2d[index] / Block256_2d[2](L3923-3926).AnyPS5:
GetMipTailLayout(Graphics/src/TextureTiling.cpp) uses the unshrunk thin 64 KiB tail limits forkZ64KBXat every element size, which is the Navi10 behaviour.Measured by compiling addrlib unmodified (MinGW GCC 15.2), calling
Addr2ComputeSurfaceInfo/Addr2ComputeSurfaceAddrFromCoord, and comparing with AnyPS5'sTextureTiling.cpp. The config is FAMILY_NV, GB_ADDR_CONFIG 0x00100044 (16 pipes, 256 B interleave), pipeBankXor 0.SW_64KB_Z_X8 bpp 256×256, 9 mipsAnother case: 16 bpp 128×128, full mip chain, has mip 0 at 0x10000 (addrlib, gfx1013) against 0x8000 (AnyPS5).
The same comparison over linear, 256B, 4KB and 64KB S/D/S_T/D_T/Z_X/S_X/D_X/R_X, 8–128 bpp, BC1/BC7, and assorted sizes, mip counts and arrays matches bit for bit for 2D, apart from this case. With addrlib set to Navi10, the remaining 2D results all match. 3D
SW_64KB_D_Xand linear 3D will be reported separately.Effect if the PS5 behaves like addrlib's gfx1013:
Z_Xtextures are read from the wrong offsets.Not established: that the PS5 GPU uses the same setting. Everything here rests on addrlib's per-chip flag, not on a PS5 measurement.
Possible fix, if the flag applies: in
GetMipTailLayout, forkZ64KBXwith element index 0 or 1, halvewidthLimit, and for index 0 also halveheightLimit. Tail slot positions don't change. With that change, the comparison has no mismatches. No existing test covers it: the Z_X tests use 32 and 64 bpp.Found with AI assistance (Claude Code); the numbers above come from the compiled addrlib comparison described.