Repository navigation
fix(agc): a 0xffffffff register offset names no register - #16054
oneandonlydean merged 1 commit into
Conversation
|
Windows check of head Setup: Windows 11 Enterprise 22621, WinLibs GCC 15.2 UCRT, Release, with
AI-assisted: yes. |
|
Windows run of the full selection, including its GPU tests: head
No title was run. Edited: these tests create no Vulkan device, so "pass on the GPU" was wrong for them, and the GPU tests are only a regression check here. AI-assisted: yes. Claude Code ran the builds and tests and drafted this comment; a separate review agent checked it. The numbers are from the runs on this machine. |
✅ NVIDIA GPU test: passedPR head
Unstable on main (2, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (3, not counted against this PR)Passed on retry (1, failed in the parallel run, passed when re-run with a 360 s timeout; not counted against this PR)Validation IDs already present on main (9 IDs in 588 tests)Skipped (52)ReproduceAutomated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
|
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.
|
Reviewed a 0xffffffff register offset names no register — no blocking findingsThe change is correct for the four call sites it touches, but What I ranHead reviewed: No build or test was run here; this review is from reading the code only. The test results in the description are the author's; the Windows runs (JJenkx, adam25136) and the NVIDIA CI run (TechLevelZero) in the thread are theirs. I reproduced none of them. Results
FindingsBlockingNone. Non-blocking
Not verified
To get this to a good stateNothing is required. Worth deciding: the AI-assisted: yes (code read with Claude Code; no build or test run). |
b8aa165 to
d9ecc0d
Compare
|
Thanks — all four points were useful, and 1 and 2 were real gaps rather than style. 1. 2. Debt row refreshed: 3. Scope corrected in the description: the packets that carry a byte offset are 4. Not covered, deliberately: I tried adding a sentinel-first list and an all-sentinel list to
|
5268741 to
5ff533d
Compare
|
Rebased onto current Verified on the rebased head: |
|
NVIDIA Linux run with the Khronos validation layer of the PM4 register-offset sentinel change, on the tests from the Tested section. Setup: Arch Linux, kernel 7.3.4, GCC 16.2.1, Release. NVIDIA GeForce RTX 4090 (vendor
Every device test selected the RTX 4090 ( The other tests in the set are host-only and create no Vulkan instance. No new AI-assisted: yes (Claude Code) |
e42d541 to
1688b10
Compare
|
Thanks @domx4q — 34/34 on both sides, the layer inserted in 3 tests on each, and zero Two housekeeping changes on the new head
|
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — no blocking findings
Head 1688b109186059ffdc464d2404e61009f5291af6 shows no verified defect in the sentinel handling, but the author's test run cites another commit, so no formal approval is given. Nothing blocks this; the points below are optional.
What I ran
- Head reviewed:
1688b109186059ffdc464d2404e61009f5291af6, basemain. - Read the description, commit list, manifest and diff from the review folder.
- Read the head of the callers in
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp(lines 578–608) and the otherIndirectRegistersValidcall sites by search. - No build and no tests were run.
Results
| Check | Result | Note |
|---|---|---|
| Diff read (3 files) | passed | Full diff read |
| Full text of changed files | not run | Only the changed hunks and search hits were read |
Unit tests (agc_driver_pm4, agc_driver_graphics) |
not run | Author reports a run on d23df92b38, not on this head |
check_conventions.py |
not run | Author reports a pass on d23df92b38 |
Findings
Blocking
None.
Non-blocking
docs/dev/debt/changes/fix-agc-register-offset-sentinel.md:1: the checklist says no.mdnotes were added and that the change is generic, not specific to one title. The new file names a title ID and a game (PPSA23566, UFC 6). If this file is the expected technical-debt record format, the checklist should say so; otherwise the title reference could be dropped.core/libs/prx/libSceAgcDriver/Execution/src/Pm4.cpp:71(the direct0x69/0x76/0x79path): a direct packet whose offset is0xffffffffnow writes nothing, including its value dwords. The description's "the remaining entries still take effect" reads as referring to indirect list entries. The code and the new test agree on the whole-packet skip; the description could say so to avoid doubt.
Not verified
- The author's tests and convention check ran on
d23df92b38, not on head1688b109186059ffdc464d2404e61009f5291af6. They were not re-run here. - The hardware claims in the debt note (how the console's graphics PFP reads a register list written after submission, and the
PPSA23566behaviour) were not checked. They depend on hardware and traces that were not available here. Submission.cppwas checked only at its call toIndirectRegistersValid(line 434), not in full.- The full text of
Pm4.cppandtests/Pm4.cppwas not read; the review covers the changed hunks and the call sites found by search. registerOffsetfor0x7a(SET_UCONFIG_REG_INDEX) is still rejected by the bank check beforeregisterOffsetis reached; this was read from the diff context, not from an executed test.
To get this to a good state
Nothing is required.
Optional, before merge:
- Confirm the title reference and the "no notes added" checklist item in the debt note.
- Re-run
agc_driver_pm4andagc_driver_graphicson the current head1688b109186059ffdc464d2404e61009f5291af6and record the output in the PR, since the cited run is on another commit.
|
@stuart-russell on current main this head fails agc_driver_prepared_shaders, _indirect, _uncached and _debug, the same way on a rerun: "prepared invocation rebuilt an unchanged materialized result". The other 19 PRs in that batch pass these tests, and base plus this PR alone fails them, so the change in Pm4.cpp seems to make an unchanged prepared invocation get rebuilt (the test takes 17 s instead of 1 s). Could you check how the 0xffffffff offset change interacts with the prepared invocation cache? I have held the PR out of the merge trains until these four tests pass with it. |
A SET_*_REG packet or indirect register list with a 0xffffffff offset is accepted by the hardware and the rest of the packet still takes effect. The driver threw and lost the submission. registerOffset now reports the sentinel through an optional, and the validation range check, the direct write loop, the indirect pair loop and the indirect trace skip that entry.
1688b10 to
14aba68
Compare
|
You were right, and the cause was mine: In Fix in Verified locally on this head ( Thanks for holding it out of the merge trains rather than merging it; that would have been a nasty one to bisect later. |
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
Nothing blocks this change; the inspected implementation and regression coverage support merging.
What I ran
- Reviewed head
14aba68c24b9a2f40af7cc06eaab0341eb6a8782against basemainusing the prepared diff andrepo_read.py. - No tests or builds were run.
Results
| Check | Result | Note |
|---|---|---|
| Changed code review | passed | All changed files and added lines reviewed |
| Tests and build | not run | No commands run |
Findings
Blocking
None.
Non-blocking
None.
Not verified
- Runtime behavior, tests, build, and hardware behavior were not verified.
- Read:
core/libs/prx/libSceAgcDriver/Execution/src/Pm4.cpp,core/libs/prx/libSceAgcDriver/tests/Pm4.cpp, anddocs/dev/debt/changes/fix-agc-register-offset-sentinel.md; all are listed as reviewed in the manifest. No changed files were excluded.
To get this to a good state
Nothing is required.
|
Tested head Setup: Windows 11 Pro 10.0.26200, Ryzen 7 9800X3D, WinLibs GCC 15.2.0 r7, Release,
Whole batch: the full This is one combined tree, not a run of this PR alone. AI-assisted: yes (Claude Code) |
What
A
SET_*_REG/SET_*_REG_INDIRECTpacket whose register offset is0xffffffffnames no register; the hardware accepts the packet and the remaining entries still take effect. The driver threw (indirect register sentinel semantics are not implemented), which aborted the whole submission.registerOffsetnow returns an empty optional for0xffffffff, and the four call sites (validation range check, the directSET_*_REGwrite loop, the indirect pair loop and the indirect trace) skip that entry instead of writing it.APS5_PM4_RINGdumps of such packets still list the other offsets.IndirectRegistersValidstill classifies a list holding the sentinel as invalid, so the re-read-at-execution path and the released reports that depend on it are unchanged; the sentinel entry is skipped when either copy is written, so both copies behave the same.The packets that carry a byte offset are
SET_CONTEXT_REG(0x69),SET_SH_REG(0x76),SET_UCONFIG_REG(0x79) and their indirect forms.SET_UCONFIG_REG_INDEX(0x7a) selects a bank and index rather than a byte offset and still rejects0xffffffff.Part of the split of #10420; independent of #10779 and #16053.
References
The context register space ends below
0x4000, so0xffffffffcannot name a register; the packet is accepted, not rejected.docs/dev/debt/libSceAgcDriver.mdrecords theSET_*_REG_INDIRECTread timing for the entries that are genuinely invalid (bits 16-27 set). Measurement: the title trace that motivated the series containsSET_CONTEXT_REGpackets carrying this offset, and before the change the submission threw.Tested
agc_driver_pm4(18 tests) andagc_driver_graphicspass, andtools/check_conventions.py --base origin/mainpasses, ond23df92b38. The register tests now execute such a packet and check that the neighbouring entries land while the sentinel entry writes nothing, instead of expecting a failure.ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ctest --test-dir build -R 'agc_driver_(pm4|graphics)' -Vpasses with noVUID-lines and without the "was not found but was requested by env var VK_INSTANCE_LAYERS" message. This machine has no Vulkan device, so that run covers the decode path only.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)