Skip to content

fix(agc): keep nonbinding import probes from pinning buffers - #7061

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
Azaluz:codex/import-hint-lifetime
Oct 17, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
Azaluz:codex/import-hint-lifetime

Conversation

@Azaluz

@Azaluz Azaluz commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

What

Prevent nonbinding host-import probes from changing the use stamps that protect actual buffer pointers from eviction.

  • Split the covering lookup into a const peekImport and a stamping findImport.
  • Use the observational lookup for HostImportCovers, joined-span endpoint expansion, sparse join-base metadata, and profiling-only import classification.
  • Keep stamping actual pointer acquisitions and binding prepasses.
  • Add budget-pressure regressions for coverage hints and refused joins, including a genuine-acquisition control, descriptor/serial checks, copied bytes, hot-import retention, and guest-data integrity.

With a two-import budget, a coverage hint or a refused join currently refreshes an otherwise unused import. A later disjoint descriptor then copies because the unused import appears held. The regressions show that the descriptor can instead acquire its complete import while genuinely acquired buffers remain protected.

Related: #6097 fixes the stale covering lookup in importAllocation. This change addresses other nonbinding callsites and uses the same observational helper split. No stale-import qualification or allocation changes from #6097 are included.

Merge order: #5372 changes joined-span policy at the same two endpoint expressions. The overlap check reports that textual conflict, so it is listed as a merge-order dependency below. After #5372 lands, its != nullptr endpoint predicates should be retained while using peekImport for both lookups. This PR is independently built and tested on main.

Tested

Windows 11 build 26300, MinGW GCC 15.2, Release, publication base ef674f5af3e4d0fe44fda10e46d36ead2c262c0e, after preserving the original frozen experiment on adb0e7a8cb68232f457c788afa90e53648c0f15f.

  • Both new scenarios fail independently with unchanged production code: a coverage hint prevented eviction of an unused import; a failed join endpoint probe prevented eviction of an unused import. The genuine-acquisition control passes on that baseline.
  • Candidate agc_driver_graphics_tests: passed, natural exit, 15.640 s after the publication rebase (5.954 s on the original frozen experiment), including existing joined-import and sparse-heap coverage.
  • Native Vulkan gates with ANYPS5_REQUIRE_VULKAN=1 APS5_PROFILE_DRAW=1 ANYPS5_NO_SHADER_CACHE=1: agc_driver_host_import_windows_tests, agc_driver_host_import_at_map_tests, agc_driver_bda_device_tests, and agc_driver_host_import_teardown_tests all passed without skips.
  • Full graphics mocks do not implement vkCreateQueryPool when profiling is enabled; the same preparation failure occurs on baseline and candidate. Native profile-enabled gates above passed.
  • python tools/check_conventions.py --base origin/main: passed.
  • Overlap review: 762 open PRs; 46 shared-file patches reviewed, including 16 branches that could not be automatically compared because they conflict with main. No duplicate of this bookkeeping fix found. perf(agc-driver): join every range a bound buffer crosses #5372 has the declared textual overlap; composing this patch and fix(graphics): keep discarded import probes from pinning windows #6097 in either order produces the same clean tree.
  • GPU tests ran with mining stopped. No frame-rate, title-unblocking, or current-main gameplay claim.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: perf(agc-driver): join every range a bound buffer crosses #5372
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 4080 SUPER, driver 617.42, Windows 11 build 26300
  • AI-assisted: yes

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