fix(agc): enforce the kept-byte budget before buffer-only work #3211
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3211"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by Scramblrrrr on 2026-10-11T01:27:33Z.
What
A buffer-only dispatch can keep recording copied buffers beyond the 512 MiB recorder budget after #2283: the accounting increments, but the existing enforcement checks are reached through sampled/storage-image lookup. A dispatch with no images reaches neither check.
Check
BoundKeptBytes()at ordinary and recipe dispatch/draw entry, before recording the next work. This submits the preceding batch when its counted bytes reach the existing budget. Byte accounting, owner deduplication and the budget itself stay in #2283. This is the follow-up originally offered there as 0280ac32, rebased onto maind31b57a4as4fd6192d(earlier standalone build c11b5292f on77bd928a3).The regression dispatches to one buffer, charges a kept test owner at the existing budget, then dispatches to a distinct buffer. It requires that the preceding batch has submitted. The helper holds GuestMemory::GpuMutex, matching the driver's calling convention. The charge is synthetic; it avoids a huge test allocation while exercising actual buffer-only dispatch and batch submission.
Tested
Windows 11, MinGW GCC 15.2, Release, RTX 5070 Ti, Vulkan required, SPIRV-Tools off:
4fd6192d(based31b57a4), and the preceding c11b5292f build: 4/4 selected tests pass: agc_driver_recorded_kept_bytes, agc_recorder_kept_bytes, agc_driver_graphics, agc_host_import_unmap. Relevant targets and dependencies were built; the full suite was not run.a buffer-only dispatch did not submit the preceding batch at its kept-byte budget. Adding the checks passes.a3c43ad2plus #2283: four selected tests pass; reverting the entry checks fails the same regression. Of 722 full-suite tests, 717 pass, four skip and the known DCC-key first-write failure remains (#2767). Cross-test and negative control.007 integration testing is tracked in #2523. It remains visually black; this PR does not claim playability or solve the separate wait/compiler delays.
Checklist
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T01:27:43Z.
Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.
Imported from boykopovar/AnyPS5. Originally posted by SleglJan on 2026-10-11T01:36:51Z.
@Scramblrrrr #3211 was closed by the intake bot (fewer than 10 merged PRs), not on its merits. If you'd like, I can open it from my account with your commit and authorship unchanged, as #2976 carried @queeeef's #2909. I already ran the same change (0280ac32) on Linux: comment on #2283. The four selected tests pass, the draw-snapshot subcase runs, and with the four entry checks reverted the new test fails with your message. Reply here if you want that; I won't open it otherwise.
AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T07:20:09Z.
Checked the four entry checks (
dispatch,DispatchRecipe,Draw,DrawWithRecipe) and the new buffer-only regression. Built libSceAgcDriver and ran its 354 tests (all pass, incl.agc_driver_recorded_kept_bytes); with the checks reverted the new test fails. Also matches @SleglJan's Linux/NVIDIA cross-test. Merging once CI is green.Imported from boykopovar/AnyPS5. Originally posted by Scramblrrrr on 2026-10-11T13:25:04Z.
Thanks @adriadam10 for the build, all-354-test run and negative-control verification, and @SleglJan for the independent Linux/NVIDIA cross-test. Confirmed #3211 merged at
df23cab62b. We are continuing the 007 integration tests and keeping separate storage-image pins / descriptor-heap copies distinct from this kept-byte entry check. AI-assisted (Codex).