fix(agc): destroy settle aliases before their imports are freed #7629

Merged
EagleBearerYS merged 3 commits from upstream-pr/7629 into main 2026-10-21 17:57:40 +00:00
EagleBearerYS commented 2026-10-18 18:00:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-18T18:00:07Z.


What

A regression from our #6678. On Windows, agc_driver_host_import_lifetime (from #7339) fails on unchanged main on an AMD Radeon 860M: "host import Vulkan objects were destroyed out of order or more than once", at its first partial unmap. @LeandroLP23 reported it in #7601 and traced it there: the buffer the test tracks isn't the import's own but an alias bound to the import's memory, and two routes free that memory before the alias is destroyed. The second commit is LeandroLP23's own fix for one of them, as they posted it in #7601, with their authorship.

How it happens (main 889cee5f9f, GuestBufferMemory.cpp, Windows only):

  1. A host import under 1 MiB is settled by a batched 4-byte read (#6678). When the settle queue is in another queue family than the import's, the batch reads through an alias buffer bound to the import's memory (~990-1010), and destroys the alias when the batch is reaped.
  2. Settles go to another family when the graphics family has a single queue (VulkanDevice.cpp ~1473-1499), as on AMD's Windows driver. A device with spare graphics queues settles in the same family and makes no alias.
  3. An import retired while its batch holds it waits in the batch's retired list, and the reap destroys the aliases before it drops that list. Two routes skip that order:
    • forgetSettle (~256) hands the batch back only while the GPU is still running it. For a batch that has finished but hasn't been reaped yet, retireImport releases the import at once: its buffer is destroyed and its memory freed, and the alias goes at the next reap. LeandroLP23 found this route.
    • An unmap that needs a retired import (releaseSettleRetired, ~376-395) waits for the batch, then releases the import with the alias still bound.
  4. The test's vkBindBufferMemory hook keeps the last buffer bound to an import's memory, which is the alias. So partialUnmap sees the memory freed before that buffer is destroyed: #7601's destroyed=0 outOfOrder=1 frees=1.

As @MarcZX10 points out in #7601, Vulkan permits freeing memory while resources are still bound to it, once the commands that use them have completed. Both routes run after the batch has finished and nothing uses the alias afterwards, so this isn't a GPU hazard. LeandroLP23's trace there shows the sequence: the import's own buffer is destroyed, the memory is freed while the fixture tracks the alias (a new buffer reusing an earlier handle value), and the alias is destroyed right after, at the reap.

A fixture that tracked only the import's own buffer would pass as well, but it would no longer check the order for the alias. This change keeps the test as it is and makes both routes keep the order the reap and drain paths already keep. Which of the two to take is the maintainers' call.

The change, in three commits:

  1. releaseSettleRetired destroys a finished batch's aliases before it releases the imports the batch held.
  2. @LeandroLP23's: forgetSettle hands back any busy batch, not only a running one. An import retired after its read finished then stays with its batch until the batch is reaped or an unmap releases it, and both destroy the aliases first.
  3. agc_driver_host_import_lifetime_other_family runs the lifetime tests with the settles forced onto another queue family (settleOnOtherFamily, as agc_import_settle_deferred_other_family does), so a GPU with spare graphics queues takes the alias path too. It's registered on Windows and skips where the device has no other queue family.

Side effects:

  • A finished batch keeps its imports' Vulkan objects until it is reaped, instead of releasing them at once. Not measured.
  • On the [buffers] host imports line (APS5_PROFILE_DRAW), "retired during their read" now also counts imports retired after their read finished but before its batch was reaped. "unmaps waited for it" still counts only reads that were running.

What stays as it is: devices that settle in the import's own family, which make no alias, and Linux, which has no settle batches.

Fixes #7601

Tested

  • AMD Radeon 860M (driver 32.0.13058.8001, Windows 11), @LeandroLP23's run in #7601, on main 6efb7261b with this branch's tree: the host_import tests pass 5 runs of 5. With only the first commit, both lifetime tests fail 3 of 3; with only the second, agc_driver_host_import_lifetime fails 3 of 3. Their full agc_* run passes 715 of 717; the 2 failures fail on unchanged main there too (#6255, #5271).
  • NVIDIA GeForce RTX 3070 Laptop GPU (driver 617.42), Windows 11:
    • agc_driver_host_import_lifetime and agc_driver_host_import_lifetime_other_family pass 3 of 3 each. The forced-family test ran on the device every time, with nothing skipped.
    • With main's GuestBufferMemory.cpp and the same tests, the forced-family test fails on its first run with #7601's message. The plain test passes there, since this device settles in the import's own family.
  • AMD Radeon Graphics (Ryzen 9 5900HS, driver 31.0.21923.1000), Windows 11:
    • agc_driver_host_import_lifetime passes 3 of 3.
    • With main's GuestBufferMemory.cpp it fails with #7601's message, as on the 860M.
  • GitHub's Linux and Windows runners (fork run 39150973104):
    • The AGC tests around host imports, settles and storage (46 on Linux, 56 on Windows) pass on Linux's lavapipe. On Windows they pass or skip, since that runner has no Vulkan device.
    • There are no new failures against main. libc's precise_wait fails on Linux with main's code too.
  • Not tested: a title; Intel hardware.

Checklist

  • Based on main 889cee5f9f, and merges cleanly into 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 (none added)
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: #7601
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 3070 Laptop GPU (driver 617.42) and AMD Radeon Graphics (Ryzen 9 5900HS, driver 31.0.21923.1000), Windows 11; AMD Radeon 860M (driver 32.0.13058.8001), Windows 11 (@LeandroLP23); lavapipe (GitHub's Linux runner)
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4911451660 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7629). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-18T18:00:07Z. --- ### What A regression from our #6678. On Windows, `agc_driver_host_import_lifetime` (from #7339) fails on unchanged `main` on an AMD Radeon 860M: "host import Vulkan objects were destroyed out of order or more than once", at its first partial unmap. @LeandroLP23 reported it in #7601 and traced it there: the buffer the test tracks isn't the import's own but an alias bound to the import's memory, and two routes free that memory before the alias is destroyed. The second commit is LeandroLP23's own fix for one of them, as they posted it in [#7601](https://github.com/boykopovar/AnyPS5/issues/7601#issuecomment-6252901330), with their authorship. **How it happens** (`main` 889cee5f9f, `GuestBufferMemory.cpp`, Windows only): 1. A host import under 1 MiB is settled by a batched 4-byte read (#6678). When the settle queue is in another queue family than the import's, the batch reads through an alias buffer bound to the import's memory (~990-1010), and destroys the alias when the batch is reaped. 2. Settles go to another family when the graphics family has a single queue (`VulkanDevice.cpp` ~1473-1499), as on AMD's Windows driver. A device with spare graphics queues settles in the same family and makes no alias. 3. An import retired while its batch holds it waits in the batch's `retired` list, and the reap destroys the aliases before it drops that list. Two routes skip that order: - `forgetSettle` (~256) hands the batch back only while the GPU is still running it. For a batch that has finished but hasn't been reaped yet, `retireImport` releases the import at once: its buffer is destroyed and its memory freed, and the alias goes at the next reap. LeandroLP23 found this route. - An unmap that needs a retired import (`releaseSettleRetired`, ~376-395) waits for the batch, then releases the import with the alias still bound. 4. The test's `vkBindBufferMemory` hook keeps the last buffer bound to an import's memory, which is the alias. So `partialUnmap` sees the memory freed before that buffer is destroyed: #7601's `destroyed=0 outOfOrder=1 frees=1`. As @MarcZX10 points out in #7601, Vulkan permits freeing memory while resources are still bound to it, once the commands that use them have completed. Both routes run after the batch has finished and nothing uses the alias afterwards, so this isn't a GPU hazard. LeandroLP23's trace there shows the sequence: the import's own buffer is destroyed, the memory is freed while the fixture tracks the alias (a new buffer reusing an earlier handle value), and the alias is destroyed right after, at the reap. A fixture that tracked only the import's own buffer would pass as well, but it would no longer check the order for the alias. This change keeps the test as it is and makes both routes keep the order the reap and drain paths already keep. Which of the two to take is the maintainers' call. **The change, in three commits:** 1. `releaseSettleRetired` destroys a finished batch's aliases before it releases the imports the batch held. 2. @LeandroLP23's: `forgetSettle` hands back any busy batch, not only a running one. An import retired after its read finished then stays with its batch until the batch is reaped or an unmap releases it, and both destroy the aliases first. 3. `agc_driver_host_import_lifetime_other_family` runs the lifetime tests with the settles forced onto another queue family (`settleOnOtherFamily`, as `agc_import_settle_deferred_other_family` does), so a GPU with spare graphics queues takes the alias path too. It's registered on Windows and skips where the device has no other queue family. **Side effects:** - A finished batch keeps its imports' Vulkan objects until it is reaped, instead of releasing them at once. Not measured. - On the `[buffers]` host imports line (`APS5_PROFILE_DRAW`), "retired during their read" now also counts imports retired after their read finished but before its batch was reaped. "unmaps waited for it" still counts only reads that were running. **What stays as it is:** devices that settle in the import's own family, which make no alias, and Linux, which has no settle batches. Fixes #7601 ### Tested - **AMD Radeon 860M** (driver 32.0.13058.8001, Windows 11), @LeandroLP23's run in [#7601](https://github.com/boykopovar/AnyPS5/issues/7601#issuecomment-6252901330), on `main` 6efb7261b with this branch's tree: the `host_import` tests pass 5 runs of 5. With only the first commit, both lifetime tests fail 3 of 3; with only the second, `agc_driver_host_import_lifetime` fails 3 of 3. Their full `agc_*` run passes 715 of 717; the 2 failures fail on unchanged `main` there too (#6255, #5271). - **NVIDIA GeForce RTX 3070 Laptop GPU** (driver 617.42), Windows 11: - `agc_driver_host_import_lifetime` and `agc_driver_host_import_lifetime_other_family` pass 3 of 3 each. The forced-family test ran on the device every time, with nothing skipped. - With `main`'s `GuestBufferMemory.cpp` and the same tests, the forced-family test fails on its first run with #7601's message. The plain test passes there, since this device settles in the import's own family. - **AMD Radeon Graphics** (Ryzen 9 5900HS, driver 31.0.21923.1000), Windows 11: - `agc_driver_host_import_lifetime` passes 3 of 3. - With `main`'s `GuestBufferMemory.cpp` it fails with #7601's message, as on the 860M. - **GitHub's Linux and Windows runners** ([fork run 39150973104](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39150973104)): - The AGC tests around host imports, settles and storage (46 on Linux, 56 on Windows) pass on Linux's lavapipe. On Windows they pass or skip, since that runner has no Vulkan device. - There are no new failures against `main`. libc's `precise_wait` fails on Linux with `main`'s code too. - **Not tested:** a title; Intel hardware. ### Checklist - [x] Based on `main` 889cee5f9f, and merges cleanly into 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 (none added) - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: #7601 - [x] Unblocks: none - [x] GPUs tested: NVIDIA GeForce RTX 3070 Laptop GPU (driver 617.42) and AMD Radeon Graphics (Ryzen 9 5900HS, driver 31.0.21923.1000), Windows 11; AMD Radeon 860M (driver 32.0.13058.8001), Windows 11 (@LeandroLP23); lavapipe (GitHub's Linux runner) - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-18 18:10:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-18T18:10:26Z.


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 8527 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp L9965
PR 8672 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp L9965

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 1368 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 1395 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 2434 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 4448 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 4449 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 5021 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 5371 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 5372 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 5431 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 5499 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 5925 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6044 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6186 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6187 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6188 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6192 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6197 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6209 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6280 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6300 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6412 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6481 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6501 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6548 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6747 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6788 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6808 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6868 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6918 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6946 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6947 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6971 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 7048 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 7201 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7275 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7310 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7505 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 7514 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7604 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 7800 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 8014 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 8246 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 8484 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 8552 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 8564 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 8592 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 9020 core/libs/prx/libSceAgcDriver/CMakeLists.txt
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6253350366 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7629#issuecomment-6253350366). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-18T18:10:26Z. --- <!-- pr-overlap --> 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 8527](https://www.github.com/boykopovar/AnyPS5/pull/8527) | `core/libs/prx/libSceAgcDriver/tests/Recorder.cpp` [L9965](https://github.com/boykopovar/AnyPS5/blob/950388bfd242c0939536d40ce8cc170d2bf069a1/core/libs/prx/libSceAgcDriver/tests/Recorder.cpp#L9965) | | | | [PR 8672](https://www.github.com/boykopovar/AnyPS5/pull/8672) | `core/libs/prx/libSceAgcDriver/tests/Recorder.cpp` [L9965](https://github.com/boykopovar/AnyPS5/blob/950388bfd242c0939536d40ce8cc170d2bf069a1/core/libs/prx/libSceAgcDriver/tests/Recorder.cpp#L9965) | | | 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](https://www.github.com/boykopovar/AnyPS5/pull/1191) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 1368](https://www.github.com/boykopovar/AnyPS5/pull/1368) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/tests/Recorder.cpp` | | [PR 1395](https://www.github.com/boykopovar/AnyPS5/pull/1395) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/tests/Recorder.cpp` | | [PR 2434](https://www.github.com/boykopovar/AnyPS5/pull/2434) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 4448](https://www.github.com/boykopovar/AnyPS5/pull/4448) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 4449](https://www.github.com/boykopovar/AnyPS5/pull/4449) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 5021](https://www.github.com/boykopovar/AnyPS5/pull/5021) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Recorder.cpp` | | [PR 5371](https://www.github.com/boykopovar/AnyPS5/pull/5371) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 5372](https://www.github.com/boykopovar/AnyPS5/pull/5372) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 5431](https://www.github.com/boykopovar/AnyPS5/pull/5431) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 5499](https://www.github.com/boykopovar/AnyPS5/pull/5499) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 5925](https://www.github.com/boykopovar/AnyPS5/pull/5925) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/tests/Recorder.cpp` | | [PR 6044](https://www.github.com/boykopovar/AnyPS5/pull/6044) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6186](https://www.github.com/boykopovar/AnyPS5/pull/6186) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Recorder.cpp` | | [PR 6187](https://www.github.com/boykopovar/AnyPS5/pull/6187) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/tests/Recorder.cpp` | | [PR 6188](https://www.github.com/boykopovar/AnyPS5/pull/6188) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/tests/Recorder.cpp` | | [PR 6192](https://www.github.com/boykopovar/AnyPS5/pull/6192) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/tests/Recorder.cpp` | | [PR 6197](https://www.github.com/boykopovar/AnyPS5/pull/6197) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 6209](https://www.github.com/boykopovar/AnyPS5/pull/6209) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/tests/Recorder.cpp` | | [PR 6280](https://www.github.com/boykopovar/AnyPS5/pull/6280) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6300](https://www.github.com/boykopovar/AnyPS5/pull/6300) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6412](https://www.github.com/boykopovar/AnyPS5/pull/6412) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6481](https://www.github.com/boykopovar/AnyPS5/pull/6481) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 6501](https://www.github.com/boykopovar/AnyPS5/pull/6501) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6548](https://www.github.com/boykopovar/AnyPS5/pull/6548) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 6747](https://www.github.com/boykopovar/AnyPS5/pull/6747) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/tests/Recorder.cpp` | | [PR 6788](https://www.github.com/boykopovar/AnyPS5/pull/6788) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6808](https://www.github.com/boykopovar/AnyPS5/pull/6808) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6868](https://www.github.com/boykopovar/AnyPS5/pull/6868) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/tests/Recorder.cpp` | | [PR 6918](https://www.github.com/boykopovar/AnyPS5/pull/6918) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 6946](https://www.github.com/boykopovar/AnyPS5/pull/6946) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/tests/Recorder.cpp` | | [PR 6947](https://www.github.com/boykopovar/AnyPS5/pull/6947) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Recorder.cpp` | | [PR 6971](https://www.github.com/boykopovar/AnyPS5/pull/6971) | `core/libs/prx/libSceAgcDriver/tests/Recorder.cpp` | | [PR 7048](https://www.github.com/boykopovar/AnyPS5/pull/7048) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/tests/Recorder.cpp` | | [PR 7201](https://www.github.com/boykopovar/AnyPS5/pull/7201) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 7275](https://www.github.com/boykopovar/AnyPS5/pull/7275) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7310](https://www.github.com/boykopovar/AnyPS5/pull/7310) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7505](https://www.github.com/boykopovar/AnyPS5/pull/7505) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/tests/Recorder.cpp` | | [PR 7514](https://www.github.com/boykopovar/AnyPS5/pull/7514) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 7604](https://www.github.com/boykopovar/AnyPS5/pull/7604) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/tests/Recorder.cpp` | | [PR 7800](https://www.github.com/boykopovar/AnyPS5/pull/7800) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 8014](https://www.github.com/boykopovar/AnyPS5/pull/8014) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 8246](https://www.github.com/boykopovar/AnyPS5/pull/8246) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 8484](https://www.github.com/boykopovar/AnyPS5/pull/8484) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/tests/Recorder.cpp` | | [PR 8552](https://www.github.com/boykopovar/AnyPS5/pull/8552) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 8564](https://www.github.com/boykopovar/AnyPS5/pull/8564) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 8592](https://www.github.com/boykopovar/AnyPS5/pull/8592) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 9020](https://www.github.com/boykopovar/AnyPS5/pull/9020) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` |
MarcZX10 commented 2026-10-18 18:22:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T18:22:33Z.

Review: APPROVED


Reviewed the lifetime paths and the diff. Keeping any busy settle batch with its retired imports covers the completed-but-not-yet-reaped case, and releasing the aliases before dropping overlapping retired imports covers partial unmap. The other-family Windows test exercises the alias path on devices that otherwise settle on the graphics family. I did not run the Windows GPU tests locally; the reported 860M and RTX 3070 results provide the hardware validation for this review.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5564258208 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7629#pullrequestreview-5564258208). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-18T18:22:33Z. **Review:** APPROVED --- Reviewed the lifetime paths and the diff. Keeping any busy settle batch with its retired imports covers the completed-but-not-yet-reaped case, and releasing the aliases before dropping overlapping retired imports covers partial unmap. The other-family Windows test exercises the alias path on devices that otherwise settle on the graphics family. I did not run the Windows GPU tests locally; the reported 860M and RTX 3070 results provide the hardware validation for this review.
LeandroLP23 commented 2026-10-18 18:28:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-18T18:28:32Z.


Rechecked the PR head 8a1e73718 on the 860M. Radeon 860M (RDNA 3.5, driver 32.0.13058.8001), Windows 11 26300, WinLibs GCC 15.2.0 r7, Release, BUILD_TESTING=ON. Build: main c3591adf9 with #7629, #7630 and #7627 merged together (each merge clean, built once).

The 11 host_import tests, among them agc_driver_host_import_lifetime and agc_driver_host_import_lifetime_other_family, and agc_import_settle_deferred_other_family pass 3 runs of 3. agc_host_import_sparse skips itself as before.

AI-assisted

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6253535024 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7629#issuecomment-6253535024). Originally posted by [LeandroLP23](https://github.com/LeandroLP23) on 2026-10-18T18:28:32Z. --- Rechecked the PR head `8a1e73718` on the 860M. Radeon 860M (RDNA 3.5, driver 32.0.13058.8001), Windows 11 26300, WinLibs GCC 15.2.0 r7, Release, `BUILD_TESTING=ON`. Build: `main` `c3591adf9` with #7629, #7630 and #7627 merged together (each merge clean, built once). The 11 `host_import` tests, among them `agc_driver_host_import_lifetime` and `agc_driver_host_import_lifetime_other_family`, and `agc_import_settle_deferred_other_family` pass 3 runs of 3. `agc_host_import_sparse` skips itself as before. AI-assisted
adriadam10 commented 2026-10-21 17:59:03 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-21T17:59:03Z.


Re-checked against current main: the merge is clean, and the recent merges only add unrelated test registrations to the AgcDriver CMakeLists.txt; the settle-batch paths this changes (forgetSettle, releaseSettleRetired, batch aliases) are untouched. Aliases are destroyed before the imports of a finished batch are released, the same order reap and drain keep; the forced-family test covers the alias path, and the hardware results in the thread (860M, RTX 3070, 5900HS, UHD 770, RX 9070 XT) agree; merged.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6322894986 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7629#issuecomment-6322894986). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-21T17:59:03Z. --- Re-checked against current `main`: the merge is clean, and the recent merges only add unrelated test registrations to the AgcDriver `CMakeLists.txt`; the settle-batch paths this changes (`forgetSettle`, `releaseSettleRetired`, batch aliases) are untouched. Aliases are destroyed before the imports of a finished batch are released, the same order reap and drain keep; the forced-family test covers the alias path, and the hardware results in the thread (860M, RTX 3070, 5900HS, UHD 770, RX 9070 XT) agree; merged.
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!7629
No description provided.