perf(agc): keep a resource set's import proof across registry changes that leave the imports in place #7261

Merged
tibzejoker merged 3 commits from upstream-pr/7261 into main 2026-11-01 06:18:33 +00:00
tibzejoker commented 2026-10-17 20:16:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by tibzejoker on 2026-10-17T20:16:32Z.


What

A reused resource set that reads imported buffers in place proves, before each use, that every import it was built against is still the same one (ShaderResources::Revalidate, the serial loop over its direct regions). An epoch gate skips that loop while the import table is unchanged since the set's last proof (HostImportsUnchanged). That proof is also tied to the guest allocation registry's generation, so any registry change fails it for every cached set, whether or not it touched an import. Each set then runs its serial loop, and the first HostImportSerial call reconciles the table with a fresh lease.

A title that maps and unmaps guest memory often moves the generation between most frames. Each cached set used after that pays the loop, its lock round trips and a lease, even though no import changed.

This PR adds HostImportsReconciledUnchanged. It reconciles the import table with the registry once, if the generation moved, then accepts the proof when no import was dropped (the existing epoch) and none was added (a new inserted count, also stored in HostImportsProof). Reconciling is what the serial loop's first lookup already did. After it, a set whose regions are all served by imports finds the same serials exactly when no import was added or dropped.

Revalidate uses the new check only for sets whose direct regions are all served by host imports and have no committed-span bound (CutRegions). Sets with a read-only image mirror region, or a region bounded by its committed span, keep the current check: their serial loop also checks things the import table does not track. The other users of HostImportsUnchanged (recipe presync, Texture.cpp) are unchanged.

Test: agc_driver_host_import_proofs (tests/execution/HostImportProofs.cpp). It imports a window through a GPU fill and takes a proof. It then checks that:

  • the proof holds across an unrelated registration and its removal;
  • it fails once a new import is made;
  • it fails once the imported range is mapped again.

Run with main's HostImportsUnchanged in place of the new check, it fails: "an unrelated registration broke the proof, although every import stayed in place".

Related: #6917 (keep the lease snapshot until the registry changes) and #6951 (memoize import run bounds) make each reconcile and lookup cheaper. This PR runs them less often. The three don't touch the same lines.

Tested

Windows 11 Pro (26200), RTX 4090 (NVIDIA 616.92), i9-13900K, MinGW GCC 15.2.0:

  • On this head 0c2a343d25, rebased on main 48c160c58b:
    • agc_driver_host_import_proofs passes on the RTX 4090 and the UHD 770 (Intel 101.6129), under VK_LAYER_KHRONOS_validation with no VUID- line. With HostImportsUnchanged instead, it fails with the message above.
    • Full ctest -R "^agc" -E "^agc_driver_bda_device$" on the RTX 4090: 1078 of 1080 pass. The 2 failures, agc_host_import_cut_lifetime and agc_driver_depth_plane_partial_store, also fail on main.
  • Earlier, before the rebase: ctest -R "agc_driver|agc_masked|agc_shader", 524/524 pass, 2 skipped.
  • GTA V (PPSA04264), open world (a story save resumed in Los Santos), measured on 2026-10-17 (current main stops GTA V before its menu, #11513). The build is main plus #6488, #6848 and #7189: GTA needs the first two to render, and #7189 removes the resource set rebuilds that hid this cost. Settings: APS5_PROFILE_DRAW=1, last 12 windows of 10 s, one run each:
serial loops run / revalidations revalidate time per call committer µs per draw draws committed / 10 s
base 554k / 6.77M (8.2 %) 8.25 µs 38.2 219k
this PR 477k / 7.71M (6.2 %) 6.67 µs 34.4 240k

A stack sample of the draw committer before the change put HostImportSerial (with its GuestAllocationsAcquire) at 3 % of the committer's samples, all from this loop. The frame rate in this scene depends on where the save respawns the player (2-11 FPS within one run), so the committer figures are the comparison to read. The gain is one run each and larger than that 3 %, so take its size with care.

Performance capture

GTA V (PPSA04264), open world from the same save, RTX 4090, one warm-up run then one traced run per side, same session. Base 17eacab0ecac = main 47a266cf9 + #6488 + #6848 (GTA V does not run on plain main) + #7189 + a local bench aid (keyboard pad input while an IME session is open). With the PR: 57dd68bc3900 = the same plus this change, cherry-picked onto that older base (one hunk adapted: only the inserted count). Traces: fork release perf-7261-20261019.

320 -> 392 presents in the 60 s window, p50 189.4 -> 145.9 ms. Read this with care: in the open world frame time follows where the save respawns (2 to 11 FPS within one run), and the trace buffer of queue worker 0 fills after a few seconds (trace_dropped). The committer cost per draw under Tested is the measurement this PR rests on.

{"commit":"17eacab0ecac","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"330:60"},"gpu":"NVIDIA GeForce RTX 4090","driver":"NVIDIA 616.92","os":"Windows 10.0.26200","resolution":"3840x2160","window":{"spec":"seconds 330:60","first_present":3685,"ms":60122.222},"presents":320,"frame_ms":{"p50":189.375,"p90":205.260,"p99":262.658,"max":323.808},"gpu_busy_ms_per_present":59.736,"worker_busy_pct":{"queue worker 0x0":3147.558,"queue worker 0x38":27.952,"queue worker 0x30":10.557,"queue worker 0x20":37.712,"queue worker 0x28":21.195},"top_phases_ms_per_frame":{"Driver.EndSubmission":5734.657,"Driver.Packet":356.391,"Driver.Packet.memory_wait":179.517,"Driver.Packet.draw":153.353,"Driver.Draw":151.856,"Driver.Draw.shader_compile_and_link":103.054,"Shader.DrawStage":80.386,"Shader.DrawStage.materialize":40.876},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":3.503,"events_lost":4071991,"totals_full":false}},"trace":"aps5-trace-17eacab0ecac-29712.json.gz"}
{"commit":"57dd68bc3900","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"330:60"},"gpu":"NVIDIA GeForce RTX 4090","driver":"NVIDIA 616.92","os":"Windows 10.0.26200","resolution":"3840x2160","window":{"spec":"seconds 330:60","first_present":4054,"ms":60030.641},"presents":392,"frame_ms":{"p50":145.892,"p90":178.473,"p99":305.486,"max":470.782},"gpu_busy_ms_per_present":59.003,"worker_busy_pct":{"queue worker 0x0":3653.455,"queue worker 0x20":37.797,"queue worker 0x38":21.886,"queue worker 0x28":22.423,"queue worker 0x30":13.899},"top_phases_ms_per_frame":{"Driver.EndSubmission":5447.114,"Driver.Packet":290.659,"Driver.Packet.memory_wait":146.116,"Driver.Packet.draw":122.834,"Driver.Draw":121.573,"Driver.Draw.shader_compile_and_link":76.443,"Shader.DrawStage":58.034,"Driver.Draw.draw_enqueued":30.671},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":3.977,"events_lost":3764105,"totals_full":false}},"trace":"aps5-trace-57dd68bc3900-39980.json.gz"}

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: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA RTX 4090, driver 616.92, Windows 11; AMD RX 9070 XT (amdvlk 32.0.32015.7029, Windows 11, by bunbeans2-arch: agc_driver_host_import_proofs 3 of 3 on 0c2a343d25 + main f7f03daf52, validation on, 0 VUID- lines)
  • AI-assisted: yes, AI-assisted (Claude Code)

🤖 Generated with Claude Code

https://claude.ai/code/session_01XBXM4pgkMHYEtqN1EQni2P

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4903581531 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7261). Originally posted by [tibzejoker](https://github.com/tibzejoker) on 2026-10-17T20:16:32Z. --- ### What A reused resource set that reads imported buffers in place proves, before each use, that every import it was built against is still the same one (`ShaderResources::Revalidate`, the serial loop over its direct regions). An epoch gate skips that loop while the import table is unchanged since the set's last proof (`HostImportsUnchanged`). That proof is also tied to the guest allocation registry's generation, so any registry change fails it for every cached set, whether or not it touched an import. Each set then runs its serial loop, and the first `HostImportSerial` call reconciles the table with a fresh lease. A title that maps and unmaps guest memory often moves the generation between most frames. Each cached set used after that pays the loop, its lock round trips and a lease, even though no import changed. This PR adds `HostImportsReconciledUnchanged`. It reconciles the import table with the registry once, if the generation moved, then accepts the proof when no import was dropped (the existing `epoch`) and none was added (a new `inserted` count, also stored in `HostImportsProof`). Reconciling is what the serial loop's first lookup already did. After it, a set whose regions are all served by imports finds the same serials exactly when no import was added or dropped. `Revalidate` uses the new check only for sets whose direct regions are all served by host imports and have no committed-span bound (`CutRegions`). Sets with a read-only image mirror region, or a region bounded by its committed span, keep the current check: their serial loop also checks things the import table does not track. The other users of `HostImportsUnchanged` (recipe presync, `Texture.cpp`) are unchanged. Test: `agc_driver_host_import_proofs` (tests/execution/HostImportProofs.cpp). It imports a window through a GPU fill and takes a proof. It then checks that: - the proof holds across an unrelated registration and its removal; - it fails once a new import is made; - it fails once the imported range is mapped again. Run with main's `HostImportsUnchanged` in place of the new check, it fails: "an unrelated registration broke the proof, although every import stayed in place". Related: #6917 (keep the lease snapshot until the registry changes) and #6951 (memoize import run bounds) make each reconcile and lookup cheaper. This PR runs them less often. The three don't touch the same lines. ### Tested Windows 11 Pro (26200), RTX 4090 (NVIDIA 616.92), i9-13900K, MinGW GCC 15.2.0: - On this head `0c2a343d25`, rebased on `main` `48c160c58b`: - `agc_driver_host_import_proofs` passes on the RTX 4090 and the UHD 770 (Intel 101.6129), under `VK_LAYER_KHRONOS_validation` with no `VUID-` line. With `HostImportsUnchanged` instead, it fails with the message above. - Full `ctest -R "^agc" -E "^agc_driver_bda_device$"` on the RTX 4090: 1078 of 1080 pass. The 2 failures, `agc_host_import_cut_lifetime` and `agc_driver_depth_plane_partial_store`, also fail on `main`. - Earlier, before the rebase: `ctest -R "agc_driver|agc_masked|agc_shader"`, 524/524 pass, 2 skipped. - GTA V (PPSA04264), open world (a story save resumed in Los Santos), measured on 2026-10-17 (current `main` stops GTA V before its menu, #11513). The build is main plus #6488, #6848 and #7189: GTA needs the first two to render, and #7189 removes the resource set rebuilds that hid this cost. Settings: `APS5_PROFILE_DRAW=1`, last 12 windows of 10 s, one run each: | | serial loops run / revalidations | revalidate time per call | committer µs per draw | draws committed / 10 s | |---|---|---|---|---| | base | 554k / 6.77M (8.2 %) | 8.25 µs | 38.2 | 219k | | this PR | 477k / 7.71M (6.2 %) | 6.67 µs | 34.4 | 240k | A stack sample of the draw committer before the change put `HostImportSerial` (with its `GuestAllocationsAcquire`) at 3 % of the committer's samples, all from this loop. The frame rate in this scene depends on where the save respawns the player (2-11 FPS within one run), so the committer figures are the comparison to read. The gain is one run each and larger than that 3 %, so take its size with care. ### Performance capture GTA V (PPSA04264), open world from the same save, RTX 4090, one warm-up run then one traced run per side, same session. Base `17eacab0ecac` = `main` 47a266cf9 + #6488 + #6848 (GTA V does not run on plain `main`) + #7189 + a local bench aid (keyboard pad input while an IME session is open). With the PR: `57dd68bc3900` = the same plus this change, cherry-picked onto that older base (one hunk adapted: only the `inserted` count). Traces: [fork release perf-7261-20261019](https://github.com/tibzejoker/AnyPS5/releases/tag/perf-7261-20261019). 320 -> 392 presents in the 60 s window, p50 189.4 -> 145.9 ms. Read this with care: in the open world frame time follows where the save respawns (2 to 11 FPS within one run), and the trace buffer of queue worker 0 fills after a few seconds (`trace_dropped`). The committer cost per draw under Tested is the measurement this PR rests on. ``` {"commit":"17eacab0ecac","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"330:60"},"gpu":"NVIDIA GeForce RTX 4090","driver":"NVIDIA 616.92","os":"Windows 10.0.26200","resolution":"3840x2160","window":{"spec":"seconds 330:60","first_present":3685,"ms":60122.222},"presents":320,"frame_ms":{"p50":189.375,"p90":205.260,"p99":262.658,"max":323.808},"gpu_busy_ms_per_present":59.736,"worker_busy_pct":{"queue worker 0x0":3147.558,"queue worker 0x38":27.952,"queue worker 0x30":10.557,"queue worker 0x20":37.712,"queue worker 0x28":21.195},"top_phases_ms_per_frame":{"Driver.EndSubmission":5734.657,"Driver.Packet":356.391,"Driver.Packet.memory_wait":179.517,"Driver.Packet.draw":153.353,"Driver.Draw":151.856,"Driver.Draw.shader_compile_and_link":103.054,"Shader.DrawStage":80.386,"Shader.DrawStage.materialize":40.876},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":3.503,"events_lost":4071991,"totals_full":false}},"trace":"aps5-trace-17eacab0ecac-29712.json.gz"} ``` ``` {"commit":"57dd68bc3900","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"330:60"},"gpu":"NVIDIA GeForce RTX 4090","driver":"NVIDIA 616.92","os":"Windows 10.0.26200","resolution":"3840x2160","window":{"spec":"seconds 330:60","first_present":4054,"ms":60030.641},"presents":392,"frame_ms":{"p50":145.892,"p90":178.473,"p99":305.486,"max":470.782},"gpu_busy_ms_per_present":59.003,"worker_busy_pct":{"queue worker 0x0":3653.455,"queue worker 0x20":37.797,"queue worker 0x38":21.886,"queue worker 0x28":22.423,"queue worker 0x30":13.899},"top_phases_ms_per_frame":{"Driver.EndSubmission":5447.114,"Driver.Packet":290.659,"Driver.Packet.memory_wait":146.116,"Driver.Packet.draw":122.834,"Driver.Draw":121.573,"Driver.Draw.shader_compile_and_link":76.443,"Shader.DrawStage":58.034,"Driver.Draw.draw_enqueued":30.671},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":3.977,"events_lost":3764105,"totals_full":false}},"trace":"aps5-trace-57dd68bc3900-39980.json.gz"} ``` ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: NVIDIA RTX 4090, driver 616.92, Windows 11; AMD RX 9070 XT (amdvlk 32.0.32015.7029, Windows 11, by bunbeans2-arch: `agc_driver_host_import_proofs` 3 of 3 on `0c2a343d25` + main `f7f03daf52`, validation on, 0 `VUID-` lines) - [x] AI-assisted: yes, AI-assisted (Claude Code) 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01XBXM4pgkMHYEtqN1EQni2P
oneandonlydean commented 2026-10-17 21:39:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-17T21:39:56Z.


Review of e039bd7eb. The production change looks sound: I found no way for a kept proof to go stale. Every path that removes an import from the table bumps the epoch, the new inserted count catches new imports, and both only increase, so an old proof can't match by accident. Locally (main + this PR, NVIDIA), the 9 import/reuse tests pass, and dropping the inserted comparison makes host_import_proofs fail, as it should.

One ask, test only: the reconcile in HostImportsReconciledUnchanged isn't pinned by a test. With the refreshImports call removed, host_import_proofs still passes. The test's "mapped again" case (Mutation().Remove + Add) is caught by the unmap hook, which retires the overlapping imports and bumps the epoch directly (GuestBufferMemory.cpp:2112-2125), so it never depends on the reconcile.

The reconcile is what catches registry changes the hook doesn't see:

  • the waiter-drop early return (:2090-2099), which returns before the import loop;
  • a run change from a neighbouring registration, where sameRun/importRun differ although nothing overlapping was removed;
  • stale failed/failedJoins entries.

Without it, a proof would be kept over an import whose registered range has changed, which is the staleness this PR has to guard against, and nothing in CI would notice if the reconcile were lost.

Could you add a case where the registry changes so that an import no longer matches its run, without the unmap hook retiring it, and require the proof to fail? One option is registering a range adjacent to the imported window's run so that importRun grows, if that holds for a non-joined import. Please check that it fails with the refreshImports line removed, the same way as for HostImportsUnchanged.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6241571834 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7261#issuecomment-6241571834). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-17T21:39:56Z. --- Review of e039bd7eb. The production change looks sound: I found no way for a kept proof to go stale. Every path that removes an import from the table bumps the epoch, the new `inserted` count catches new imports, and both only increase, so an old proof can't match by accident. Locally (main + this PR, NVIDIA), the 9 import/reuse tests pass, and dropping the `inserted` comparison makes `host_import_proofs` fail, as it should. One ask, test only: **the reconcile in `HostImportsReconciledUnchanged` isn't pinned by a test.** With the `refreshImports` call removed, `host_import_proofs` still passes. The test's "mapped again" case (`Mutation().Remove` + `Add`) is caught by the unmap hook, which retires the overlapping imports and bumps the epoch directly (GuestBufferMemory.cpp:2112-2125), so it never depends on the reconcile. The reconcile is what catches registry changes the hook doesn't see: - the waiter-drop early return (:2090-2099), which returns before the import loop; - a run change from a neighbouring registration, where `sameRun`/`importRun` differ although nothing overlapping was removed; - stale `failed`/`failedJoins` entries. Without it, a proof would be kept over an import whose registered range has changed, which is the staleness this PR has to guard against, and nothing in CI would notice if the reconcile were lost. Could you add a case where the registry changes so that an import no longer matches its run, without the unmap hook retiring it, and require the proof to fail? One option is registering a range adjacent to the imported window's run so that `importRun` grows, if that holds for a non-joined import. Please check that it fails with the `refreshImports` line removed, the same way as for `HostImportsUnchanged`.
tibzejoker commented 2026-10-17 21:47:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by tibzejoker on 2026-10-17T21:47:21Z.


Thanks for checking. You're right: the remap case goes through the unmap hook and never needs the reconcile. I'll add a case where a registry change breaks the import's run without the hook retiring it, and check that it fails both with the refreshImports line removed and with HostImportsUnchanged in its place.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6241720003 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7261#issuecomment-6241720003). Originally posted by [tibzejoker](https://github.com/tibzejoker) on 2026-10-17T21:47:21Z. --- Thanks for checking. You're right: the remap case goes through the unmap hook and never needs the reconcile. I'll add a case where a registry change breaks the import's run without the hook retiring it, and check that it fails both with the `refreshImports` line removed and with `HostImportsUnchanged` in its place. AI-assisted (Claude Code).
tibzejoker commented 2026-10-17 23:19:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by tibzejoker on 2026-10-17T23:19:31Z.


Added in 21fe671d2. ProofsFollowTheRuns registers a range of 8 MiB minus 64 KiB at the start of an 8 MiB import window, imports it and takes a proof. It then registers the missing 64 KiB right after it. Now importRun covers the whole window as one run of two ranges, so the import's sameRun no longer matches. Nothing was unmapped, so the unmap hook never runs. The proof must fail.

  • With the refreshImports line removed from HostImportsReconciledUnchanged, the test fails: "a registration completed the import window of 0x2425b800000, but the proof over its import held".
  • With it in place, the test passes.

I first tried an adjacent range after a window-sized part of a larger block. That import covers only its own window, so sameRange checks just the owner and the proof rightly holds. The window has to be completed exactly for the run to change.

ctest -R "agc_driver|agc_masked|agc_shader": 524/524 pass, 2 skipped (RTX 4090). In a second full run, agc_driver_multisample_fill_host_only failed once under -j8. It passed 3/3 when run alone. It doesn't use host import proofs.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6242989333 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7261#issuecomment-6242989333). Originally posted by [tibzejoker](https://github.com/tibzejoker) on 2026-10-17T23:19:31Z. --- Added in 21fe671d2. `ProofsFollowTheRuns` registers a range of 8 MiB minus 64 KiB at the start of an 8 MiB import window, imports it and takes a proof. It then registers the missing 64 KiB right after it. Now `importRun` covers the whole window as one run of two ranges, so the import's `sameRun` no longer matches. Nothing was unmapped, so the unmap hook never runs. The proof must fail. - With the `refreshImports` line removed from `HostImportsReconciledUnchanged`, the test fails: "a registration completed the import window of 0x2425b800000, but the proof over its import held". - With it in place, the test passes. I first tried an adjacent range after a window-sized part of a larger block. That import covers only its own window, so `sameRange` checks just the owner and the proof rightly holds. The window has to be completed exactly for the run to change. `ctest -R "agc_driver|agc_masked|agc_shader"`: 524/524 pass, 2 skipped (RTX 4090). In a second full run, `agc_driver_multisample_fill_host_only` failed once under `-j8`. It passed 3/3 when run alone. It doesn't use host import proofs. AI-assisted (Claude Code).
blawesom commented 2026-10-18 10:37:40 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-18T10:37:40Z.


Rebase handoff — rebased onto current main (all three commits, authorship unchanged). One conflict in GuestBufferMemory.cpp: the auto-merge had duplicated the import-table emplace — main's settle-block tail and your counting form ended up as two consecutive emplace calls with yours unreachable. The merged version is your [placed, added] form with the inserted counter (verified with the PR's own proof test: the counter now increments across a new import, which the dead duplicate had broken) plus main's deferred-settle bookkeeping.

Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, BUILD_TESTING=ON, AMD RX 9070 XT / RADV): builds; conventions pass; full suite green apart from the known main regression (agc_driver_tessellation segfault — Mesa, #5444), not this PR — your import-proof tests pass.

To pick it up:

git fetch https://github.com/blawesom/AnyPS5 rebase/7261
git checkout <your branch>
git merge --ff-only FETCH_HEAD

Head is b978a6b8d.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6248837148 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7261#issuecomment-6248837148). Originally posted by [blawesom](https://github.com/blawesom) on 2026-10-18T10:37:40Z. --- **Rebase handoff** — rebased onto current `main` (all three commits, authorship unchanged). One conflict in `GuestBufferMemory.cpp`: the auto-merge had **duplicated the import-table emplace** — `main`'s settle-block tail and your counting form ended up as two consecutive `emplace` calls with yours unreachable. The merged version is your `[placed, added]` form with the `inserted` counter (verified with the PR's own proof test: the counter now increments across a new import, which the dead duplicate had broken) plus `main`'s deferred-settle bookkeeping. Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, `BUILD_TESTING=ON`, AMD RX 9070 XT / RADV): builds; conventions pass; **full suite green apart from the known `main` regression** (`agc_driver_tessellation` segfault — Mesa, #5444), not this PR — your import-proof tests pass. **To pick it up:** ``` git fetch https://github.com/blawesom/AnyPS5 rebase/7261 git checkout <your branch> git merge --ff-only FETCH_HEAD ``` Head is `b978a6b8d`.
tibzejoker commented 2026-10-18 10:43:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by tibzejoker on 2026-10-18T10:43:01Z.


@blawesom thanks for the rebase and for catching the duplicated emplace. I took your tree as is (git diff against b978a6b8d is empty), with one change: the GuestBufferMemory.cpp fix now sits in the first commit instead of the third, so every commit builds without the dead second emplace. Head is now 89202144f on current main.

On Windows (MinGW GCC 15.2, RTX 4090), ctest -R agc_driver_host_import: 6/6 pass, including agc_driver_host_import_proofs. Conventions pass.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6248882619 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7261#issuecomment-6248882619). Originally posted by [tibzejoker](https://github.com/tibzejoker) on 2026-10-18T10:43:01Z. --- @blawesom thanks for the rebase and for catching the duplicated `emplace`. I took your tree as is (`git diff` against `b978a6b8d` is empty), with one change: the `GuestBufferMemory.cpp` fix now sits in the first commit instead of the third, so every commit builds without the dead second `emplace`. Head is now `89202144f` on current main. On Windows (MinGW GCC 15.2, RTX 4090), `ctest -R agc_driver_host_import`: 6/6 pass, including `agc_driver_host_import_proofs`. Conventions pass. AI-assisted (Claude Code).
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!7261
No description provided.