Skip to content

fix(agc): retain failed import windows across unrelated mappings - #6442

Merged
adriadam10 merged 2 commits into
boykopovar:mainfrom
JJenkx:fix/retain-import-window-failures
Oct 19, 2026
Merged

adriadam10 merged 2 commits into
boykopovar:mainfrom
JJenkx:fix/retain-import-window-failures

Conversation

@JJenkx

@JJenkx JJenkx commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

What

Keep a rejected host-import window cached while the registered allocation that owns it is unchanged. refreshImports currently compares the failed window against the allocation's full import run, so a window smaller than that run is dropped on any registry-generation change. An unrelated allocation can therefore repeat the same failed Vulkan allocation.

Check rejected windows against the current owner and extent with a dedicated overload; successful-import reconciliation and lookup call sites retain their original implementation. The failure keeps weak owner identities, not allocation leases. Changed owners still invalidate the decision; another window remains eligible to attempt an import. Joined spans retain their existing full-run checks. This follows the remap-identity handling already merged in #1357; it does not revive #1361's closed range-history/import-decision redesign.

Tested

Linux Release refreshed onto main 0c4816f61, public head f5c420641e940e551c4c68ad515bcb52155ba47e:

  • Full runtime libs and the selected import test executables build again after the refresh and reduced scope. The unchanged regression executable retains the SHA-256 listed below.
  • New mocked-Vulkan case in agc_host_import_sparse: fail a 4 MiB window in an 8 MiB shared range; a repeat and an unrelated allocation do not retry; the other window attempts its own import; replacing the affected registered owner retries and succeeds.
  • With main's production source and this unchanged regression, the test fails only at an unrelated registry change retried a failed import window. With the fix it passes. The regression executable is identical across both runs, SHA-256 5e7e0b5646d8b8f7386b7b59641b3d249d5f852c2854091d4b01caf4199377a4.
  • Nine focused CTests pass on Radeon and the same nine pass on lavapipe, zero test skips: agc_host_import_unmap, agc_parked_import_unmap, agc_host_import_retirement, agc_host_import_retire, agc_host_import_sparse, agc_driver_host_import_at_map, agc_driver_host_import_teardown, agc_driver_host_import_windows, agc_driver_sparse_dma_buf_import.
  • Conventions and whitespace pass. Windows/full-suite CI not run locally.

Current standalone validation head ee796b517a7673e11f977bbfeaba88dad91f1310 differs from public source only by private SPIRV-Tools teardown repair b326807c0c9d8682b697fdad3153f77fc2642f5f. That dependency change is excluded; these builds do not independently validate the official pin.

The earlier native diagnostic uses base 92e50418f, with original candidate integration 3079f3f614f39bfca589592bb1328d660e102a87; it does not establish native behavior of the refreshed source. Lodoss PPSA05347 v01.000.001 was the investigation lead, not an established title gain. Both the main and changed integrations render the opening story; the unchanged failure cache is not proven to be its main bottleneck. One diagnostic 20-second trace pair has 745 versus 722 presents, with changing opening-story scenes and differing desktop focus. No FPS gain or title unblock is claimed. Both traces complete without dropped events. The base closes normally; the candidate later aborts on close with heap corruption. Earlier integrations also recorded intermittent close aborts, but causality for this pair is not isolated. A further current-main run, with a debugger attached only near close, also exits normally; it captures no failing stack and does not resolve causality. A later main-plus-#6341 trace run also aborts at ordinary close (terminate called without an active exception), a different diagnostic whose cause is not isolated. The shutdown failure remains under investigation. No proprietary assets, screenshots, binaries or raw title logs are included.

Timing traces, summary lines and digests are attached as diagnostic evidence, with protocol limits in the bundle.

The overlap with #6097 was removed by leaving successful lookup/reconciliation sites intact. A local merge-tree check combines the current branches cleanly. Manual inspection of the cached patches listed as uncomparable by the bot found no added failed-window reconciliation implementation in those branches.

Related open #5870 promotes held windows and #6197 joins imports for storage surfaces; neither changes this failed-window reconciliation. #6308 changes unwatch hook behavior. The source does not include these changes.

Checklist

  • Based on current main; one topic; no merge commits
  • No duplicate open implementation found; no new code comments or dependencies
  • Generic behavior; no title-specific conditions or silent-success stubs
  • Depends on: none
  • Unblocks: none; component cache invalidation fix
  • GPUs tested: AMD Radeon RX 6650 XT, RADV Mesa 26.2.4-arch1.1, Linux 7.2.9-arch1-1; lavapipe Mesa 26.2.4 / LLVM 23.1.1 on the same Linux host. Failure injection uses mocked Vulkan.
  • AI-assisted: yes

@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

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.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 6457 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp L1261-1262, L1686-1687
PR 6479 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp L1261-1262, L1686-1687
PR 6730 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp L1261-1262, L1686-1687

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.

Pull request Shared files not compared
PR 1191 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 1324 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 2434 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 4448 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 5021 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 5372 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6177 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6185 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6186 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6197 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6292 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6481 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6548 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6615 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6636 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6786 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6947 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7201 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/HostImportSparseDmaBuf.cpp
PR 7233 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7332 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/HostImportSparseDmaBuf.cpp
PR 7371 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7514 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7618 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7642 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp

@JJenkx

JJenkx commented Oct 18, 2026

Copy link
Copy Markdown
Contributor Author

Parking this PR to free an open slot for a bounded jump-table decoder fix with a reproduced Crimson Spires crash, regression negative control, GPU readback, and native progression through the former failure to the opening story. This import-cache correction remains preserved on fix/retain-import-window-failures at f5c420641e940e551c4c68ad515bcb52155ba47e. It has useful mocked regression coverage, but no established native-title gain or independent review, and its description records unresolved shutdown causality and standalone validation limits. Revisit with an exact public-head validation and a title that exercises the failed-window retry. No branch is deleted.

@JJenkx JJenkx closed this Oct 18, 2026
@JJenkx JJenkx reopened this Oct 19, 2026
@adriadam10 adriadam10 self-assigned this Oct 19, 2026
@adriadam10
adriadam10 merged commit baec31b into boykopovar:main Oct 19, 2026
23 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc*

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants