Repository navigation
fix(agc): return 0 for out-of-range sceAgcInit without table lookup - #5163
Conversation
MarcZX10
left a comment
There was a problem hiding this comment.
I checked the call path and the GetRegisterDefaults results are used only to initialize the cached table objects; sceAgcInit does not store a selected version or return that table. The two reported firmware runs therefore support returning success for these pointer-shaped calls, while they do not establish which table firmware selects. The PR description and debt entry preserve that distinction, so I found no blocking issue in this diff.
|
Title runs on Windows with AMD, since the description says the titles were not rerun. Setup: Windows 11 (26300), Radeon 860M (RDNA 3.5, driver 32.0.13058.8001), WinLibs GCC 15.2.0, Release.
The next stop of PPSA99011 with this PR is AI-assisted: yes (Claude Code) |
|
Thanks for the Windows/AMD follow-up. This adds useful title-level evidence: PPSA99011 gets past device creation and reaches the later |
* perf(agc): fast-skip pure PM4 NOP packets during queue execution (cherry picked from commit 139bf04) Ported from upstream PR boykopovar#5481 * fix(agc): copy a shader, context or user config register to memory with COPY_DATA A dispatch now leaves its initiator and, for DISPATCH_DIRECT, its group counts in the shader registers, where the CP puts them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 5e36c08) Ported from upstream PR boykopovar#5477 * fix(agc): accept reported vertex stage state (cherry picked from commit 632331d) Ported from upstream PR boykopovar#4341 * fix(agc): initialize stencil control and reference masks (cherry picked from commit 85e0d98bba896002539365bb29a7a39a8e43f501) (cherry picked from commit 13dca48) Ported from upstream PR boykopovar#5347 * fix(agc): accept inactive vertex point size on non-point draws (cherry picked from commit d4b59ce) Ported from upstream PR boykopovar#4715 * fix(agc): treat type-0 texture descriptors as null (cherry picked from commit 7e1e1ce) Ported from upstream PR boykopovar#4779 * fix(agc): fall back out-of-range sceAgcInit versions to table 13 Pointer-shaped NID kW3GLb7QfPg calls from public homebrew succeed on console; returning an error left those titles failing init after boykopovar#4835. (cherry picked from commit 939f784) Ported from upstream PR boykopovar#5163 (debt-doc hunk dropped: file absent on main) * fix(agc): clamp sceAgcInit versions above 13 inline (cherry picked from commit 0cc5102) Ported from upstream PR boykopovar#5163 (second commit) * metal: adapt the shared AGC driver slice to the Metal execution loop - skip pure PM4 NOP packets in the Metal packet loop (upstream PR boykopovar#5481) - note the dispatch registers after direct and indirect Metal dispatch so COPY_DATA from a shader register works there (upstream PR boykopovar#5477) - NullImageDescriptor delegates to IsNullTextureResource (upstream PR boykopovar#4779) - tests: pm4 compute replay reads the dispatch initiator and group counts back through COPY_DATA; metal utility tests cover a type-0 image descriptor Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DgW4n3qYgi5jAAohEmXRQj --------- Co-authored-by: Kikoarl <7354010+Kikoarl@users.noreply.github.com> Co-authored-by: LeandroLP23 <leandroplacidi@gmail.com> Co-authored-by: MarcZX100 <marczxrr@gmail.com> Co-authored-by: MathiasDevelopes <25400788+MathiasDevelopes@users.noreply.github.com> Co-authored-by: lorkydey <57268822+Lorkydey@users.noreply.github.com> Co-authored-by: mazen <mazenshaar@hotmail.com> Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
|
The console measurement is in #4808 now (#4808 (comment)): |
MarcZX10
left a comment
There was a problem hiding this comment.
The PS5 probe linked from #4808 changes the evidence for this fallback: sceAgcInit(&buf, 8) returns 0 and leaves the buffer unchanged, while every tested scalar value >=2 returns 0x8A6C0004. Selecting table 13 for a pointer-shaped argument is therefore unsupported. Please make the pointer-shaped path return success without a register-default lookup, cite the probe in this PR and the debt entry, and document that scalar 2–13 still differ from the current AnyPS5 behavior. The probe does not establish that table 13 is selected or that scalar 2–13 should use those tables.
|
Windows test of #5163: Windows 10 (19045), MinGW-w64 GCC 15.2, Release, AI-assisted (Claude Code). |
|
Thanks for the controlled Windows run: |
Pointer-shaped NID kW3GLb7QfPg calls from public homebrew succeed on console; returning an error left those titles failing init after boykopovar#4835.
Pointer-shaped calls match the boykopovar#4808 console probe (success, no writes); selecting table 13 for those values was unsupported.
0cc5102 to
eb1b9ec
Compare
|
Linux x86-64 (WSL2 Ubuntu 24.04, GCC 13.3.0), Release,
AI-assisted: yes |
|
Closing temporarily to free the first-contributor open-PR slot so I can open a RetroArch Windows bring-up fix (select on regular files + AGC |
|
Reopened — keeping this PR open to wait for merge. The RetroArch select + |
|
Re the overlap bot vs #5845: Depends on: none.
|
|
Triple-check follow-up (trial merges on current
|
|
Windows 10 evidence for this PR: merge 0d69a9e (this branch onto main 066b58f), MinGW-w64, 0 build warnings.
|
|
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.
|
|
Re the overlap bot vs #5889: Depends on: none — this is a competing change to the same exports, not a base we build on.
Same files because both touch Prefer this PR for the out-of-range path reviewers already asked for; #5889 can close or retarget if maintainers want the two-arg signature separately (still needs the |
|
Checked the diff against the #4808 console measurement ( |
What
Pointer-shaped / out-of-range
sceAgcInitvalues (>=14) return 0 without a register-default lookup. Versions 0–13 still select their tables.sceAgcInit_0090checks the state pointer and then callssceAgcInit, as OpenAGC does.#4808 console probe (firmware 13.60):
sceAgcInit(&buf, 8)(NIDkW3GLb7QfPg) returns 0 and writes nothing. The probe does not establish that table 13 is selected. Scalar versions 2–13 return0x8A6C0004on that console but still return 0 here (documented in debt; not changed by this PR).Tested
BUILD_TESTING=ONctest --test-dir build-win -R 'agc_initialization|agc_commands' --output-on-failure— 2/2 passedpython -I tools/check_conventions.py --base upstream/main --head HEAD— passedChecklist
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)