docs(agc): name what shadPS4, fpPS4 and addrlib do for PS4 layered surfaces and display buffers #13484
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/13484"
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 xXPBSXx on 2026-10-30T16:41:12Z.
What
Two existing debt entries in
docs/dev/debt/libSceAgcDriver.mdget one sentence each about how other PS4 implementations differ from this code. The entries then read:The new sentence in the first entry only records the comparison: the rotation of the bank per array layer has been implemented here since #12998, and it records that AMD's address library and shadPS4 XOR the rotation into the bank, where fpPS4 adds it. The second says shadPS4 rounds the width of a tiled display buffer up to 128 itself while
DisplayBufferSizerequires the pitch to be a multiple of 128 already.Changed:
docs/dev/debt/libSceAgcDriver.md, two existing entries. No code change.Method: the three were read at the linked commits; only their behaviour is described, no code was taken over. shadPS4
tiling.compL322-L335 andimage_info.cppL54; fpPS4ps4_tiling.pasL2887-L2912; AMD addrlibegbaddrlib.cppL3002-L3049. In fpPS4,xorand+have the same precedence in Pascal, sobank xor bank_swizzle + slice_rotationis evaluated left to right. The statements about this code were read inGcnLayerBankXorandTextureDetiler::layerBankXor(rotation, PRT modes get none) and inDisplayBufferSize(DisplayBuffer.cpp).sceVideoOutRegisterBufferscurrently rejects a tiled PS4 buffer, so the display sentence is about that function, not about a title. None of this is measured on a console.Overlap
Open PRs that change
docs/dev/debt/libSceAgcDriver.md(file sets fromgit diff --name-onlyagainst each PR head's merge base, all 1422 open pull requests as of 2026-10-30 12:29 UTC, main42d009f5f3; the 49 pull requests opened up to 13:25 UTC (1465 open, mainda026c7065) change other files, and the pairs below were measured again at that time): 131 touch the file or are ours. Of the pull requests opened since 12:29 UTC, only #13373 (a new "Adaptive staging" entry) touches the file; it merges with and without this commit (checked at mained1e0ed08f). Measured again on 2026-10-30 at 16:15 UTC against main9304896d89(1548 open pull requests): of the 46 pull requests opened since 14:15 UTC, only #13471 touches the file, and it merges with and without this commit; the five pairs below give the same result as before. Measured once more on 2026-10-30 at 16:56 UTC against main556547da71(1564 open pull requests, the head of each fetched fresh): 134 touch the file or are ours; the only ones that conflict with this commit but not with main are the five below, and #13373, #13471, #13474 and our other PRs (#12797, #12765, #12742) merge with and without it; #13491 and #13492, opened after the fetch, do not touch the file. Five give a new conflict with this change, all on the same lines: #9674 and #9891 rewrite the thick and layered surfaces entry, #9672 and #9895 the render targets and display buffers entry, and #9892 adds an entry next to them. Whichever of these merges second needs a rebase of the added sentence; the texts do not contradict each other. The others give the same merge result with and without this commit. Our other PRs (#12797, #12765, #12742) have no conflict with it.Tested
Documentation only.
tools/check_conventions.py --base upstream/mainpasses; both entries stay under 1000 characters; based onmainda026c7065, and it merges withmain556547da71without a conflict (checked 2026-10-30 16:56 UTC). Not built, not run.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)AI-assisted (Claude Code).
🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-30T16:44:57Z.
Review: APPROVED
Reviewed — looks good
The documentation-only changes match the pinned comparison sources and the implementation at the reviewed head.
What I ran
Reviewed head
cd67746df82be1d967dd3aed81f349b50b48cb1cagainst base556547da71c5e25b742f17b1ed9b27253b6e9d4d; the read-only merge preview onto currentmainat that base was clean. Environment: Linux x86_64, Python 3.11.2, GCC 12.2.0.I also inspected the cited external source lines at their pinned commits and the corresponding AnyPS5 implementation at the reviewed head.
Results
DisplayBufferSizerequires a pitch divisible by 128.Unedited output
git diff --checkproduced no output. The precheck output was:The failed helper emitted:
Findings
Blocking
None.
Non-blocking
2026-10-30 17:15 UTCagainst main9304896d89. At the live snapshot for this review, it was 16:42 UTC and main was556547da71c5e25b742f17b1ed9b27253b6e9d4d. Please replace the postdated scan and olderTestedbase reference with evidence from an actual current-main snapshot.Sources
tiling.compand shadPS4image_info.cpp.ps4_tiling.pasand AMD addrlibegbaddrlib.cpp.Not verified