fix(agc): accept a linear 2D texture whose DEPTH holds its default pitch #4245
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4245"
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 reyani-dev on 2026-10-12T02:14:46Z.
What
On GFX10.3 the DEPTH field (word 4) of a 1D or 2D non-array T# with linear tiling carries the row pitch minus one. Mesa's
ac_descriptors.csets it that way for custom pitches: "GFX10.3+ can set a custom pitch for 1D and 2D non-array, but it must be a multiple of 256B".DecodeTextureResourcerejects every 2D descriptor with a nonzero DEPTH, so these are refused.This accepts the case titles use and nothing more. A 2D linear, single-level, uncompressed T# whose DEPTH + 1 equals its default pitch (the width aligned to 256 bytes, which is the layout
ComputeLinearMipLayoutalready uses) decodes as that 2D texture. Any other pitch, more mip levels, a block-compressed format or a nonzero base array still throws, with "custom pitch other than its default pitch". Tiled 2D descriptors with a nonzero DEPTH keep the old error.Titles: Jelly5 (PPSA99505), Emby5 (PPSA99515) and Nuvio PS5 (PPSA99997) stop here on
maind371ed307, now that #3496 and #3807 are in:The rejected descriptors (from a local debug print) are linear RGBA8 textures whose DEPTH is exactly the 256-byte-aligned pitch:
72 RGBA8 texels make 288 bytes, which aligns to 512 bytes = 128 texels; 8 texels align to 256 bytes = 64 texels. With this change all three run the full 60 s with no error in either log.
Tested
Windows 11 (26200), RTX 4070, WinLibs GCC 15.2.0 r7, Release,
maind371ed307:agc_driver_graphics(RunGuestTextureResourceTests):depthOrLastArray == 0.GuestTextureResource.cppand pass with this change.ctest -E "^agc_|video_out": 488/488.VK_LOADER_DRIVERS_DISABLE=*dzn*, #3255): 432/433.agc_driver_prepared_shaders_deferredexited0xc0000374once under-j4and passed 5/5 on its own; it doesn't decode textures.tools/check_conventions.pyandtools/pr_overlap.py: clean.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by reyani-dev on 2026-10-12T02:42:57Z.
A fourth title: EVO Player (PPSA99039) stops on the same check on
maind371ed30in a second full catalog run (what(): AGC graphics: guest 2D texture descriptor has a nonzero depth or base array). In my first run it hadn't reached that draw within the 60 s.Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-12T07:42:37Z.
EVO Player (PPSA99039 v0.10.0), before and after, on Windows 11 (26300), Radeon 860M, WinLibs GCC 15.2.0 r7, Release.
eboot.binandsce_module/libc.prxare unwrapped, and each run lasts 60 s.mainfedcb3c81: stops at its first presentation withAGC graphics: guest 2D texture descriptor has a nonzero depth or base array.6b2432875) merged onto thatmain: the title runs the full 60 s in 2 of 2 runs, with no throw. Its own status line reachesagc health frame=600 … ring_fail=0 tex_fail=0 … presents=600. The only error it logs is its ownopen('/data/evoplayer/themes') failed (errno=2), for an optional theme directory.agc_driver_graphicspasses on the same build.So the fix also holds on AMD's Windows driver, alongside your RTX 4070 runs.