docs(libSceAgcDriver): copy kernel count record is read after the lease finish #13599
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/13599"
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 MarcZX10 on 2026-10-30T19:02:39Z.
What
Documentation correction in
docs/dev/debt/libSceAgcDriver.md, entry "CPU reads behind an address-based build" (second half of the file, audited at upstream/main50843f45d95b60e5772f4396431f9a39b8709d72).The entry said the count record of the copy kernel HLE is a CPU read that does not finish the batches recorded with a lease. The indexed copy branch of
BufferCopy.cppcallsGraphics::FinishLeaseWork()before it reads that record, so the claim is removed. The other reads listed in the entry are unchanged. The entry is also shortened to under 1000 characters.One commit,
docs(libSceAgcDriver): copy kernel count record is read after the lease finish.Overlap:
tools/pr_overlap.pylists open PRs that changedocs/dev/debt/libSceAgcDriver.md(for example #13471, #13474, #13484, #13499, #13373 and others). Each of them changes other entries. None edits the corrected entry (checked against the diff of each). #12840 shows the entry only as unchanged context. Permalinks in the commit body are pinned to the audited SHA.Tested
Docs only. Not built, no runtime tests.
Run on branch
docs/debt-D12-1(head256fc34e23a533ef86aba3fe9e93033a990b29c3, base50843f45d95b60e5772f4396431f9a39b8709d72):python3 tools/check_conventions.py --base upstream/main: "All conventions checks passed."git diff --check upstream/main: clean.python3 tools/env_reference.py --check: fails with the same single line as on a clean upstream/main run (identical output, the known baseline failure ofAPS5_PAD_SPEAKER_FALLBACK_DB).NOT RUN:
tools/pr_precheck.pytest_quality_heuristics: reported as failed for docs-only PRs (harness limitation per RULES.md, the check points at a.mdfile). Raw failure line:/usr/bin/python3: can't open file '/marc/agent-work/D12/work/precheck/head-256fc34e23a5-693d8407/tools/pr_test_quality.py': [Errno 2] No such file or directoryChecklist
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)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-02T04:58:24Z.
Review: COMMENTED
Reviewed — reply answered, the count record is read without a lease finish
oneandonlydean's 2026-10-30 reply shows that the 8-byte copy count record is read without
FinishLeaseWork, and the code at this head confirms it, with one correction to the reply's call list.What I ran
Live head
256fc34e23a533ef86aba3fe9e93033a990b29c3(matches the batch file). Read the comment withgh api, the check rollup withgh pr view --json statusCheckRollup, the base doc diff withgit diff 73f4f7e… 256fc34… -- docs/dev/debt/libSceAgcDriver.md, and the sources withgit -C /marc/AnyPS5 show 256fc34…:<path>. Nothing was built or run.Results
Findings
The reply (2026-10-30T19:32:01Z) asks to restore the count-record read to the entry. The code supports the claim.
FinishLeaseWork()is called incopyBufferonly in the indexed branch (core/libs/prx/libSceAgcDriver/Execution/src/Driver/Memory/BufferCopy.cppline 196-197).copyBufferis called fromDispatch.cppline 162 only whenindirectArguments == 0.73f4f7e) named "the count record of the copy kernel HLE" in the CPU-reads entry; doc line 181 at head no longer does.Two corrections:
FinishLeaseWorkare line 197 andIndirectDispatch.cpp.VulkanDevice.cppline 5182 also calls it, in the indirect-argument read, not on thecopyBufferpath.Sources
github.com/boykopovar/AnyPS5@256fc34e23/core/libs/prx/libSceAgcDriver/Execution/src/Driver/Memory/BufferCopy.cpp (L196-L229)github.com/boykopovar/AnyPS5@256fc34e23/core/libs/prx/libSceAgcDriver/Execution/src/Driver/Dispatch/Dispatch.cpp (L162)github.com/boykopovar/AnyPS5@256fc34e23/core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp (L5176-L5182)github.com/boykopovar/AnyPS5@256fc34e23/docs/dev/debt/libSceAgcDriver.md (L181)Not verified
Imported from boykopovar/AnyPS5. Originally posted by gabichuuuuu on 2026-11-10T17:48:18Z.
Review: COMMENTED
Read
5790189039againstmain.Correctness. The entry now lists only what is still unguarded, and the code agrees.
Graphics::FinishLeaseWorkis called before the indirect dispatch argument read (IndirectDispatch.cpp:77) and also before the indexed copy-record read (BufferCopy.cpp:197), so dropping the copy-kernel clause is correct. The reads without it are stillPm4::ReadDrawCountandPm4::ReadDrawArgumentsatDraw.cpp:537-539and:1125-1127, and theawaitsTitleandorderReleasedchecks atSubmission.cpp:255and:654. The names the entry cites exist (Pm4.cpp:941and:951). No other claim in the entry changed.Not run here; this is from reading the code.
AI-assisted: yes.
Pull request closed