fix(agc): read initialized default context register ranges #20512
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/20512"
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-15T07:55:06Z.
What
An empty
sceAgcGetDefaultCxStateFlat(out, 4, 4, 0)request currently copies four bytes because the first register index is interpreted as a byte size. Correct the declaration and implementation to(destination, first, last, instance)and read the requested register interval from initialized sparse CX data.Assemble public then internal CX records through the shared register-default views, keep the two version instances and their reuse/limit behavior, fill holes, and preserve the observed terminal-zero/untouched-tail behavior. Empty ranges and uninitialized instances leave output untouched. The source is the user-owned PPSA06652 bundled compatibility module; full platform initialization and host validation differences remain in debt.
Tested
Version-zero context correction: public
001429db701e, qualified on main9e265ca0a454as1c5fa017d85b. An explicit occupied-slot bit separates version zero from an empty cache entry. The fresh-process regression checks all sparse version-zero context values and untouched output guards, preserves them after initializing a second version, rejects a third distinct version, and reuses both cached versions.Matched control
27844b9d0b29:4 pass/1 expected failure,agc_initialization_zero(version-zero defaults were not constructed); change:5/5 pass. Both full SDK/relinker builds pass with SPIRV-Tools OFF. Each arm uses the same new fixture executables and differs only in the production context-occupancy logic. Same RX 6650 XT/RADV Mesa26.2.7 and validation1.4.363: one real validation insertion per arm, zero skips/VUIDs. Public-header syntax checks and conventions pass; each public+main tree exactly matches the qualified integration.Both branches also merge cleanly with newer main
2a7f0786d2f4; AGC/driver sources are unchanged since the tested main.The range-test diagnostic now reports36 reference-derived cases,3 empty null ranges and2 host-validation cases. Matched builds, verbose CTest/JUnit, exact source/fixture and binary manifests, SHA-256
d9bd3bb25237fb45bee98e1d1f70aa4fada7492e1cc04bd8c28b77cb1fef8de4(downloaded and all65 payloads verified). No fresh native-title, Windows or NVIDIA result is claimed for these heads; previous evidence keeps its original pins.Arch Linux; main
7079f1ae5e61, identical-fixture control609e301b7695, changef31fbaea0fc6. Merged #20434 is already included through main; no pending dependency or merge commits.93e73ccc8b14; that later tree was not executed.Paired SDK/test logs, direct ABI replay, reference provenance and source patches, SHA-256
73520b56941c8622c2899685ad55912d8d0cc3ef82e9c5d7c24f985531002a25. Downloaded archive and all 54 members verified.Contributor-reported Windows NVIDIA validation (not rerun here): head
f31fbaea0fmerged onto mainb885c40a67asc506117d26, RTX 4080 driver 32.0.16.2101, WinLibs GCC 15.2 Release. Baseline 1843 GPU-set passes versus 1844 with the change,0 failures/0 VUID lines,20 skipped on each; both changed tests pass. One upload-cache fixture was not built on either arm because of the main Windowssetenvissue handled by #19899. Five 30-second homebrew rendering checks are reported with similar frame rates; those single runs are not a performance comparison. No commercial title was checked.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)Current-main refresh:
825ede7ed3b2rebases the same four commits onto maine4caa07950f8;rebase_verifyconfirms every added/deleted line, file mode, author and commit is preserved. Fresh Linux full-SDK/relinker fixture buildba2089832a9fhas exactly this production tree. The sparse-range fixture (39 reference-derived cases plus two host-policy cases), initialization, graphics and real RX 6650 XT alpha gate pass; the latter confirms validation insertion, physical device selection and zero skips/VUIDs. New queue-reset negative fixtures still fail on this prerequisite as expected; #21653 implements that separate correction and explicitly depends on this PR. Current-main build/test evidence, SHA-2563d2c1343577483ce520a7cafa53916a3c78f361f98ccbcf753a3c665e9cbf40d(79 downloaded payloads verified). Earlier Windows evidence above remains tied to its recorded head; no new Windows run.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-15T08:32:18Z.
Review: APPROVED
Reviewed — looks good
The changed implementation and all files listed as reviewed were inspected at head
f31fbaea0fc6cefd9c63280481bcdc70080558c9; no concrete defect was found in the requested range handling.What I ran
No build or test commands were run. I inspected the prepared diff and targeted source with
repo_read.py.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
Builds, CTest gates, ABI replay, GPU gate, full platform initialization, Trinity mode, retail firmware behavior, and console behavior were not independently run or confirmed. The deleted debt fragment has no head text to read.
files.jsonwas not available through the review reader; the manifest lists nine included changed files and one deletion.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-23T05:22:07Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the points below are optional.
What I ran
Reviewed head
001429db701e780d75b5b607824174ea48825f14usingrepo_read.pyto inspect the prepared diff and repository source. No build or test commands were run; reported test results are author supplied.Results
Findings
Blocking
None.
Non-blocking
core/libs/prx/libSceAgc/Command/src/RegisterDefaults.cpp:159-163). The existing tests assert this terminal-zero behavior, and the change description says it is intended. Since that behavior is based on the bundled compatibility module and the full platform initialization path is not reproduced, confirming it against another authoritative reference would strengthen confidence.Not verified
manifest.json:core/libs/prx/libSceAgc/CMakeLists.txt,core/libs/prx/libSceAgc/Command/include/RegisterDefaults.hpp,core/libs/prx/libSceAgc/Command/src/RegisterDefaults.cpp,core/libs/prx/libSceAgc/DcbState/src/Init.cpp,core/libs/prx/libSceAgc/Misc/include/RegisterDefaults.hpp,core/libs/prx/libSceAgc/Misc/src/RegisterDefaults.cpp,core/libs/prx/libSceAgc/tests/Commands.cpp,core/libs/prx/libSceAgc/tests/DefaultCxStateRange.cpp, anddocs/dev/debt/changes/fix-agc-default-context-range-reader-20261115.md.files.jsonwas not available through the reader.To get this to a good state
Nothing is required. Optional: add independent authoritative evidence for terminal-zero behavior when available.