Repository navigation
fix(libSceAgc): encode index buffer state for the arguments the console encodes - #19194
Conversation
…le encodes sceAgcDcbSetIndexBuffer, sceAgcDcbSetIndexSize and sceAgcDcbSetIndexIndirectArgs threw for arguments that the console oracle in prosper measures as encoded: an odd index buffer address, bits above the two-bit index size and cache policy fields, an attribute address that is not 16-byte aligned and an attribute index above 0xffff. They now write the measured packets. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — no blocking findings
Nothing blocks this; the points below are optional.
What I ran
- Head
6d5410a5eb130d030d1b2a8f67abe8867467335d, basemain. Repository files read through the reader pinned to this head. - Reader command:
python3 repo_read.py search sceAgcDcbSetIndexSize docs/dev/debt
- No build and no tests were run in this review. The checks below are my reading of the code and of the test changes.
Results
| Check | Result | Note |
|---|---|---|
| Code matches the description's table | passed | IndexBuffer.cpp read in full |
| New test expectations | passed | Packet values checked by hand |
Build and ctest |
not run | Author-reported, on another commit |
| Library oracle run | not run | Author-reported |
| No new code comments | passed | The diff adds none |
Findings
Blocking
None.
Non-blocking
core/libs/prx/libSceAgc/DcbDraw/src/IndexBuffer.cpp:28:sceAgcDcbSetIndexSizenow masksindexSizeandcachePolicyto their low bits, so an index size of 4 or a cache policy of 0x44 is accepted without an error. The measured rows and the debt entry atdocs/dev/debt/libSceAgc.md:41describe this behaviour, so this is a note, not a defect.
Not verified
- Build,
ctestand the library oracle run were not run here. The description reports them on commit6c976c948c, which it says differs from the head only in one debt entry. I did not confirm that. - The console measurements and OpenAGC behaviour behind the links in
docs/dev/debt/libSceAgc.mdwere not opened. - Files read:
core/libs/prx/libSceAgc/DcbDraw/src/IndexBuffer.cppin full;core/libs/prx/libSceAgc/tests/DrawSetup.cpplines 44 to 59;core/libs/prx/libSceAgc/tests/Commands.cpponly in its changed hunks, since the file is 1305 lines;docs/dev/debt/libSceAgc.mdandtools/library-oracle/known.tsvthrough the diff. Nothing was excluded. - The rest of the test suite was not read.
To get this to a good state
Nothing is required.
Optional: decide whether an out-of-range index size or cache policy should keep failing. The current masking matches the measured rows.
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
Windows check of head
AI-assisted: yes. |
|
Re-ran the focused tests on the pushed head The overlap with #19338 is only adjacent removals in AI-assisted: yes. |
# Conflicts: # tools/library-oracle/known.tsv
What
sceAgcDcbSetIndexBuffer,sceAgcDcbSetIndexSizeandsceAgcDcbSetIndexIndirectArgsthrew for arguments that prosper's console oracle measures as encoded. They now write the measured packets, and the seven closedknown.tsventries are removed.mainsceAgcDcbSetIndexBuffer0x11111111→0x11111110,1→0sceAgcDcbSetIndexSize(0x11, 0x22)→0x481,(0x22, 0x44)→0x402sceAgcDcbSetIndexIndirectArgs0xffff(0x11111111, 0x22222222)→0x11111110, 0, 0x2222;(1, 2)→0, 0, 2;(0x1111111122222222, 0x44444444)→0x22222220, 0x11111111, 0x4444Not settled by the rows, recorded in
docs/dev/debt/libSceAgc.md:sceAgcDcbSetIndexIndirectArgsare cleared as OpenAGC clears them; the rows set only bits 0 and 1.Tested
Windows 11, WinLibs GCC 15.2.0 (x86_64-ucrt-posix-seh, r7), CMake 4.4.4, Ninja, Release,
BUILD_TESTING=ON. No title or homebrew.ctest -R '^(agc_initialization|agc_commands|agc_draw_setup|agc_predication_tests|guest_indexed_draw|library_oracle)$': 6 of 6 pass onmainc9e6aeb3a9and on this change.python tools/library-oracle/library_oracle.py agcbuild --build build-full:mainreports156 known findings, 0 new, 0 now matching; this change reports149 known findings, 0 new, 0 now matching, and withmain'sknown.tsvit reports the seven cases asNOW MATCHES.python tools/check_conventions.py --base origin/main: 0 errors.The tests ran on commit
6c976c948c; the pushed commit differs from it only in the wording of one debt entry. Not run: the rest of the test suite, Linux, the wideragc_*driver tests on a GPU, andtools/pr_overlap.pyto completion; searches for the three function names found no open pull request.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)