fix(agc): reuse a host import only while it covers its region #2101
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2101"
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 johnmaia on 2026-10-09T08:37:09Z.
What
UploadPreparemerges overlapping regions. At the lease, a registered range takes a host import of exactly its size and records it indirect. When a descriptor range runs past that range's end, and into the next registered range, all three merge into one region. The merged region keeps the first range's import indirect.UploadPrepareandUploadFinishthen reuse that import while the import epoch is unchanged.Descriptorbinds the view only up to the import's end and throwsguest buffer view exceeds its GPU owner.Both reuse sites now keep the import only while it covers the whole region. Otherwise the region looks an import up again (
findImportalready requires coverage) or is copied, as before.Disney Epic Mickey: Rebrushed (PPSA15657, UE4) stopped at its first presentation on this. A 0x50000-byte import was kept for a merged 0x80000-byte region, under a 0x7f800-byte storage view at its base.
Tested
Linux (Ubuntu 24.04, GCC), RX 7600 (RADV).
agc_driver_recorder_testsgetscrossingImportTests. It registers two adjacent 64 KiB ranges, imports both, and binds a 512-byte view across their boundary in an address-based build. Onmainit throwsguest buffer view exceeds its GPU owner; with the change it passes.ctestpasses, 497/497.tools/check_conventions.pyandtools/check_test_registration.pypass.mainwith a local stack of open PRs: before, its first presentation fails with this error. With the change, the stale import is dropped once, and the title gets past it to the next stops (#1901 / #1902, #1927 / #1928, then layered color targets).Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
https://claude.ai/code/session_0134RWCyiyydJBbfKz8g9Bwe
Imported from boykopovar/AnyPS5. Originally posted by rmz-24 on 2026-10-09T12:26:12Z.
Windows run: Windows 11 Pro 25H2 (10.0.26200.9457), RTX 5060 Ti (NVIDIA 617.42), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release,
-DANYPS5_ENABLE_SPIRV_TOOLS=ON, full build pluslibs. b597c7fe cherry-picked onto currentmaind70b8998(applies cleanly).agc_driver_recorder_tests(not in ctest, run directly):crossingImportTestsruns and passes on this host; the suite then stops at the unrelated refresh-store assertion from #2155, asmaindoes on Windows. With the test change proposed in #2155 applied on top, the whole recorder suite passes.windows_import_modules, the intermittent Windows Error Reporting timeout fixed by #2227, unrelated to this change.AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-09T20:08:50Z.
Closing: #1489 (merged since) drops the import in
UploadPreparewhen a merge takes a region past its end, which is this case. Please reopen if PPSA15657 still stops atguest buffer view exceeds its GPU owneron current main.Pull request closed