fix(agc): promote a held import window to its whole allocation #5870
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5870"
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 Sam-mon7 on 2026-10-14T14:22:14Z.
What
Fixes a boot abort in Demon's Souls (PPSA01341) on
main, about 30 s in, after 2 frames:KeepThroughHold), so pointers the build already took stay valid.Tested
Windows 11 (26200), WinLibs GCC 15.2.0, Release, RTX 4070.
main63fb0cd92: the abort above.agc_host_import_retire: the newWindowPromotionOutlivesTheHoldcase fails without the fix ("a held import window could not be promoted to its whole registered range") and passes with it.^(agc_|windows_backtrace_): 534 passed, 0 failed, 3 skipped (two udmabuf tests are Linux only; the RTX 4070 has no stencil export).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)Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-15T02:09:37Z.
I ran this PR's test on Linux.
Setup: this PR's diff applied to main at
8cd937e29(the PR's base is 464 commits behind it), default CMake build (CMAKE_BUILD_TYPE empty, unoptimized), clean environment.ctest -R '^agc_host_import_retire$', 3 runs each. The test did not open a GPU device, so this is a CPU-only run.So the new test catches the old behaviour here. I did not check Windows, macOS or a real GPU.
AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by fdfawef324 on 2026-10-15T06:10:29Z.
Same stop reproduced here, and this PR clears it. Demon's Souls PPSA01342 (
ds_enableDebugStartMenupackage args), Windows Server 2025, RTX 3060 12 GB (driver 591.86), Ryzen 9 5900X, MinGW GCC 15.2 Release.main2559e9623+ #5828 + a local follow-up for static descriptors: aborts 107 s in, after 2 presents:FATAL: an address-based build copies 358 MiB of 1 registered ranges, past 64 MiB (APS5_ADDRESS_COPY_MAX_MIB); the largest: 0x260100000+0x16690000 (358.6 MiB committed, outside the write-watched arena)I only ran this on a cold cache, so I have no timing comparison.
agc_host_import_retirewasn't rerun here; Sam-mon7 and Dextroid17 already reported it.AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T12:10:46Z.
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.
main)core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cppL1057-1059Some 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.
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cppcore/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cppcore/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cppcore/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cppcore/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cppcore/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cppcore/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cppcore/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cppcore/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cppcore/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cppcore/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cppcore/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cppcore/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cppcore/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cppcore/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cppcore/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cppcore/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cppcore/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cppcore/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cppcore/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cppcore/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cppcore/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cppcore/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cppcore/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cppcore/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cppcore/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cppcore/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cppcore/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cppImported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-15T13:54:26Z.
Checked on Linux (merged onto current main): build and the libSceAgcDriver ctest scope green except
agc_driver_tessellation, which segfaults at Vulkan device creation here independently of this change.agc_host_import_retirepasses with the PR and fails whenGuestBufferMemory.cppis reverted, soWindowPromotionOutlivesTheHoldcovers the fix. The promotion is limited to the same single registered range with an active recorder, and the retired window stays alive through the hold. Also confirmed by @Dextroid17 (Linux ctest) and @fdfawef324 (Demon's Souls on Windows, RTX 3060); merging once the full build is green.Imported from boykopovar/AnyPS5. Originally posted by fdfawef324 on 2026-10-15T20:01:49Z.
Resident Evil 4 (PPSA07411) hits the same abort. The machine is the one from my Demon's Souls comment above. The stack is
main8cd937e29+ #6126 + earlier heads of #5884 and #6405 + the read-lane variant discussed in #6277 + #5907 at 7ad8cb8de + two local diagnostics that only add detail to geometry-assembly and sample-count refusal messages.7b06e7594), using the cache the first run filled: no abort. It ran until the harness's timed dump at 2,986 s. Frame dumps show the CAPCOM logo, the brightness calibration screen and the "About the Settings for Sending Play Data" screen.This is not a clean A/B. Two earlier runs of nearly the same stack without this PR, both with a fully warm cache, ran to the harness's timed dump at 1,485 s and 2,086 s without hitting this abort. Of these runs, only the one that aborted had a cold cache, so whether RE4 reaches the abort may depend on load timing, and one run with the PR does not show that it fixes RE4. I have not yet run the PR with a cold cache.
AI-assisted: yes