Repository navigation
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
|
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
Nothing blocks this change; the reviewed code adds the required flush before snapshotting a non-empty root command buffer and covers the reported ordering gap with a focused test.
What I ran
- Reviewed head
242105bf9a8fe98964d84f2c93fa1750050d5f68using the prepared review bundle andrepo_read.py. - No commands or tests were run by me. The test and
git diff --checkresults in the description are author-reported.
Results
| Check | Result | Note |
|---|---|---|
| Diff and targeted source review | passed | Both changed files read |
| Automated checks | not run | Author reports Windows test and diff check passed |
Findings
Blocking
None.
Non-blocking
None.
Not verified
- The Madden #24212 reproduction remains unconfirmed, as stated in the description.
- No independent test run or
git diff --checkwas performed. - Read:
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Queues/Submission.cpp,core/libs/prx/libSceAgcDriver/tests/Submit.cpp, and targeted sections ofcore/libs/prx/libSceAgcDriver/Execution/include/GuestMemory.hppandcore/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp. - Excluded: none listed in
manifest.json; both changed files were included and read.
To get this to a good state
Nothing is required. Optional: retest the Madden #24212 capture against this branch to confirm the reported hang is fixed.
| // The root command buffer is read directly by copySegment. Unlike GuestMemory::Read, | ||
| // that copy does not pass through the host-read hook; land any earlier GPU writes | ||
| // (notably labels) before snapshotting the words the guest just submitted. | ||
| GuestMemory::FlushGpuWrites(reinterpret_cast<std::uintptr_t>(guest), bytes); |
There was a problem hiding this comment.
Could the shared root-copy path check the word budget and guest range once before invoking the flush hook? On this head, a regular submission checks the range in Submit and again in copyCommands. The new flush also runs before copyLink enforces the copy budget. Moving the root checks into copyCommands would give rewind tails the same validation order, avoid a second range check on every normal submission, and let the existing per-segment budget continue to cover jumps. The positive fixture already checks that the flush precedes the actual read.
AI-assisted: yes
There was a problem hiding this comment.
Rebased onto current main 1b8f79a. The rebase retained main's origin-aware copySegment/copyLink signatures, chain-loop detection, and copyRewindTail path. copyCommands checks and charges the root dword budget first, then checks the complete non-empty guest range, then calls FlushGpuWrites before the direct copy. The root segment is passed with chargeBudget=false because it was already charged; chained and nested indirect segments remain charged normally. copyRewindTail routes through copyCommands, so it gets the same ordering. The duplicate Submit range check is gone.
The latest-main build succeeded. CTest agc_driver passed on NVIDIA RTX 5080 (driver 32.0.16.2140) and AMD Radeon(TM) Graphics (driver 32.0.21042.62), with VK_LAYER_KHRONOS_validation enabled and zero VUID/error/warning diagnostics on both adapters. A negative control with only the root FlushGpuWrites call removed fails at the new root-buffer test with unsupported PM4 header 0x00000001; restoring the call and rebuilding passes again. Convention checks pass with the required PR template headings and no non-debt code comments.
Manual overlap audit: #15136 changes awaited-label/wait tracking and rewind-tail execution bookkeeping. #22434 is a direct signature-level overlap: it threads GuestRanges source tracking through copyCommands/copySegment/copyLink and caches rewind-tail copies. It does not implement root range validation, FlushGpuWrites, or root budget charging; these are orthogonal, but any rebase must carry GuestRanges independently from this PR's origin and chargeBudget parameters. #27635 adds GCN packet lowering at the packet-copy point in copyLink, also distinct from root-copy ordering. The other listed Driver.hpp changes are unrelated declarations/state. The PR remains draft because the reported Madden title capture has not been provided for a title-level reproduction.
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
Nothing blocks this change; the reported game capture still needs validation before the issue can be considered confirmed fixed.
What I ran
Reviewed head 65fa6b5f07f456ef7dc1d1518bfe2465d892733c. I read description.md, commits.md, manifest.json, diff.patch, and all three changed files listed as reviewed. I inspected targeted GuestMemory range-check and flush-hook implementations. No commands or tests were run; the environment provided the pinned reader repo_read.py only.
Results
| Check | Result | Note |
|---|---|---|
| Diff and changed code | passed | All three reviewed files read |
| Automated tests | not run | Author reports Windows test passed |
| Madden capture | not run | Description says retest remains needed |
Findings
Blocking
None.
Non-blocking
- The regression test demonstrates the flush hook mutating the root buffer before parsing, and the range check occurs before the flush hook. The reported Madden capture remains unconfirmed, as the description states.
Sources
Submission.cpp:206-209validates and flushes the submitted root range beforecopySegmentreads it. The existing direct read is atSubmission.cpp:240-241.GuestMemory.cpp:1239-1250showsCheckRangerejecting invalid or inaccessible ranges;GuestMemory.cpp:4006-4008shows the flush hook invocation.Submit.cpp:120-160contains the new regression checks.
Not verified
I did not run tests or independently verify the author-reported Windows run or negative control. I did not reproduce the Madden capture or validate behavior on hardware. files.json was not available as a review-folder document; the listing showed all three changed files marked included, and I read each one.
To get this to a good state
Nothing is required. Retesting the Madden capture is optional validation noted in the PR description.
|
Linux / AMD run of head Setup: Linux 7.3.5, AMD Radeon RX 6650 XT (gfx1032, RADV), Mesa 26.3.1, GCC 16.2.1, Release. Fresh configure of the PR head.
So the regression test reproduces the described failure on Linux / RADV too, and the flush fixes it. I don't have the Madden #24212 capture, so the hang itself isn't retested here. AI-assisted: yes |
|
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.
|
c7a203b to
d4df94f
Compare
d4df94f to
9b32c39
Compare
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
Nothing blocks this change; the prepared diff and source context support the root-range validation, flush ordering, and single root-budget charge described in the PR.
What I ran
- Head:
9b32c39e18cc1e8efb7f59eed1b578152040be51. - Read the prepared description, commit list, manifest, and diff through
repo_read.py; inspected all three changed files at the pinned head. - No build or tests were run in this review; reported test results are author supplied.
Results
| Check | Result | Note |
|---|---|---|
| Diff and source review | passed | All three changed files read |
| Build and tests | not run | Results in PR description are author supplied |
| Negative control | not run | Author reports a successful negative control |
Findings
Blocking
None.
Non-blocking
None.
Not verified
- Runtime behavior, build, tests, and the reported hardware results were not independently verified.
files.jsonwas not available through the review reader, so exclusions beyond the manifest could not be confirmed.
To get this to a good state
Nothing is required.
|
Exact-head recheck (2026-11-30): the current head is |
|
Title evidence for PPSA15246 (Windows 10 Pro, one machine, 600 s per run, 2026-12-01). The title was run with and without this pull request (head Result in short: this pull request does not remove the rejection for this title. In all 6 runs the submission of 6387 dwords is rejected with
In every run the 15 dwords before the rejected header are equal in the copy and in the guest buffer, and the changed dwords lie far behind dword 15. The What this shows: with this pull request the guest buffer did not change after the copy in 3 of 3 runs, without it it changed in 2 of 3 runs (one to four dwords). What it does not show: who writes those dwords, whether this pull request is the reason they did not change (three runs per arm, no random assignment), why dword 15 is zero, or what a PS5 does with a zero header (not measured). No change is requested; the numbers are given as a title measurement. without, run 1: [pm4-recheck] lineswithout, run 2: [pm4-recheck] lineswithout, run 3: [pm4-recheck] lineswith, run 1: [pm4-recheck] lineswith, run 2: [pm4-recheck] lineswith, run 3: [pm4-recheck] linesAI-assisted (Claude Code). |
ligmaSec
left a comment
There was a problem hiding this comment.
The new hook test verifies validation and flush order for submission. The same change now invokes the production hook while noteReleasedTails scans a released rewind tail and again when executeRewindTail copies it. Could you cover that worker path with a pending producer write into the released tail, including the case where the tail scan runs before the producer finishes?
Source review at 9b32c39e18. The head trial-merges onto 6ef4f2f73b. Focused Linux checks are queued.
AI-assisted: yes.
What
Rebased onto current main at 1b8f79a.
copyCommands snapshots the root PM4 command buffer directly from guest memory. That path bypasses the host-read synchronization performed by GuestMemory::Read, so GPU writes that precede submission (including label writes) could still be pending when the host copied the root buffer.
The root-copy path now:
copyRewindTail routes its tail through copyCommands, so the same validation and flush ordering also applies to rewind-tail root copies. The duplicate range check in Submit was removed; the common copy entry point owns the check.
The tests cover visibility of a GPU-written root command buffer, and verify that over-budget and inaccessible root ranges fail before the flush hook is called.
Tested
Manual overlap audit of the bot's shared-file list:
Checklist