fix(agc): preserve queue state when recording reset markers #21653
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/21653"
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 JJenkx on 2026-11-16T14:12:25Z.
What
sceAgcAcbResetQueuecurrently records a customDISPATCH_RESETNOP, which clears the driver's existing queue state. The bundled SDK records a marker envelope and optional compute-SH defaults, event and cache packets. Record that protocol so marker-only calls preserve shader, context, index and instance state.Use #20512's initialized context backing, preserve low-16-bit flags, explicit/active instance selection and each allocation stage's callback/result behavior. Construct restore packets from the existing public/internal register-default views; retain immutable backing for late title calls.
Contract source: the user-owned PPSA06652 bundled AGC compatibility module, SHA-256
124a637bb17080d4e754d07d73f3320531d3b5c6e384ae2a81c364c44d17abbd, NIDJrtiDtKeS38, wrapper VA0xa70. This is static compatibility-module analysis, not authenticated firmware or new console measurement. No reference bytes or disassembly are attached.The console oracle's instance-2 case remains unsupported. It now uses the standard
NotImplementedpath and stays inknown.tsvas a throw. Retail descriptor bounds/state and a registered caller-code range are still unimplemented; there is no title unblock or FPS claim.Tested
Version-zero context correction: public
427f11c1871b, tested on main2a7f0786d2f4as7ca72be52d5e. The defaults cache now tracks occupied slots independently of the version number. The fresh-process zero-version test verifies populated context/compute defaults, keeps version zero after initializing version13, rejects a third distinct version, and reuses/restores the active zero-version defaults.The matched old-code control
6685cfa456b5passes8/9 and fails onlyagc_queue_reset_zerowithversion-zero context defaults were not built; the change passes9/9 (eight CPU cases and one actual Vulkan case). Both full SDK/relinker builds pass with SPIRV-Tools OFF. Identical new fixture executables in both arms; production differs only in context-occupancy logic. Same RX6650XT/RADV26.2.7, validation1.4.363: one real layer insertion per arm, zero skips/VUIDs. Public own-header syntax and conventions pass; public+main has exactly the qualified tree.The range diagnostic now reports36 reference-derived cases,3 empty null ranges and2 host-validation cases. Matched builds, verbose CTest/JUnit and source/fixture/binary manifests, SHA-256
a51d854384645d0c2c461f6e9c124666cafa7716aa88f4337844e6d5874cde43; downloaded and all36 payloads verified. Prior native and NVIDIA evidence retains its original source pins; no new title, Windows or NVIDIA test is claimed for this head.Arch Linux, AMD RX 6650 XT / RADV Mesa 26.2.7, kernel 7.2.14, Khronos validation 1.4.363 (headers 335). Main
e4caa07950f8, current-main + #20512, and the exact published change are tested through separate frozen provider banks.rebase_verifyon current main.debt_fold --checkstill hits the pre-existing NKWebKit selector addressed by #21531. The separate suspend-status CMake registration in #17742 was manually reviewed; this registration is grouped beside command tests.Paired SDK/test logs, ABI cases, consumer source and source patches, SHA-256
3d2c1343577483ce520a7cafa53916a3c78f361f98ccbcf753a3c665e9cbf40d. Downloaded archive and all payloads verified. No Windows, native title, FPS or fresh console run.Checklist
main; no other open PR implements the same functions (apart from declared prerequisite #20512)NotImplemented_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)Summary by CodeRabbit
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-23T05:19:38Z.
Review: COMMENTED
Reviewed — no blocking findings
The inspected changes implement the described queue reset and context-default handling; no verified blocking defect was found in the source reviewed.
What I ran
427f11c1871b955e4908fafb257c883993b3542f.repo_read.py.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
The review bundle marks 13 changed files as included and one deleted file as excluded. Read the description, commits, manifest, diff,
Acb/src/Control.cpp, andCommand/src/RegisterDefaults.cpp; did not read the other changed files' full head text or run local checks. Therefore those files' behavior is not verified. Console behavior and the author's reported builds/tests were not independently verified.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-30T00:24:54Z.
Review: APPROVED
Reviewed — looks good
No verified defect blocks this change; the prepared description reports successful builds and focused tests, which I did not run independently.
What I ran
Reviewed head
5e2fa00dab8bff2fb552b3bdf664be3cea224c26using the prepared description, commit list, manifest, diff, and targeted source search throughrepo_read.py. No commands or tests were run.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
I reviewed the changed lines from
diff.patchand targeted occurrences in the AGC sources. I did not read full changed files or independently run tests/builds. The deleted debt document has no new text. Thefiles.jsonpath was not available through the review reader, so exclusions beyond the manifest and file listing were not independently checked.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-11-30T00:26:13Z.
Review: COMMENTED
Actionable comments posted: 3
Architecture findings (2)
Advisory architecture findings (2)
26c67de4-03b8-489b-9a59-e0236a2ee70cReviewing files that changed from the base of the PR and between
b3856362f3and5e2fa00dab.tools/library-oracle/known.tsvis excluded by!**/*.tsvcore/libs/prx/libSceAgc/Acb/include/Control.hppcore/libs/prx/libSceAgc/Acb/src/Control.cppcore/libs/prx/libSceAgc/CMakeLists.txtcore/libs/prx/libSceAgc/Command/include/RegisterDefaults.hppcore/libs/prx/libSceAgc/Command/src/RegisterDefaults.cppcore/libs/prx/libSceAgc/DcbState/src/Init.cppcore/libs/prx/libSceAgc/Misc/include/RegisterDefaults.hppcore/libs/prx/libSceAgc/Misc/src/RegisterDefaults.cppcore/libs/prx/libSceAgc/tests/Commands.cppcore/libs/prx/libSceAgc/tests/DefaultCxStateRange.cppcore/libs/prx/libSceAgc/tests/QueueReset.cppdocs/dev/debt/changes/fix-agc-acb-reset-context-20261116.mddocs/dev/debt/changes/fix-agc-default-context-range-reader-20261115.mddocs/dev/debt/changes/fix-agc-init-0090-ignored-argument-20261115.mdIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-12-01T20:08:16Z.
Review: COMMENTED
Reviewed — comments
Nothing blocks this; the points below are optional.
What I ran
Reviewed head
f27e8a5442b8078d29e8239ee0eba7b7685f4523using the prepared description, commits, manifest, diff, and included file snapshots. No build or tests were run. The targetedrepo_read.pylookup returned file content but could not complete its read-log write because the workspace is read-only.Results
Negative control
Not run; no tests were run in this review.
Findings
Blocking
None identified in the inspected changes.
Non-blocking
None.
Sources
Not verified
The author's reported builds, test results, and GPU observations were not independently reproduced. Full repository context lookups were not verified because
repo_read.pycould not write its read log. The deleted debt record was inspected through its diff only. No native title, console, Windows, or NVIDIA behavior was checked.To get this to a good state
Nothing is required. Optional: complete the pinned source-context lookup in a writable review environment before treating this as a formal approval.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-12-01T20:11:00Z.
Review: COMMENTED
🏛️ Architecture findings (3)
Advisory architecture findings (3)
1a4f68a9-b8a1-4308-9872-14d11b3b7f32Reviewing files that changed from the base of the PR and between
5e2fa00dabandf27e8a5442.tools/library-oracle/known.tsvis excluded by!**/*.tsvcore/libs/prx/libSceAgc/CMakeLists.txtcore/libs/prx/libSceAgc/tests/Commands.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-12-01T22:29:41Z.
Review: COMMENTED
🏛️ Architecture findings (3)
Advisory architecture findings (3)
💬 Code review
Actionable comments posted (2)
7306d339-58ab-4441-a031-02464a6c9cf9Reviewing files that changed from the base of the PR and between
f27e8a5442andf4b6225751.tools/library-oracle/known.tsvis excluded by!**/*.tsvcore/libs/prx/libSceAgc/Acb/src/Control.cppcore/libs/prx/libSceAgc/CMakeLists.txtcore/libs/prx/libSceAgc/Command/include/Packet.hppcore/libs/prx/libSceAgc/Command/include/RegisterDefaults.hppcore/libs/prx/libSceAgc/Command/src/Packet.cppcore/libs/prx/libSceAgc/Command/src/RegisterDefaults.cppcore/libs/prx/libSceAgc/tests/Commands.cppcore/libs/prx/libSceAgc/tests/QueueReset.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-12-01T22:52:14Z.
Review: COMMENTED
Actionable comments posted (1)
51f2f984-9843-4a91-bd34-f3444795be4bReviewing files that changed from the base of the PR and between
f4b6225751and6a6c3ee1b3.core/libs/prx/libSceAgc/Acb/src/Control.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-12-01T23:58:55Z.
Review: APPROVED
Reviewed — looks good
The reviewed changes record queue reset packets and cover the documented state and allocation cases; I found no blocking defect.
What I ran
Reviewed head
2177e2bfbaa6053859b164d4d395c985f62430bfagainst the prepared diff and head snapshots. No tests or builds were run. The pinned reader returnedControl.cppbut could not complete further reads because its read log was unavailable in the read-only workspace; I used the supplied snapshots for the remaining changed files.Results
Negative control
Not run; no tests were executed during this review.
Findings
Blocking
None.
Non-blocking
None.
Sources
Not verified
No tests, builds, or fresh console checks were run. The description identifies the compatibility-module analysis as static and documents that instance 2 and retail bounds/state remain unsupported. Read the 11 files listed under
reviewedinfiles.json;files.jsonlists no excluded files.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-12-03T10:34:10Z.
Review: COMMENTED
Reviewed — no blocking findings
The changed code appears internally consistent, but the queue-reset protocol cannot be independently checked against reference bytes in the supplied materials. Nothing blocks this; the points below are optional.
What I ran
Reviewed head
7d468bad4b53dbddac75cb557243a2aaa6928f44againstmain; no merged-preview check was run. I inspected the prepared description, commits, manifest, diff, and changed-file snapshots. The first pinned-reader range succeeded; its next call stopped when the reader could not write its read log in this read-only workspace. I ran no build or tests.Results
Negative control
Not run by this reviewer. The description reports matched old-code controls, but I did not independently verify or run them.
Findings
Blocking
None.
Non-blocking
Control.cpp.Sources
Not verified
No tests, builds, GPU runs, or console oracle replay were performed by this reviewer. The author-reported runs were not independently checked. The prepared material lists no excluded changed files. I read all changed hunks and relevant surrounding code; unchanged portions of large files were not read. The reader provided only
Control.cpplines 1–125 before its read-log write failed.To get this to a good state
Nothing is required. Optional: attach the compatibility-module packet evidence referenced above.
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T12:18:32Z.
Review: COMMENTED
The five new queue reset cases passed on Linux, covering early and initialized state, a zero reset marker, growth, and cache reuse. I also ran the shared Vulkan scalar-buffer test on main and the patched tree on the same llvmpipe device with Vulkan required, shader cache disabled, and validation layer 1.4.369. It passed on both trees. The loader inserted the layer and neither log reported a missing layer or
VUID-entry.AI-assisted: yes.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.