Repository navigation
fix(agc): bring the driver tests back to green after the recorder rewrite - #69
Closed
ShahabAhmed01 wants to merge 3 commits into
Closed
ShahabAhmed01 wants to merge 3 commits into
ShahabAhmed01 wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The blocking suspend-point contract and Windows memory-scope behavior require resolution.
Review effort: Lite
Findings: 1
What changed in this PR
Restores AGC driver test compatibility after the recorder rewrite.
Changes:
- Restores guest-memory range resolution.
- Reintroduces suspend-boundary waiting.
- Updates worker-failure coverage to use an unmapped write.
| File | Summary |
|---|---|
core/libs/prx/libSceAgcDriver/tests/Submit.cpp |
Updates worker-failure test coverage. |
core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp |
Restores access-scope resolution; Windows module-state ownership remains unresolved. |
core/libs/prx/libSceAgcDriver/Execution/src/Driver.cpp |
Reintroduces suspend-boundary waiting, requiring confirmation of the intended API contract. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| // cannot be suspended while its own packets are still unexecuted. Nothing is drained here. | ||
| ++suspendWaiters; | ||
| changed.notify_all(); | ||
| changed.wait(lock, [&] { return failure != nullptr || stopping || completed >= target; }); |
- CheckRange resolved the range through MemoryAccessScope before verifying it. The guest memory rewrite dropped that call together with the libc tracking hook it forwarded to, so nothing resolves a range the driver reads or writes any more. - MemoryAccessScope and the PM4 test survived the rewrite, so `agc_driver_pm4` failed at "WRITE_DATA did not synchronize its destination": the resolver never saw the destination and no range was synchronized before the write. - No scope is installed outside the test, so the resolver stays a no-op on the game path.
- The recorder rewrite enqueued the boundary submission and returned, so sceAgcSuspendPoint ordered nothing: `agc_driver_flip` failed at "suspend completed before preceding work" and then deadlocked in shutdown, because the flip it blocked on was never released. - The wait ends when the workers have executed the boundary (recorded and submitted), not when the GPU is idle, so the device drain the suspend point used to do every frame stays gone. - A suspend point now shares WaitIdle's completion notification (`suspendWaiters`): a worker skips the notify while nobody waits, and the boundary would otherwise never wake the caller.
- A dispatch the driver cannot recompile is skipped since the recorder rewrite, so the dispatch the test submitted never failed the worker: WaitIdle returned, the expectation threw inside a thread and `agc_driver` crashed instead of reporting a failure. - A WRITE_DATA to an unmapped guest range still fails on the worker, so it now triggers the failure the test covers: idle, the following DCB, AGR and ACB submissions and shutdown all propagate it. - The dispatch is still submitted first and WaitIdle must return from it, so a dispatch that starts failing the worker again is caught here too.
ShahabAhmed01
force-pushed
the
fix/agc-recorder-test-regressions
branch
from
September 28, 2026 08:30
ec9349a to
c438346
Compare
Owner
|
Thanks for the fixes. Before merging, please address two points:
Restoring |
Celegans12
pushed a commit
to Celegans12/AnyPS5-Ghost-of-Yotei
that referenced
this pull request
Nov 19, 2026
…w-restore fix(kyty): keep read-only mapped views read-only when the page tracker restores them on Windows
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

No description provided.