fix(agc): retire host imports before range cuts #7849

Merged
MarcZX10 merged 6 commits from upstream-pr/7849 into main 2026-10-21 18:09:59 +00:00
MarcZX10 commented 2026-10-19 10:55:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-19T10:55:34Z.


What

Retire a host pointer import completely when mprotect or munmap changes any part of its imported range. The old trim path preserved the original VkDeviceMemory across a partial cut, so Vulkan could retain an import whose host extent now included inaccessible or unmapped pages. VK_EXT_external_memory_host requires the imported range to remain valid and accessible until the memory object is destroyed (Vulkan specification). This matches the RADV EFAULT report in #7784. Surviving ranges are imported afresh on next use; this trades the trim optimization for correct host pointer lifetime.

The regression verifies that an import spanning a partial unmap is retired and that a retained prefix can be imported again. A separate partial-protection case verifies that the import does not cover the changed range. The cached-address-space fast path also retires any overlapping host import after dropping its cached lease.

Tested

  • Rebased the five implementation commits onto current upstream main at cecb540a63f614d2b06cbb557c6d1f6f02475fa3; all five are authored by MarcZX10. The budget-aware benchmark follow-up is also authored by MarcZX10.
  • On the rebased head, git diff --check upstream/main...HEAD and python3 tools/check_conventions.py --base upstream/main --head HEAD pass.
  • The following runtime reports are for the previous PR head 5338420704b0bdd9cb95055b11e6e76682184efd, before this rebase; they do not validate the current head:
    • Reviewer Simon B. reported nine selected guest-memory/host-import cases passing three times each on NVIDIA RTX 3090, RADV and lavapipe. Restoring only the old GuestBufferMemory.cpp reproduced the host-import lifetime failure; the corrected prior head passed the targeted control cases.
    • Reviewer Chuk49 reported 17/17 selected tests across three runs on AMD Radeon 8060S/RADV with the validation layer loaded, and zero VUIDs on the PR head. The base run had 16/17 pass with the issue-matching failure and two VUIDs.
    • Reviewer Screamm reported the cut/reimport cases and host-import lifetime test passing 3/3 on Windows 11/RTX 4070. The prior head's broad GPU suite was 601/604; all three failures also occurred on main. No validation layer was available.
  • Prior exact-head Linux verification by reviewer root-over tested PR head d96a03c62 before this rebase. On that head, the 18 focused guest_memory_lifetime|host_import|agc_driver_recorder tests passed three times each on lavapipe and RADV Renoir with validation enabled and no VUID- lines; the RADV main control reproduced #7784. This report does not validate the current rebased head. Full report.
  • Before the rebase, built PR head d96a03c628ec1125972945c3ed6f4a230ba384c4 on Linux x86-64 with GCC 12.2.0, Release, BUILD_TESTING=ON; agc_driver_guest_memory_lifetime_tests and its dependencies linked successfully (785 Ninja steps). This build does not validate the current head.
  • My local attempt to run agc_driver_guest_memory_lifetime_{copy,direct,locked,heap} under CTest with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation aborts before Vulkan initialization because this Intel Xeon E5-1620 v2 lacks LZCNT, BMI1, BMI2, MOVBE, AVX2 and FMA. This host could not provide a runtime or validation-layer result. Windows title behavior, performance and the full suite were not tested.
  • On the current rebased head, cmake --build build-review --target agc_driver_recorder_tests -j4 completed successfully on Linux x86-64 with GCC 12.2.0 (812 Ninja steps). CMake does not register agc_reimport_bench on Linux; that benchmark is Windows-only, so its budget-skip path was not executed locally. It needs an exact-head Windows run on a host with less than 1,382 MiB of remaining host-import budget to verify the skip, plus a run with sufficient budget to verify normal benchmark behavior. git diff --check and python3 tools/check_conventions.py --base upstream/main --head HEAD pass.

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: #7784
  • Unblocks: none
  • GPUs tested: NVIDIA RTX 3090, AMD/RADV Radeon 8060S, AMD/RADV Radeon Renoir, Windows RTX 4070, AMD RX 6650 XT, lavapipe
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4919828310 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7849). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-19T10:55:34Z. --- ### What Retire a host pointer import completely when `mprotect` or `munmap` changes any part of its imported range. The old trim path preserved the original `VkDeviceMemory` across a partial cut, so Vulkan could retain an import whose host extent now included inaccessible or unmapped pages. `VK_EXT_external_memory_host` requires the imported range to remain valid and accessible until the memory object is destroyed ([Vulkan specification](https://docs.vulkan.org/refpages/latest/refpages/source/VkImportMemoryHostPointerInfoEXT.html)). This matches the RADV `EFAULT` report in #7784. Surviving ranges are imported afresh on next use; this trades the trim optimization for correct host pointer lifetime. The regression verifies that an import spanning a partial unmap is retired and that a retained prefix can be imported again. A separate partial-protection case verifies that the import does not cover the changed range. The cached-address-space fast path also retires any overlapping host import after dropping its cached lease. ### Tested - Rebased the five implementation commits onto current upstream `main` at `cecb540a63f614d2b06cbb557c6d1f6f02475fa3`; all five are authored by MarcZX10. The budget-aware benchmark follow-up is also authored by MarcZX10. - On the rebased head, `git diff --check upstream/main...HEAD` and `python3 tools/check_conventions.py --base upstream/main --head HEAD` pass. - The following runtime reports are for the previous PR head `5338420704b0bdd9cb95055b11e6e76682184efd`, before this rebase; they do not validate the current head: - Reviewer Simon B. reported nine selected guest-memory/host-import cases passing three times each on NVIDIA RTX 3090, RADV and lavapipe. Restoring only the old `GuestBufferMemory.cpp` reproduced the host-import lifetime failure; the corrected prior head passed the targeted control cases. - Reviewer Chuk49 reported 17/17 selected tests across three runs on AMD Radeon 8060S/RADV with the validation layer loaded, and zero VUIDs on the PR head. The base run had 16/17 pass with the issue-matching failure and two VUIDs. - Reviewer Screamm reported the cut/reimport cases and host-import lifetime test passing 3/3 on Windows 11/RTX 4070. The prior head's broad GPU suite was 601/604; all three failures also occurred on main. No validation layer was available. - Prior exact-head Linux verification by reviewer `root-over` tested PR head `d96a03c62` before this rebase. On that head, the 18 focused `guest_memory_lifetime|host_import|agc_driver_recorder` tests passed three times each on lavapipe and RADV Renoir with validation enabled and no `VUID-` lines; the RADV `main` control reproduced #7784. This report does not validate the current rebased head. [Full report](https://github.com/boykopovar/AnyPS5/pull/7849#issuecomment-6310455217). - Before the rebase, built PR head `d96a03c628ec1125972945c3ed6f4a230ba384c4` on Linux x86-64 with GCC 12.2.0, Release, `BUILD_TESTING=ON`; `agc_driver_guest_memory_lifetime_tests` and its dependencies linked successfully (785 Ninja steps). This build does not validate the current head. - My local attempt to run `agc_driver_guest_memory_lifetime_{copy,direct,locked,heap}` under CTest with `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1` and `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation` aborts before Vulkan initialization because this Intel Xeon E5-1620 v2 lacks LZCNT, BMI1, BMI2, MOVBE, AVX2 and FMA. This host could not provide a runtime or validation-layer result. Windows title behavior, performance and the full suite were not tested. - On the current rebased head, `cmake --build build-review --target agc_driver_recorder_tests -j4` completed successfully on Linux x86-64 with GCC 12.2.0 (812 Ninja steps). CMake does not register `agc_reimport_bench` on Linux; that benchmark is Windows-only, so its budget-skip path was not executed locally. It needs an exact-head Windows run on a host with less than 1,382 MiB of remaining host-import budget to verify the skip, plus a run with sufficient budget to verify normal benchmark behavior. `git diff --check` and `python3 tools/check_conventions.py --base upstream/main --head HEAD` pass. ### 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: #7784 - [x] Unblocks: none - [x] GPUs tested: NVIDIA RTX 3090, AMD/RADV Radeon 8060S, AMD/RADV Radeon Renoir, Windows RTX 4070, AMD RX 6650 XT, lavapipe - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-19 11:04:58 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-19T11:04:58Z.


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 9012 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp L463-520, L2013-2022

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/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 4448 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 4449 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
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
docs/dev/ARCHITECTURE.md
PR 6044 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/ARCHITECTURE.md
PR 6186 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
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/include/GuestBufferMemory.hpp
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
docs/dev/ARCHITECTURE.md
PR 6481 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
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
docs/dev/ARCHITECTURE.md
PR 6947 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/ARCHITECTURE.md
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 7508 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7514 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7604 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 7642 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/ARCHITECTURE.md
PR 7684 docs/dev/ARCHITECTURE.md
PR 7800 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 8014 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 8484 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 8527 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/ARCHITECTURE.md
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 8672 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/ARCHITECTURE.md
PR 9020 core/libs/prx/libSceAgcDriver/CMakeLists.txt
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6265731992 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7849#issuecomment-6265731992). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-19T11:04:58Z. --- <!-- 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 9012](https://www.github.com/boykopovar/AnyPS5/pull/9012) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` [L463-520](https://github.com/boykopovar/AnyPS5/blob/95d17687aed6bad81082d9bbef01cb1d9c0a384c/core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp#L463-L520), [L2013-2022](https://github.com/boykopovar/AnyPS5/blob/95d17687aed6bad81082d9bbef01cb1d9c0a384c/core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp#L2013-L2022) | | | 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/include/GuestBufferMemory.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 4448](https://www.github.com/boykopovar/AnyPS5/pull/4448) | `core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 4449](https://www.github.com/boykopovar/AnyPS5/pull/4449) | `core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp`<br>`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`<br>`docs/dev/ARCHITECTURE.md` | | [PR 6044](https://www.github.com/boykopovar/AnyPS5/pull/6044) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`docs/dev/ARCHITECTURE.md` | | [PR 6186](https://www.github.com/boykopovar/AnyPS5/pull/6186) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp`<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/include/GuestBufferMemory.hpp`<br>`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`<br>`docs/dev/ARCHITECTURE.md` | | [PR 6481](https://www.github.com/boykopovar/AnyPS5/pull/6481) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp`<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`<br>`docs/dev/ARCHITECTURE.md` | | [PR 6947](https://www.github.com/boykopovar/AnyPS5/pull/6947) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Recorder.cpp`<br>`docs/dev/ARCHITECTURE.md` | | [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 7508](https://www.github.com/boykopovar/AnyPS5/pull/7508) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7514](https://www.github.com/boykopovar/AnyPS5/pull/7514) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp`<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 7642](https://www.github.com/boykopovar/AnyPS5/pull/7642) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Recorder.cpp`<br>`docs/dev/ARCHITECTURE.md` | | [PR 7684](https://www.github.com/boykopovar/AnyPS5/pull/7684) | `docs/dev/ARCHITECTURE.md` | | [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 8484](https://www.github.com/boykopovar/AnyPS5/pull/8484) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/tests/Recorder.cpp` | | [PR 8527](https://www.github.com/boykopovar/AnyPS5/pull/8527) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Recorder.cpp`<br>`docs/dev/ARCHITECTURE.md` | | [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 8672](https://www.github.com/boykopovar/AnyPS5/pull/8672) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Recorder.cpp`<br>`docs/dev/ARCHITECTURE.md` | | [PR 9020](https://www.github.com/boykopovar/AnyPS5/pull/9020) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` |
savvaniss commented 2026-10-19 14:32:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by savvaniss on 2026-10-19T14:32:24Z.


AMD and Intel Windows data: on main 85029a00f, this PR fixes agc_driver_host_import_lifetime and, on AMD, agc_reimport_bench. Its updated agc_driver_guest_memory_lifetime still fails with the PR, on an AMD RX 9070 XT and an Intel UHD 770.

Windows 11 Pro 26300, WinLibs GCC 15.2.0 r7, Release, every execution test built, ANYPS5_NO_SHADER_CACHE=1, serial CTest. Intel UHD Graphics 770 (8086:a780), driver 32.0.101.7088. AMD Radeon RX 9070 XT (1002:7550), driver 32.0.31041.1004, with VkCache emptied first. This head ffa5c41ef merged into main 85029a00f. "Without" means only this PR's diff to tests/HostImportLifetime.cpp, tests/Recorder.cpp and tests/execution/GuestMemoryLifetime.cpp, applied to main 85029a00f.

Tests, ×3 UHD 770 RX 9070 XT
This head: the 68 tests built from those files 67 pass (12 host-import tests skip, as on main); agc_driver_guest_memory_lifetime fails 67 pass; agc_driver_guest_memory_lifetime fails
Without agc_driver_host_import_lifetime fails: guest mutation reached host apply before vkFreeMemory completed; agc_driver_guest_memory_lifetime fails the same two fail, and agc_reimport_bench: a cut kept memory imported across the changed host range instead of importing the remaining side again

agc_driver_guest_memory_lifetime fails the same way in all four runs: guest memory host import lifetime: middle unmap left the original host import alive across the unmapped range. On main alone, with its own copy of the test, it passes. So the updated assertion doesn't hold on current main even with this change. Something merged after this PR's base b62e0a8a7 may keep the import across a middle unmap.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6269724710 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7849#issuecomment-6269724710). Originally posted by [savvaniss](https://github.com/savvaniss) on 2026-10-19T14:32:24Z. --- AMD and Intel Windows data: on `main` `85029a00f`, this PR fixes `agc_driver_host_import_lifetime` and, on AMD, `agc_reimport_bench`. Its updated `agc_driver_guest_memory_lifetime` still fails with the PR, on an AMD RX 9070 XT and an Intel UHD 770. Windows 11 Pro 26300, WinLibs GCC 15.2.0 r7, Release, every execution test built, `ANYPS5_NO_SHADER_CACHE=1`, serial CTest. Intel UHD Graphics 770 (`8086:a780`), driver 32.0.101.7088. AMD Radeon RX 9070 XT (`1002:7550`), driver 32.0.31041.1004, with `VkCache` emptied first. This head `ffa5c41ef` merged into `main` `85029a00f`. "Without" means only this PR's diff to `tests/HostImportLifetime.cpp`, `tests/Recorder.cpp` and `tests/execution/GuestMemoryLifetime.cpp`, applied to `main` `85029a00f`. | Tests, ×3 | UHD 770 | RX 9070 XT | |---|---|---| | This head: the 68 tests built from those files | 67 pass (12 host-import tests skip, as on `main`); `agc_driver_guest_memory_lifetime` fails | 67 pass; `agc_driver_guest_memory_lifetime` fails | | Without | `agc_driver_host_import_lifetime` fails: `guest mutation reached host apply before vkFreeMemory completed`; `agc_driver_guest_memory_lifetime` fails | the same two fail, and `agc_reimport_bench`: `a cut kept memory imported across the changed host range instead of importing the remaining side again` | `agc_driver_guest_memory_lifetime` fails the same way in all four runs: `guest memory host import lifetime: middle unmap left the original host import alive across the unmapped range`. On `main` alone, with its own copy of the test, it passes. So the updated assertion doesn't hold on current `main` even with this change. Something merged after this PR's base `b62e0a8a7` may keep the import across a middle unmap. AI-assisted: yes (Claude Code)
MarcZX10 commented 2026-10-19 15:59:06 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-19T15:59:06Z.


I rebased this PR onto current main (d047690c63) without conflicts; updated head is d2902009ee. The focused agc_driver_guest_memory_lifetime_tests target and its fixture build successfully on Linux, and conventions plus git diff --check pass. I could not execute the runtime CTest here because this Xeon host lacks the LZCNT, BMI1/2, MOVBE, AVX2 and FMA features the test requires. The Windows report still identifies the exact assertion failure, so I have not marked it resolved. Could you rerun agc_driver_guest_memory_lifetime on the updated head on either of the reported GPUs to check whether the current-main rebase changes that result?

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6271474516 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7849#issuecomment-6271474516). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-19T15:59:06Z. --- I rebased this PR onto current `main` (`d047690c63`) without conflicts; updated head is `d2902009ee`. The focused `agc_driver_guest_memory_lifetime_tests` target and its fixture build successfully on Linux, and conventions plus `git diff --check` pass. I could not execute the runtime CTest here because this Xeon host lacks the LZCNT, BMI1/2, MOVBE, AVX2 and FMA features the test requires. The Windows report still identifies the exact assertion failure, so I have not marked it resolved. Could you rerun `agc_driver_guest_memory_lifetime` on the updated head on either of the reported GPUs to check whether the current-main rebase changes that result?
MarcZX10 commented 2026-10-19 17:38:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-19T17:38:13Z.


Thanks for the exact AMD and Intel results. I traced the current-main regression to the pin waiter’s cache-drop fast path: it returned immediately after dropping Spaces().current, before retiring a host import that overlapped the mutation.

I updated the path in 3648e3b1fd so it keeps the cache-only fast return when there is no overlapping import, and continues through normal retirement when there is one. The branch is rebased onto current main b6583dd868.

The Linux Release builds for agc_driver_guest_memory_lifetime_tests and agc_driver_recorder_tests pass, as do conventions, diff-check and the overlap check. Both relevant CTests abort at startup on this Xeon because it lacks LZCNT, BMI1/2, MOVBE, AVX2 and FMA, before reaching assertions or Vulkan. Could you rerun agc_driver_guest_memory_lifetime on either reported Windows GPU against this head to check whether the stale-import failure is fixed?

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6273368793 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7849#issuecomment-6273368793). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-19T17:38:13Z. --- Thanks for the exact AMD and Intel results. I traced the current-main regression to the pin waiter’s cache-drop fast path: it returned immediately after dropping `Spaces().current`, before retiring a host import that overlapped the mutation. I updated the path in `3648e3b1fd` so it keeps the cache-only fast return when there is no overlapping import, and continues through normal retirement when there is one. The branch is rebased onto current `main` `b6583dd868`. The Linux Release builds for `agc_driver_guest_memory_lifetime_tests` and `agc_driver_recorder_tests` pass, as do conventions, diff-check and the overlap check. Both relevant CTests abort at startup on this Xeon because it lacks LZCNT, BMI1/2, MOVBE, AVX2 and FMA, before reaching assertions or Vulkan. Could you rerun `agc_driver_guest_memory_lifetime` on either reported Windows GPU against this head to check whether the stale-import failure is fixed?
adriadam10 commented 2026-10-19 18:00:15 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-19T18:00:15Z.

Review: CHANGES_REQUESTED


Thanks for tracing this. Retiring the whole import on any cut is the right direction for VK_EXT_external_memory_host, but the head still fails its own test on CI's driver.

  • agc_driver_guest_memory_lifetime fails on lavapipe (the Linux CI configuration, this PR merged onto current main, agc_driver_guest_memory_lifetime_copy/_heap/_converted etc. pass, and the test passes on main): guest memory host import lifetime: middle unmap left the original host import alive across the unmapped range, from the new assertion at tests/execution/GuestMemoryLifetime.cpp:115. After munmap_nid_postfix(middle, BlockBytes), Imported(device, mapping) is still true, so the prefix import was not retired by the middle unmap on that path. Please check which branch of WaitForLeasesAndImports the unmap takes there (the cache-drop fast path or the import loop) and why the overlap check or retireImport does not catch the prefix import.
  • docs/dev/ARCHITECTURE.md:132 still describes retireOrTrim, HostImports::trimmed and reattachTrimmed; it should say that a cut retires the import and the surviving ranges are imported again.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5575624866 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7849#pullrequestreview-5575624866). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-19T18:00:15Z. **Review:** CHANGES_REQUESTED --- Thanks for tracing this. Retiring the whole import on any cut is the right direction for `VK_EXT_external_memory_host`, but the head still fails its own test on CI's driver. - `agc_driver_guest_memory_lifetime` fails on lavapipe (the Linux CI configuration, this PR merged onto current `main`, `agc_driver_guest_memory_lifetime_copy/_heap/_converted` etc. pass, and the test passes on `main`): `guest memory host import lifetime: middle unmap left the original host import alive across the unmapped range`, from the new assertion at `tests/execution/GuestMemoryLifetime.cpp:115`. After `munmap_nid_postfix(middle, BlockBytes)`, `Imported(device, mapping)` is still true, so the prefix import was not retired by the middle unmap on that path. Please check which branch of `WaitForLeasesAndImports` the unmap takes there (the cache-drop fast path or the import loop) and why the overlap check or `retireImport` does not catch the prefix import. - `docs/dev/ARCHITECTURE.md:132` still describes `retireOrTrim`, `HostImports::trimmed` and `reattachTrimmed`; it should say that a cut retires the import and the surviving ranges are imported again.
MarcZX10 commented 2026-10-19 19:15:58 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-19T19:15:58Z.


I traced the lavapipe failure to the test sequence rather than an import crossing the unmapped hole. Imported(device, mapping) checks whether an import contains that address; after the test protects the middle block read-only and then calls Fill(device, mapping), importRun() creates a valid import for the readable prefix. The later middle unmap does not overlap that prefix import, so the old assertion was testing the wrong condition. I split protection and middle-unmap coverage into independent cases: the unmap case starts with one import covering all three blocks and then asserts that no import covers the full range after the middle is unmapped; it separately confirms the retained prefix can be imported again. I also updated the stale architecture description. The updated head is rebased onto current main. git diff --check and python3 tools/check_conventions.py --base upstream/main pass. I could not build/run the AGC execution target in this worktree: this configuration is relinker-only, and the full AGC configure is blocked by missing XRandR development support; no runtime result claimed.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6275242967 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7849#issuecomment-6275242967). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-19T19:15:58Z. --- I traced the lavapipe failure to the test sequence rather than an import crossing the unmapped hole. `Imported(device, mapping)` checks whether an import contains that address; after the test protects the middle block read-only and then calls `Fill(device, mapping)`, `importRun()` creates a valid import for the readable prefix. The later middle unmap does not overlap that prefix import, so the old assertion was testing the wrong condition. I split protection and middle-unmap coverage into independent cases: the unmap case starts with one import covering all three blocks and then asserts that no import covers the full range after the middle is unmapped; it separately confirms the retained prefix can be imported again. I also updated the stale architecture description. The updated head is rebased onto current main. `git diff --check` and `python3 tools/check_conventions.py --base upstream/main` pass. I could not build/run the AGC execution target in this worktree: this configuration is relinker-only, and the full AGC configure is blocked by missing XRandR development support; no runtime result claimed.
JJenkx commented 2026-10-19 19:42:11 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-19T19:42:11Z.


Hardware validation on AMD RX 6650 XT, RADV Mesa 26.2.4-arch1.1, Ryzen 9 7950X, Arch Linux 7.2.9, GCC 16.2.1 Release, 2026-10-19.

Compared main da3ea52b53d9d0fb0b4938035798de7c765a2341 with this PR's three commits at author head 1ead0f921b72b97d0acf9140a55179063a79090e, applied onto that main as 4a608ccfa9ad5f706a2bc84de1d972c5ae241c31. No other PR was included.

Required Vulkan, shader cache disabled, Khronos validation enabled. Enabled the real execution sources for GuestMemoryLifetime, HostImportAtMap, HostImportTeardown, HostImportWindows and PipelinedDispatch before building. All 18 selected cases executed in each comparison; no skips or missing-layer messages.

Build Result Validation
Original main 17/18 pass agc_driver_guest_memory_lifetime fails; VUID-vkResetFences-pFences-01123 after device loss
Main + only this PR's three test-file changes (02fccad99dad296d047627df2ecc4fcd47525870) 16/18 pass Also catches agc_driver_host_import_lifetime: guest mutation reached host apply before vkFreeMemory completed
Main + complete PR 18/18 pass, 8.23 s No VUIDs

The baseline GPU failure rejects a submission with -14, then reports guest prefix unmap failed. Both that hardware failure and the added retirement-order regression disappear with the complete patch. This verifies the tests catch the old behavior rather than merely passing on both builds. Includes graphics, import locking/readback, retirement, sparse imports, mutation race, map/teardown/windows, guest-memory variants and pipelined dispatch. Conventions check passes.

Exact patch, test-only patch, build logs, full CTest output, environment and comparison manifests. SHA-256: 28cc01a04c4f85c952df4c65cf1ddbfd0cc4d59e8b21922b341a7260764011ad.

Main has since advanced to 8075b6af190ff8f83c1bff9a7f74cd71e5902140; these results are pinned to the explicit main above. No native-title, FPS, Windows or full-suite claim.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6275745446 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7849#issuecomment-6275745446). Originally posted by [JJenkx](https://github.com/JJenkx) on 2026-10-19T19:42:11Z. --- Hardware validation on AMD RX 6650 XT, RADV Mesa 26.2.4-arch1.1, Ryzen 9 7950X, Arch Linux 7.2.9, GCC 16.2.1 Release, 2026-10-19. Compared main `da3ea52b53d9d0fb0b4938035798de7c765a2341` with this PR's three commits at author head `1ead0f921b72b97d0acf9140a55179063a79090e`, applied onto that main as `4a608ccfa9ad5f706a2bc84de1d972c5ae241c31`. No other PR was included. Required Vulkan, shader cache disabled, Khronos validation enabled. Enabled the real execution sources for `GuestMemoryLifetime`, `HostImportAtMap`, `HostImportTeardown`, `HostImportWindows` and `PipelinedDispatch` before building. All 18 selected cases executed in each comparison; no skips or missing-layer messages. | Build | Result | Validation | |---|---|---| | Original main | 17/18 pass | `agc_driver_guest_memory_lifetime` fails; `VUID-vkResetFences-pFences-01123` after device loss | | Main + only this PR's three test-file changes (`02fccad99dad296d047627df2ecc4fcd47525870`) | 16/18 pass | Also catches `agc_driver_host_import_lifetime`: `guest mutation reached host apply before vkFreeMemory completed` | | Main + complete PR | **18/18 pass**, 8.23 s | **No VUIDs** | The baseline GPU failure rejects a submission with `-14`, then reports `guest prefix unmap failed`. Both that hardware failure and the added retirement-order regression disappear with the complete patch. This verifies the tests catch the old behavior rather than merely passing on both builds. Includes graphics, import locking/readback, retirement, sparse imports, mutation race, map/teardown/windows, guest-memory variants and pipelined dispatch. Conventions check passes. [Exact patch, test-only patch, build logs, full CTest output, environment and comparison manifests](https://github.com/JJenkx/AnyPS5/releases/download/game-library-checks-20261016/sync169-pr7849-validation.tar.gz). SHA-256: `28cc01a04c4f85c952df4c65cf1ddbfd0cc4d59e8b21922b341a7260764011ad`. Main has since advanced to `8075b6af190ff8f83c1bff9a7f74cd71e5902140`; these results are pinned to the explicit main above. No native-title, FPS, Windows or full-suite claim. AI-assisted: yes.
MarcZX10 commented 2026-10-19 20:24:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-19T20:24:18Z.


Thanks for the independent AMD run and the test-only comparison. The full current PR head you tested (1ead0f921b72b97d0acf9140a55179063a79090e) passes all 18 selected cases with no VUIDs, while the test-only patch reproduces the original failure and exposes the retirement-order regression. That supplies the supported runtime evidence I could not obtain on this Xeon. I see the baseline is pinned to da3ea52b53d9d0fb0b4938035798de7c765a2341, before current main advanced to 8075b6af; the PR head itself is the same head validated in your complete-PR run. Could you reassess the requested changes against that result and current diff? The local host still cannot run AGC tests because of its CPU-feature guard.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6276534691 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7849#issuecomment-6276534691). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-19T20:24:18Z. --- Thanks for the independent AMD run and the test-only comparison. The full current PR head you tested (`1ead0f921b72b97d0acf9140a55179063a79090e`) passes all 18 selected cases with no VUIDs, while the test-only patch reproduces the original failure and exposes the retirement-order regression. That supplies the supported runtime evidence I could not obtain on this Xeon. I see the baseline is pinned to `da3ea52b53d9d0fb0b4938035798de7c765a2341`, before current `main` advanced to `8075b6af`; the PR head itself is the same head validated in your complete-PR run. Could you reassess the requested changes against that result and current diff? The local host still cannot run AGC tests because of its CPU-feature guard.
MarcZX10 commented 2026-10-19 21:19:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-19T21:19:49Z.


Rebased the three-commit series onto current main (bf2c63f853e173c860d3469136dbe5a9f0739ef2) after main advanced. The first commit retires imports on cuts, the second covers the cached-address-space fast path, and the third clarifies the partial-unmap regression. The changed driver and both requested test targets compile; conventions and git diff --check pass. The seven guest-memory CTest cases were attempted again: six stop at the Xeon CPU feature guard before Vulkan/assertions, and the converted wrapper cannot find the unbuilt relinker. The external 18/18 AMD/Intel report applies to the previous code-identical PR head, not this rebased commit. Could you reassess the updated head and advise if any changes remain?

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6277559618 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7849#issuecomment-6277559618). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-19T21:19:49Z. --- Rebased the three-commit series onto current `main` (`bf2c63f853e173c860d3469136dbe5a9f0739ef2`) after `main` advanced. The first commit retires imports on cuts, the second covers the cached-address-space fast path, and the third clarifies the partial-unmap regression. The changed driver and both requested test targets compile; conventions and `git diff --check` pass. The seven guest-memory CTest cases were attempted again: six stop at the Xeon CPU feature guard before Vulkan/assertions, and the converted wrapper cannot find the unbuilt relinker. The external 18/18 AMD/Intel report applies to the previous code-identical PR head, not this rebased commit. Could you reassess the updated head and advise if any changes remain?
MarcZX10 commented 2026-10-19 21:36:09 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-19T21:36:09Z.


I rebased the three focused commits onto current main (a700809679). The lavapipe failure report was against the earlier partial-unmap assertion, which queried whether any import contained the prefix address; the test had already re-imported that retained prefix, so that assertion could fail even after the original full-range import was retired. The latest test now checks the full three-block range, and adds a separate case that starts with one import spanning all three blocks, unmaps the middle block, asserts that no import still spans that range, then verifies the prefix can be imported again. The cached-address-space fast path also now checks for an overlapping import before taking its early return, and falls through to retirement when one exists. The new head is 062d7c651d. Could you rerun agc_driver_guest_memory_lifetime on this rebased head and let me know whether any failure remains? The local host cannot reach the Vulkan test past its CPU feature guard.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6277902778 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7849#issuecomment-6277902778). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-19T21:36:09Z. --- I rebased the three focused commits onto current `main` (`a700809679`). The lavapipe failure report was against the earlier partial-unmap assertion, which queried whether any import contained the prefix address; the test had already re-imported that retained prefix, so that assertion could fail even after the original full-range import was retired. The latest test now checks the full three-block range, and adds a separate case that starts with one import spanning all three blocks, unmaps the middle block, asserts that no import still spans that range, then verifies the prefix can be imported again. The cached-address-space fast path also now checks for an overlapping import before taking its early return, and falls through to retirement when one exists. The new head is `062d7c651d`. Could you rerun `agc_driver_guest_memory_lifetime` on this rebased head and let me know whether any failure remains? The local host cannot reach the Vulkan test past its CPU feature guard.
JJenkx commented 2026-10-20 03:36:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-20T03:36:00Z.


Additional independent RX 6650 XT evidence: the existing guest-memory lifetime test reproduced a RADV submission failure before this fix, and passed after integrating the three commits from PR head 062d7c651d0a8704bdaaacf29d106b8036205fac.

This is local integration evidence, not a run of the exact PR head or an unmodified current-main pair. Baseline 1b42c4f002f995846344a2112f11f4262aa42880 is upstream ad61cafde066254980089a058ee2a93c99f773b4 plus eight mesh/label prerequisite commits. Candidate d3e69462ef adds this PR's three commits, retaining MarcZX10 authorship. The integration retained newer eviction-refusal logic and resolved Windows-test context using imported extent checks. The separate budget-error-classification experiment was absent from both branches.

  • Baseline: 7/8 pass. agc_driver_guest_memory_lifetime fails with radv/amdgpu: The CS has been rejected ... (-14) followed by guest prefix unmap failed.
  • With the lifetime fix: 8/8 pass, 2.09 s.
  • Both: 0 VUIDs, 0 missing-validation-layer messages, 0 skipped tests.
  • GPU: AMD Radeon RX 6650 XT / RADV NAVI23, Mesa 26.2.4-arch1.1, Linux 7.2.9-arch1-1; Ryzen 9 7950X. Release, bundled dependencies, BUILD_TESTING=ON.

Built agc_driver_recorder_tests and agc_driver_guest_memory_lifetime_tests, then ran the same command on both branches:

ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 \
VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
ctest --test-dir build-full \
  -R '^agc_driver_(host_import_(lifetime|mutation_race)|guest_memory_lifetime(_(copy|direct|locked|heap|heap_uncached))?)$' -V

Full baseline/change build and test logs, exact integration patch, and provenance.

The Windows-specific cut test was not run on Linux. No native-game result or performance claim is attached to this integration yet.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6282734499 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7849#issuecomment-6282734499). Originally posted by [JJenkx](https://github.com/JJenkx) on 2026-10-20T03:36:00Z. --- Additional independent RX 6650 XT evidence: the existing guest-memory lifetime test reproduced a RADV submission failure before this fix, and passed after integrating the three commits from PR head `062d7c651d0a8704bdaaacf29d106b8036205fac`. This is **local integration evidence**, not a run of the exact PR head or an unmodified current-main pair. Baseline `1b42c4f002f995846344a2112f11f4262aa42880` is upstream `ad61cafde066254980089a058ee2a93c99f773b4` plus eight mesh/label prerequisite commits. Candidate `d3e69462ef` adds this PR's three commits, retaining MarcZX10 authorship. The integration retained newer eviction-refusal logic and resolved Windows-test context using imported extent checks. The separate budget-error-classification experiment was absent from both branches. - Baseline: **7/8 pass**. `agc_driver_guest_memory_lifetime` fails with `radv/amdgpu: The CS has been rejected ... (-14)` followed by `guest prefix unmap failed`. - With the lifetime fix: **8/8 pass**, 2.09 s. - Both: **0 VUIDs, 0 missing-validation-layer messages, 0 skipped tests**. - GPU: AMD Radeon RX 6650 XT / RADV NAVI23, Mesa 26.2.4-arch1.1, Linux 7.2.9-arch1-1; Ryzen 9 7950X. Release, bundled dependencies, `BUILD_TESTING=ON`. Built `agc_driver_recorder_tests` and `agc_driver_guest_memory_lifetime_tests`, then ran the same command on both branches: ```sh ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 \ VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \ ctest --test-dir build-full \ -R '^agc_driver_(host_import_(lifetime|mutation_race)|guest_memory_lifetime(_(copy|direct|locked|heap|heap_uncached))?)$' -V ``` [Full baseline/change build and test logs, exact integration patch, and provenance](https://github.com/JJenkx/AnyPS5/releases/download/game-library-checks-20261016/pr7849-rx6650xt-integration-validation.tar.gz). The Windows-specific cut test was not run on Linux. No native-game result or performance claim is attached to this integration yet.
thuanquang commented 2026-10-20 07:28:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by thuanquang on 2026-10-20T07:28:55Z.


@MarcZX10 a Windows run of the current head 062d7c651, on an AMD GPU: RX 6700 XT (gfx1031, RDNA 2), AMD's Windows driver 32.0.21045.5002, Windows 11 26200, WinLibs GCC 15.2, Release. The head conflicts with today's main (GuestBufferMemory.cpp and Recorder.cpp), so both sides are on the head's base a70080967, so I didn't test a merge I resolved myself:

  • Base: a70080967 with only this PR's changes to CMakeLists.txt, HostImportLifetime.cpp, Recorder.cpp and GuestMemoryLifetime.cpp.
  • Head: 062d7c651 as pushed.

All 69 tests built from agc_driver_recorder_tests and agc_driver_guest_memory_lifetime_tests ran 3 times each with --repeat until-fail:3, serially, with ANYPS5_REQUIRE_VULKAN=1 and ANYPS5_NO_SHADER_CACHE=1, under the Khronos validation layer:

base + tests this head
agc_reimport_bench fails: a cut kept memory imported across the changed host range instead of importing the remaining side again passes 3/3
agc_host_import_cut_lifetime fails: the side of a page made inaccessible inside the import, nearer its start is served from the import that pinned the changed host range passes 3/3
agc_driver_host_import_lifetime fails: guest mutation reached host apply before vkFreeMemory completed passes 3/3
agc_driver_guest_memory_lifetime and its _copy, _direct, _locked, _heap, _heap_uncached variants pass pass 3/3
the other 60 tests pass pass 3/3

So the stale-import failure that savvaniss and I saw on the earlier heads is gone at 062d7c651 on this driver. The updated agc_driver_guest_memory_lifetime passes here on both sides, so on AMD Windows the three tests above are what tell the base from the head.

Validation layer: the same messages on both sides, 12 VUID-VkImageViewCreateInfo-usage-02275 and 6 VUID-vkCmdCopyBuffer-srcBuffer-00118, so none comes from this change. No was not found but was requested line on either side.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6285758665 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7849#issuecomment-6285758665). Originally posted by [thuanquang](https://github.com/thuanquang) on 2026-10-20T07:28:55Z. --- @MarcZX10 a Windows run of the current head `062d7c651`, on an AMD GPU: RX 6700 XT (gfx1031, RDNA 2), AMD's Windows driver 32.0.21045.5002, Windows 11 26200, WinLibs GCC 15.2, Release. The head conflicts with today's `main` (`GuestBufferMemory.cpp` and `Recorder.cpp`), so both sides are on the head's base `a70080967`, so I didn't test a merge I resolved myself: - **Base:** `a70080967` with only this PR's changes to `CMakeLists.txt`, `HostImportLifetime.cpp`, `Recorder.cpp` and `GuestMemoryLifetime.cpp`. - **Head:** `062d7c651` as pushed. All 69 tests built from `agc_driver_recorder_tests` and `agc_driver_guest_memory_lifetime_tests` ran 3 times each with `--repeat until-fail:3`, serially, with `ANYPS5_REQUIRE_VULKAN=1` and `ANYPS5_NO_SHADER_CACHE=1`, under the Khronos validation layer: | | base + tests | this head | |---|---|---| | `agc_reimport_bench` | fails: `a cut kept memory imported across the changed host range instead of importing the remaining side again` | passes 3/3 | | `agc_host_import_cut_lifetime` | fails: `the side of a page made inaccessible inside the import, nearer its start is served from the import that pinned the changed host range` | passes 3/3 | | `agc_driver_host_import_lifetime` | fails: `guest mutation reached host apply before vkFreeMemory completed` | passes 3/3 | | `agc_driver_guest_memory_lifetime` and its `_copy`, `_direct`, `_locked`, `_heap`, `_heap_uncached` variants | pass | pass 3/3 | | the other 60 tests | pass | pass 3/3 | So the stale-import failure that savvaniss and I saw on the earlier heads is gone at `062d7c651` on this driver. The updated `agc_driver_guest_memory_lifetime` passes here on both sides, so on AMD Windows the three tests above are what tell the base from the head. Validation layer: the same messages on both sides, 12 `VUID-VkImageViewCreateInfo-usage-02275` and 6 `VUID-vkCmdCopyBuffer-srcBuffer-00118`, so none comes from this change. No `was not found but was requested` line on either side.
MarcZX10 commented 2026-10-20 07:55:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-20T07:55:19Z.


Rebased #7849 onto current main at 1edbe4b5e03b4f655021da3a74b87d2dc511476f and pushed the three MarcZX10-authored commits as e844204903. I resolved the GuestBufferMemory.cpp and Recorder.cpp conflicts while retaining main's current import-budget behavior and updating the tests to the current import metadata. The architecture text now describes full retirement after a cut.

Local git diff --check and conventions pass. The current head has not been rebuilt or runtime-tested here: the Xeon CPU guard stops AGC tests before Vulkan, and only 1.3 GiB of disk was available for a rebuild. The prior RX 6700 XT run was against the old base/head 062d7c651, so it does not validate this rebase. Current hosted conventions and labels are pending; platform jobs are skipped. Could you recheck the current head when convenient, especially the focused import lifetime cases on the supported GPU setup?

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6286208753 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7849#issuecomment-6286208753). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-20T07:55:19Z. --- Rebased #7849 onto current `main` at `1edbe4b5e03b4f655021da3a74b87d2dc511476f` and pushed the three MarcZX10-authored commits as `e844204903`. I resolved the `GuestBufferMemory.cpp` and `Recorder.cpp` conflicts while retaining main's current import-budget behavior and updating the tests to the current import metadata. The architecture text now describes full retirement after a cut. Local `git diff --check` and conventions pass. The current head has not been rebuilt or runtime-tested here: the Xeon CPU guard stops AGC tests before Vulkan, and only 1.3 GiB of disk was available for a rebuild. The prior RX 6700 XT run was against the old base/head `062d7c651`, so it does not validate this rebase. Current hosted conventions and labels are pending; platform jobs are skipped. Could you recheck the current head when convenient, especially the focused import lifetime cases on the supported GPU setup?
MarcZX10 commented 2026-10-20 08:08:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-20T08:08:26Z.


I added a focused regression assertion after the middle unmap and before the prefix Fill: HostImportCovers must report that the prefix is not imported at that point. The existing assertion only ruled out an import spanning all three blocks, which could miss a retained prefix import like the review report describes. The next Fill still verifies the surviving prefix can be imported again. Current-head diff and conventions checks pass; I could not rerun the Vulkan test here because this host fails the project CPU feature guard and has insufficient free space for a rebuild.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6286460448 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7849#issuecomment-6286460448). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-20T08:08:26Z. --- I added a focused regression assertion after the middle unmap and before the prefix `Fill`: `HostImportCovers` must report that the prefix is not imported at that point. The existing assertion only ruled out an import spanning all three blocks, which could miss a retained prefix import like the review report describes. The next `Fill` still verifies the surviving prefix can be imported again. Current-head diff and conventions checks pass; I could not rerun the Vulkan test here because this host fails the project CPU feature guard and has insufficient free space for a rebuild.
MarcZX10 commented 2026-10-20 08:11:42 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-20T08:11:42Z.


I confirmed the standard PR Build event skips the Linux job by workflow design. The repository provides a workflow_dispatch route to build selected PRs on its self-hosted Linux runner, but GitHub rejected my dispatch attempt with HTTP 403 (Must have admin rights to Repository). I also cannot run the test binary on this Xeon host because it lacks the project-required CPU features. So the current head still has no runtime result here; the supported-host run needs to be triggered by an account with repository admin access or another equipped reviewer.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6286517865 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7849#issuecomment-6286517865). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-20T08:11:42Z. --- I confirmed the standard PR Build event skips the Linux job by workflow design. The repository provides a `workflow_dispatch` route to build selected PRs on its self-hosted Linux runner, but GitHub rejected my dispatch attempt with HTTP 403 (`Must have admin rights to Repository`). I also cannot run the test binary on this Xeon host because it lacks the project-required CPU features. So the current head still has no runtime result here; the supported-host run needs to be triggered by an account with repository admin access or another equipped reviewer.
simonbbby commented 2026-10-20 08:27:40 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by simonbbby on 2026-10-20T08:27:40Z.


Build blocker, then supported-host results with a one-line local correction. Exact head 218ccd7cf3eeebcf1c8d27a2b333d1353904913c fails to compile on native Linux/GCC 13.3:

Graphics/src/GuestBufferMemory.cpp:1624:5: error: ‘dropTrimmed’ was not declared in this scope

importRunAt still calls the helper, while this PR removes its definition and HostImports::trimmed. I removed only the stale call locally:

-    dropTrimmed(state, base, base + bytes);

That is the entire local diff against your head. The fixtures, runtime dependencies and converted guest fixture then build. The results below belong to this corrected local tree, not the unmodified pushed head.

On that tree, all nine registered cases matching

^agc_driver_(host_import_(lifetime|mutation_race)|guest_memory_lifetime(_(copy|direct|locked|heap|heap_uncached|converted))?)$

pass three times each, serially, on each restricted ICD: 27/27 NVIDIA, 27/27 RADV, 27/27 lavapipe, no skips or timeouts. This includes the strengthened assertion before the prefix Fill, and the converted guest test. The device records name RTX 3090, RADV RAPHAEL_MENDOCINO and llvmpipe respectively.

For a before/after control, I retained your current fixtures and restored only GuestBufferMemory.cpp to the exact main base 1edbe4b5e03b4f655021da3a74b87d2dc511476f:

  • Native agc_driver_guest_memory_lifetime on RADV fails 3/3 with radv/amdgpu: The CS has been rejected ... (-14) followed by guest prefix unmap failed, reproducing #7784's symptom.
  • NVIDIA and lavapipe pass 3/3 each on this parent control, so those Linux runs are compatibility checks, not a second reproduction of the retirement failure.
  • Restoring your head plus the single stale-call deletion and rebuilding makes the native lifetime fixture pass 3/3 per driver again. agc_driver_graphics also passes; the one-line local diff passes conventions and git diff --check.

Ubuntu 24.04, kernel 7.0.0-38, Ryzen 9950X, Release; NVIDIA 595.99.02, gfx1036 1002:13c0 / Mesa 25.2.8, lavapipe LLVM 20.1.2. Vulkan required, shader cache disabled, unrelated AnyPS5/Vulkan overrides removed; CTest's per-mode lifetime settings retained. No Khronos validation layer is installed. Windows-only cut/reimport cases, titles, performance and the full suite were not tested. Raw build/test logs, JUnit and the one-line patch are retained.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6286784663 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7849#issuecomment-6286784663). Originally posted by [simonbbby](https://github.com/simonbbby) on 2026-10-20T08:27:40Z. --- **Build blocker, then supported-host results with a one-line local correction.** Exact head `218ccd7cf3eeebcf1c8d27a2b333d1353904913c` fails to compile on native Linux/GCC 13.3: ```text Graphics/src/GuestBufferMemory.cpp:1624:5: error: ‘dropTrimmed’ was not declared in this scope ``` `importRunAt` still calls the helper, while this PR removes its definition and `HostImports::trimmed`. I removed only the stale call locally: ```diff - dropTrimmed(state, base, base + bytes); ``` That is the entire local diff against your head. The fixtures, runtime dependencies and converted guest fixture then build. **The results below belong to this corrected local tree, not the unmodified pushed head.** On that tree, all nine registered cases matching ```text ^agc_driver_(host_import_(lifetime|mutation_race)|guest_memory_lifetime(_(copy|direct|locked|heap|heap_uncached|converted))?)$ ``` pass three times each, serially, on each restricted ICD: **27/27 NVIDIA, 27/27 RADV, 27/27 lavapipe**, no skips or timeouts. This includes the strengthened assertion before the prefix `Fill`, and the converted guest test. The device records name RTX 3090, RADV RAPHAEL_MENDOCINO and llvmpipe respectively. For a before/after control, I retained your current fixtures and restored **only `GuestBufferMemory.cpp`** to the exact main base `1edbe4b5e03b4f655021da3a74b87d2dc511476f`: - Native `agc_driver_guest_memory_lifetime` on RADV fails **3/3** with `radv/amdgpu: The CS has been rejected ... (-14)` followed by `guest prefix unmap failed`, reproducing #7784's symptom. - NVIDIA and lavapipe pass **3/3 each** on this parent control, so those Linux runs are compatibility checks, not a second reproduction of the retirement failure. - Restoring your head plus the single stale-call deletion and rebuilding makes the native lifetime fixture pass **3/3 per driver again**. `agc_driver_graphics` also passes; the one-line local diff passes conventions and `git diff --check`. Ubuntu 24.04, kernel 7.0.0-38, Ryzen 9950X, Release; NVIDIA 595.99.02, gfx1036 `1002:13c0` / Mesa 25.2.8, lavapipe LLVM 20.1.2. Vulkan required, shader cache disabled, unrelated AnyPS5/Vulkan overrides removed; CTest's per-mode lifetime settings retained. No Khronos validation layer is installed. Windows-only cut/reimport cases, titles, performance and the full suite were not tested. Raw build/test logs, JUnit and the one-line patch are retained.
MarcZX10 commented 2026-10-20 08:29:36 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-20T08:29:36Z.


I confirmed the Linux compiler failure at GuestBufferMemory.cpp:1624: importRunAt calls the removed dropTrimmed helper, and no definition or trimmed-state field remains. I removed that stale call in the local worktree; python3 tools/check_conventions.py --base upstream/main --head HEAD and git diff --check pass. I have not pushed this one-line correction because the PR also conflicts with current main and the supported-host results in the previous comment apply only to the locally corrected tree, not the published head. The next update needs a current-main conflict resolution plus the same targeted guest-memory/host-import suite on that exact head.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6286816590 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7849#issuecomment-6286816590). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-20T08:29:36Z. --- I confirmed the Linux compiler failure at `GuestBufferMemory.cpp:1624`: `importRunAt` calls the removed `dropTrimmed` helper, and no definition or trimmed-state field remains. I removed that stale call in the local worktree; `python3 tools/check_conventions.py --base upstream/main --head HEAD` and `git diff --check` pass. I have not pushed this one-line correction because the PR also conflicts with current `main` and the supported-host results in the previous comment apply only to the locally corrected tree, not the published head. The next update needs a current-main conflict resolution plus the same targeted guest-memory/host-import suite on that exact head.
MarcZX10 commented 2026-10-20 08:31:39 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-20T08:31:39Z.


Updated the branch to current upstream main 661f8b71718083fbac1c45b44f5d67dc39cb4624, preserving the original authors and adding a separate fix(agc): remove stale trimmed-import call commit. The exact earlier tree with this same one-line correction passed Simon B.’s focused 9-case suite 3/3 each on NVIDIA, RADV and lavapipe; the corrected current-main rebase itself has not had a runtime run. On the rebased head, conventions and git diff --check pass. The PR description now distinguishes the earlier runtime evidence from the current rebased head. Please rerun the focused suite on the updated head when an equipped runner is available.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6286851752 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7849#issuecomment-6286851752). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-20T08:31:39Z. --- Updated the branch to current upstream `main` `661f8b71718083fbac1c45b44f5d67dc39cb4624`, preserving the original authors and adding a separate `fix(agc): remove stale trimmed-import call` commit. The exact earlier tree with this same one-line correction passed Simon B.’s focused 9-case suite 3/3 each on NVIDIA, RADV and lavapipe; the corrected current-main rebase itself has not had a runtime run. On the rebased head, conventions and `git diff --check` pass. The PR description now distinguishes the earlier runtime evidence from the current rebased head. Please rerun the focused suite on the updated head when an equipped runner is available.
MarcZX10 commented 2026-10-20 08:43:03 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-20T08:43:03Z.


I rebased the corrected branch again onto the latest upstream main 35fa2bdd824f1a77d5d70e7feeae85fd6d9baf04 because main had advanced in the AGC CMake test file. The five commits remain MarcZX10-authored. Conventions and git diff --check pass on the new head 5338420704. The 27/27-per-ICD runtime report is still from the earlier one-line-corrected tree, not this latest rebase; could you rerun the focused host-import/guest-memory suite on this exact head when available?

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6287043549 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7849#issuecomment-6287043549). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-20T08:43:03Z. --- I rebased the corrected branch again onto the latest upstream `main` `35fa2bdd824f1a77d5d70e7feeae85fd6d9baf04` because main had advanced in the AGC CMake test file. The five commits remain MarcZX10-authored. Conventions and `git diff --check` pass on the new head `5338420704`. The 27/27-per-ICD runtime report is still from the earlier one-line-corrected tree, not this latest rebase; could you rerun the focused host-import/guest-memory suite on this exact head when available?
MarcZX10 commented 2026-10-20 09:02:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-20T09:02:12Z.


Follow-up on your review at 3648e3b1fd: the current branch includes changes since that reviewed head. ca64d72589 makes the cache-drop path check for an overlapping host import and fall through to the import-retirement loop instead of returning early. The regression now checks that the whole import and its prefix are absent after middle unmap, before the prefix is imported again, and the current architecture text describes whole-import retirement rather than trimming.

The current PR head is 5338420704b0bdd9cb95055b11e6e76682184efd. I cannot run the focused test here because this host lacks the required CPU extensions. Does the reported prefix-import failure still reproduce on this head? If it does, the import interval and whether WaitForLeasesAndImports took the cache-drop or mutex-held path would help narrow it down. I will keep the review finding open until the exact-head result is clear.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6287393282 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7849#issuecomment-6287393282). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-20T09:02:12Z. --- Follow-up on your review at `3648e3b1fd`: the current branch includes changes since that reviewed head. `ca64d72589` makes the cache-drop path check for an overlapping host import and fall through to the import-retirement loop instead of returning early. The regression now checks that the whole import and its prefix are absent after middle unmap, before the prefix is imported again, and the current architecture text describes whole-import retirement rather than trimming. The current PR head is `5338420704b0bdd9cb95055b11e6e76682184efd`. I cannot run the focused test here because this host lacks the required CPU extensions. Does the reported prefix-import failure still reproduce on this head? If it does, the import interval and whether `WaitForLeasesAndImports` took the cache-drop or mutex-held path would help narrow it down. I will keep the review finding open until the exact-head result is clear.
MarcZX10 commented 2026-10-20 10:22:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-20T10:22:37Z.


Supported-host follow-up on the prefix assertion and unmap failure:

  • Simon's focused Linux run passed the strengthened !Imported(device, mapping) check after middle unmap 3/3 on each of NVIDIA, RADV and lavapipe. The same guest-memory lifetime test failed 3/3 on RADV with the main-only control. His corrected-tree test run was before my latest current-main rebase; it is not an exact run of head 5338420704b0bdd9cb95055b11e6e76682184efd.
  • An AMD Windows run on earlier head 062d7c651 reports agc_driver_guest_memory_lifetime passing 3/3, including the middle-unmap/prefix case; that run also predates this rebase.
  • The latest hosted checks on 5338420704b0bdd9cb95055b11e6e76682184efd show conventions/eligibility/labels/report passing, while Linux and Windows build jobs are skipped. This host cannot run the Vulkan fixture because it fails the CPU-feature guard.

The overlap check should see a whole-import entry that begins before the middle-unmap interval because its end extends past the interval start; the retirement loop then removes that entry before the registry applies the cut. The supported-host reports suggest the earlier failure is fixed, but I do not have an exact-head runtime result. @adriadam10, do these results address the prefix-import finding, or do you still see it on the current head?

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6288760293 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7849#issuecomment-6288760293). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-20T10:22:37Z. --- Supported-host follow-up on the prefix assertion and unmap failure: - Simon's focused Linux run passed the strengthened `!Imported(device, mapping)` check after middle unmap 3/3 on each of NVIDIA, RADV and lavapipe. The same guest-memory lifetime test failed 3/3 on RADV with the main-only control. His corrected-tree test run was before my latest current-main rebase; it is not an exact run of head `5338420704b0bdd9cb95055b11e6e76682184efd`. - An AMD Windows run on earlier head `062d7c651` reports `agc_driver_guest_memory_lifetime` passing 3/3, including the middle-unmap/prefix case; that run also predates this rebase. - The latest hosted checks on `5338420704b0bdd9cb95055b11e6e76682184efd` show conventions/eligibility/labels/report passing, while Linux and Windows build jobs are skipped. This host cannot run the Vulkan fixture because it fails the CPU-feature guard. The overlap check should see a whole-import entry that begins before the middle-unmap interval because its end extends past the interval start; the retirement loop then removes that entry before the registry applies the cut. The supported-host reports suggest the earlier failure is fixed, but I do not have an exact-head runtime result. @adriadam10, do these results address the prefix-import finding, or do you still see it on the current head?
simonbbby commented 2026-10-20 10:26:54 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by simonbbby on 2026-10-20T10:26:54Z.


Exact-head Linux follow-up: the prefix-import failure does not reproduce on 5338420704b0bdd9cb95055b11e6e76682184efd. This head builds without the local dropTrimmed correction needed by the earlier report.

Ubuntu 24.04.3, GCC 13.3, Release. Rebuilt the recorder, graphics, guest-memory lifetime executable and converted guest fixture/runtime. Restricted each run to one ICD; loader logs confirm RTX 3090 (NVIDIA 595.99.02), gfx1036/RADV RAPHAEL_MENDOCINO (Mesa 25.2.8), and lavapipe (LLVM 20.1.2).

ctest -j1 -V --repeat until-fail:3 --no-tests=error -R '^agc_driver_(host_import_(lifetime|mutation_race)|guest_memory_lifetime(_(copy|direct|locked|heap|heap_uncached|converted))?)$', with ANYPS5_REQUIRE_VULKAN=1 and ANYPS5_NO_SHADER_CACHE=1:

Exact PR head NVIDIA RADV lavapipe
Nine selected cases, three runs each 27/27 27/27 27/27

No skips or timeouts. This includes the strengthened assertions that the whole import and its prefix are absent before the prefix is filled/imported again.

For a discriminating control, kept all PR fixtures and restored only Graphics/src/GuestBufferMemory.cpp from parent/main 35fa2bdd824f1a77d5d70e7feeae85fd6d9baf04, then rebuilt the same targets:

  • agc_driver_host_import_lifetime fails 3/3 on each ICD: guest mutation reached host apply before vkFreeMemory completed.
  • agc_driver_guest_memory_lifetime fails 3/3 on RADV: The CS has been rejected ... (-14) followed by guest prefix unmap failed. It passes on NVIDIA and lavapipe, so that case alone does not discriminate there.

Restored the exact, clean PR head and rebuilt: both cases then pass 3/3 on each ICD (18 further passes). The reported prefix failure is therefore resolved in this Linux scope, with a repeatable parent-production negative control.

The Khronos validation layer is unavailable on this runner; these are runtime results, not validation-layer results. No Windows, title, performance or full-suite claim.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6288830376 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7849#issuecomment-6288830376). Originally posted by [simonbbby](https://github.com/simonbbby) on 2026-10-20T10:26:54Z. --- Exact-head Linux follow-up: the prefix-import failure does **not** reproduce on `5338420704b0bdd9cb95055b11e6e76682184efd`. This head builds without the local `dropTrimmed` correction needed by the earlier report. Ubuntu 24.04.3, GCC 13.3, Release. Rebuilt the recorder, graphics, guest-memory lifetime executable and converted guest fixture/runtime. Restricted each run to one ICD; loader logs confirm RTX 3090 (NVIDIA 595.99.02), gfx1036/RADV RAPHAEL_MENDOCINO (Mesa 25.2.8), and lavapipe (LLVM 20.1.2). `ctest -j1 -V --repeat until-fail:3 --no-tests=error -R '^agc_driver_(host_import_(lifetime|mutation_race)|guest_memory_lifetime(_(copy|direct|locked|heap|heap_uncached|converted))?)$'`, with `ANYPS5_REQUIRE_VULKAN=1` and `ANYPS5_NO_SHADER_CACHE=1`: | Exact PR head | NVIDIA | RADV | lavapipe | |---|---:|---:|---:| | Nine selected cases, three runs each | 27/27 | 27/27 | 27/27 | No skips or timeouts. This includes the strengthened assertions that the whole import **and its prefix are absent before** the prefix is filled/imported again. For a discriminating control, kept all PR fixtures and restored **only** `Graphics/src/GuestBufferMemory.cpp` from parent/main `35fa2bdd824f1a77d5d70e7feeae85fd6d9baf04`, then rebuilt the same targets: - `agc_driver_host_import_lifetime` fails 3/3 on each ICD: `guest mutation reached host apply before vkFreeMemory completed`. - `agc_driver_guest_memory_lifetime` fails 3/3 on RADV: `The CS has been rejected ... (-14)` followed by `guest prefix unmap failed`. It passes on NVIDIA and lavapipe, so that case alone does not discriminate there. Restored the exact, clean PR head and rebuilt: both cases then pass 3/3 on each ICD (18 further passes). The reported prefix failure is therefore resolved in this Linux scope, with a repeatable parent-production negative control. The Khronos validation layer is unavailable on this runner; these are runtime results, not validation-layer results. No Windows, title, performance or full-suite claim.
MarcZX10 commented 2026-10-20 10:27:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-20T10:27:55Z.


Thanks for the exact-head run and parent-production control. The strengthened middle-unmap and prefix assertions pass 3/3 on each of NVIDIA, RADV and lavapipe, while restoring only GuestBufferMemory.cpp reproduces the host-import lifetime failure on all three and the RADV guest-prefix failure. This directly answers the reported prefix failure for head 5338420704b0bdd9cb95055b11e6e76682184efd. I also verified docs/dev/ARCHITECTURE.md now says an overlapping cut retires the whole import and surviving ranges are imported again; the old retireOrTrim/trimmed/reattachTrimmed description is gone. @adriadam10, could you reassess the review finding against this exact-head result?

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6288846961 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7849#issuecomment-6288846961). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-20T10:27:55Z. --- Thanks for the exact-head run and parent-production control. The strengthened middle-unmap and prefix assertions pass 3/3 on each of NVIDIA, RADV and lavapipe, while restoring only `GuestBufferMemory.cpp` reproduces the host-import lifetime failure on all three and the RADV guest-prefix failure. This directly answers the reported prefix failure for head `5338420704b0bdd9cb95055b11e6e76682184efd`. I also verified `docs/dev/ARCHITECTURE.md` now says an overlapping cut retires the whole import and surviving ranges are imported again; the old `retireOrTrim`/`trimmed`/`reattachTrimmed` description is gone. @adriadam10, could you reassess the review finding against this exact-head result?
MarcZX10 commented 2026-10-20 10:43:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-20T10:43:29Z.


@adriadam10, simonbbby’s exact-head report addresses both points from the review. On 5338420704b0bdd9cb95055b11e6e76682184efd, the selected nine tests passed 27/27 on each of NVIDIA, RADV and lavapipe, including the assertion that the prefix import is absent before it is filled again. Restoring only GuestBufferMemory.cpp from parent 35fa2bdd reproduces the reported failures; restoring the PR head passes the two discriminating cases 3/3 per ICD. The architecture text at docs/dev/ARCHITECTURE.md:132 now describes retiring the whole import and re-importing surviving ranges. The report notes the validation layer was unavailable and makes no Windows, title or full-suite claim. Could you reassess the CHANGES_REQUESTED review against this evidence?

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6289096753 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7849#issuecomment-6289096753). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-20T10:43:29Z. --- @adriadam10, simonbbby’s exact-head report addresses both points from the review. On `5338420704b0bdd9cb95055b11e6e76682184efd`, the selected nine tests passed 27/27 on each of NVIDIA, RADV and lavapipe, including the assertion that the prefix import is absent before it is filled again. Restoring only `GuestBufferMemory.cpp` from parent `35fa2bdd` reproduces the reported failures; restoring the PR head passes the two discriminating cases 3/3 per ICD. The architecture text at `docs/dev/ARCHITECTURE.md:132` now describes retiring the whole import and re-importing surviving ranges. The report notes the validation layer was unavailable and makes no Windows, title or full-suite claim. Could you reassess the `CHANGES_REQUESTED` review against this evidence?
Chuk49 commented 2026-10-20 12:39:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Chuk49 on 2026-10-20T12:39:08Z.


Exact-head run of 5338420704b0bdd9cb95055b11e6e76682184efd on a GPU not covered so far: AMD Radeon 8060S (Strix Halo, RDNA 3.5), RADV STRIX_HALO, against its base 35fa2bdd8 as the control.

Arch Linux (Omarchy), kernel 7.2.5, Mesa 26.2.2, GCC 16.2.1, Release, BUILD_TESTING=ON, full rebuild for each commit. RADV is the only ICD installed.

ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 APS5_NO_PIPELINE_JOURNAL=1 \
VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer \
ctest --test-dir build -j1 --timeout 60 -V -R 'guest_memory_lifetime|host_import'

17 tests: agc_driver_guest_memory_lifetime and its _copy, _direct, _locked, _heap, _heap_uncached and _converted variants, plus agc_driver_host_import_{lifetime,mutation_race,at_map,teardown,windows}, agc_host_import_{unmap,retirement,retire,sparse} and guest_memory_lifetime. Three separate runs per commit.

Commit Run 1 Run 2 Run 3 VUID- lines
base 35fa2bdd8 16/17 16/17 16/17 2 per run
PR 533842070 17/17 17/17 17/17 0
  • Base: the only failure is agc_driver_guest_memory_lifetime, 3/3. It shows the same signature as #7784: radv/amdgpu: The CS has been rejected, see dmesg for more information (-14), then guest memory host import lifetime: guest prefix unmap failed. Both VUID- lines are VUID-vkResetFences-pFences-01123, logged in that test right after the rejected submission.
  • PR head: all 17 pass in every run, with no VUID- lines.
  • Validation layer: the loader log shows Insert instance layer "VK_LAYER_KHRONOS_validation" in every Vulkan-using test of every run (15 inserts per run). No log contains was not found but was requested by env var VK_INSTANCE_LAYERS. No test skipped.

Not covered: Windows, titles, performance, the rest of the suite.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6291035758 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7849#issuecomment-6291035758). Originally posted by [Chuk49](https://github.com/Chuk49) on 2026-10-20T12:39:08Z. --- Exact-head run of `5338420704b0bdd9cb95055b11e6e76682184efd` on a GPU not covered so far: **AMD Radeon 8060S (Strix Halo, RDNA 3.5), RADV STRIX_HALO**, against its base `35fa2bdd8` as the control. Arch Linux (Omarchy), kernel 7.2.5, Mesa 26.2.2, GCC 16.2.1, Release, `BUILD_TESTING=ON`, full rebuild for each commit. RADV is the only ICD installed. ``` ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 APS5_NO_PIPELINE_JOURNAL=1 \ VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer \ ctest --test-dir build -j1 --timeout 60 -V -R 'guest_memory_lifetime|host_import' ``` 17 tests: `agc_driver_guest_memory_lifetime` and its `_copy`, `_direct`, `_locked`, `_heap`, `_heap_uncached` and `_converted` variants, plus `agc_driver_host_import_{lifetime,mutation_race,at_map,teardown,windows}`, `agc_host_import_{unmap,retirement,retire,sparse}` and `guest_memory_lifetime`. Three separate runs per commit. | Commit | Run 1 | Run 2 | Run 3 | `VUID-` lines | |---|---|---|---|---| | base `35fa2bdd8` | 16/17 | 16/17 | 16/17 | 2 per run | | PR `533842070` | 17/17 | 17/17 | 17/17 | 0 | - **Base:** the only failure is `agc_driver_guest_memory_lifetime`, 3/3. It shows the same signature as #7784: `radv/amdgpu: The CS has been rejected, see dmesg for more information (-14)`, then `guest memory host import lifetime: guest prefix unmap failed`. Both `VUID-` lines are `VUID-vkResetFences-pFences-01123`, logged in that test right after the rejected submission. - **PR head:** all 17 pass in every run, with no `VUID-` lines. - **Validation layer:** the loader log shows `Insert instance layer "VK_LAYER_KHRONOS_validation"` in every Vulkan-using test of every run (15 inserts per run). No log contains `was not found but was requested by env var VK_INSTANCE_LAYERS`. No test skipped. Not covered: Windows, titles, performance, the rest of the suite.
screamm commented 2026-10-20 14:29:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by screamm on 2026-10-20T14:29:56Z.


Windows run of the cut/reimport cases on the exact head, with the negative control. It passes. This is the Windows result that adriadam10's review was waiting on.

Windows 11 Pro 26220, NVIDIA GeForce RTX 4070 (10de:2786), driver 596.21, Ryzen 7 5700X, WinLibs MinGW-w64 GCC 15.2.0 r7, Release, full build. Head 533842070 merged onto main 1d4164552. The merge is clean. #7888 was stacked underneath for a separate run; the two PRs share no files.

ANYPS5_REQUIRE_VULKAN=1, serial, --repeat until-fail:3:

Test This head Control: PR tests, GuestBufferMemory.cpp from main
agc_reimport_bench (Windows only) 3/3 fails 3/3: a cut kept memory imported across the changed host range instead of importing the remaining side again (kept side was imported again after 0 of 5 cuts)
agc_host_import_cut_lifetime (Windows only) 3/3 fails 3/3: the side of a page made inaccessible inside the import, nearer its start is served from the import that pinned the changed host range
agc_driver_host_import_lifetime 3/3 fails 3/3: guest mutation reached host apply before vkFreeMemory completed
agc_driver_host_import_mutation_race 3/3 3/3
agc_driver_guest_memory_lifetime and _copy, _direct, _locked, _heap, _heap_uncached 3/3 each 3/3 each
agc_write_tracking, agc_write_tracking_metadata_commit Passed 3/3 each (not skipped) Passed 3/3 each
  • With the PR, the bench prints every cut at the head, at the tail and inside the range retired the original import before importing the remaining side. The kept side was imported again after 5 of 5 cuts, for both tail and inside cuts.
  • After I restored the PR's GuestBufferMemory.cpp and rebuilt, the three tests that failed on the control passed 3/3 again.
  • agc_driver_guest_memory_lifetime passes on both sides here. On NVIDIA Windows it does not tell the two builds apart; the three tests above do.
  • _converted is registered only on Linux x86_64, so it did not run.

Also checked:

  • GPU pass -j1 -R '^agc_driver_': 601/604 pass. The failures match main: image_array_window_past_layer_limit does not build (MinGW alignas(65536)), and pass_input_hazard fails with the same message on main 1d4164552. The third, pm4_replay_tool, failed because of my shell's PATH and passes on a rerun.
  • Non-GPU suite: every failure under -j8 load passes when rerun serially.
  • Conventions and git diff --check pass.
  • Showcase PPSA99005, RetroArch PPSA99169 and vkQuake PPSA99010 (shareware pak), 60 s each, main against the PR: no stop line and no vkQueueSubmit failure on either side.

Not checked:

  • No Khronos validation layer is installed here, so I have no VUID results.
  • No AMD or Intel card on Windows.
  • No performance comparison of the re-import cost.
  • No run on today's newer main (d50ec76da; the merge is clean).

Written with Claude Code assistance (validation by a subagent, reviewed in this session).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6293261431 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7849#issuecomment-6293261431). Originally posted by [screamm](https://github.com/screamm) on 2026-10-20T14:29:56Z. --- Windows run of the cut/reimport cases on the exact head, with the negative control. It passes. This is the Windows result that adriadam10's review was waiting on. Windows 11 Pro 26220, NVIDIA GeForce RTX 4070 (`10de:2786`), driver 596.21, Ryzen 7 5700X, WinLibs MinGW-w64 GCC 15.2.0 r7, Release, full build. Head `533842070` merged onto `main` `1d4164552`. The merge is clean. #7888 was stacked underneath for a separate run; the two PRs share no files. `ANYPS5_REQUIRE_VULKAN=1`, serial, `--repeat until-fail:3`: | Test | This head | Control: PR tests, `GuestBufferMemory.cpp` from `main` | |---|---|---| | `agc_reimport_bench` (Windows only) | 3/3 | fails 3/3: `a cut kept memory imported across the changed host range instead of importing the remaining side again` (`kept side was imported again after 0 of 5 cuts`) | | `agc_host_import_cut_lifetime` (Windows only) | 3/3 | fails 3/3: `the side of a page made inaccessible inside the import, nearer its start is served from the import that pinned the changed host range` | | `agc_driver_host_import_lifetime` | 3/3 | fails 3/3: `guest mutation reached host apply before vkFreeMemory completed` | | `agc_driver_host_import_mutation_race` | 3/3 | 3/3 | | `agc_driver_guest_memory_lifetime` and `_copy`, `_direct`, `_locked`, `_heap`, `_heap_uncached` | 3/3 each | 3/3 each | | `agc_write_tracking`, `agc_write_tracking_metadata_commit` | Passed 3/3 each (not skipped) | Passed 3/3 each | - With the PR, the bench prints `every cut at the head, at the tail and inside the range retired the original import before importing the remaining side`. The kept side was imported again after 5 of 5 cuts, for both tail and inside cuts. - After I restored the PR's `GuestBufferMemory.cpp` and rebuilt, the three tests that failed on the control passed 3/3 again. - `agc_driver_guest_memory_lifetime` passes on both sides here. On NVIDIA Windows it does not tell the two builds apart; the three tests above do. - `_converted` is registered only on Linux x86_64, so it did not run. Also checked: - GPU pass `-j1 -R '^agc_driver_'`: 601/604 pass. The failures match `main`: `image_array_window_past_layer_limit` does not build (MinGW `alignas(65536)`), and `pass_input_hazard` fails with the same message on `main` `1d4164552`. The third, `pm4_replay_tool`, failed because of my shell's PATH and passes on a rerun. - Non-GPU suite: every failure under `-j8` load passes when rerun serially. - Conventions and `git diff --check` pass. - Showcase PPSA99005, RetroArch PPSA99169 and vkQuake PPSA99010 (shareware pak), 60 s each, `main` against the PR: no stop line and no `vkQueueSubmit` failure on either side. Not checked: - No Khronos validation layer is installed here, so I have no VUID results. - No AMD or Intel card on Windows. - No performance comparison of the re-import cost. - No run on today's newer `main` (`d50ec76da`; the merge is clean). Written with Claude Code assistance (validation by a subagent, reviewed in this session).
MarcZX10 commented 2026-10-20 18:13:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-20T18:13:08Z.


@adriadam10, the exact-head follow-ups now cover both points from your review on 5338420704b0bdd9cb95055b11e6e76682184efd:

  • The selected nine tests pass 27/27 on NVIDIA, RADV, and lavapipe, including the prefix-import assertion after the middle unmap. Restoring only GuestBufferMemory.cpp from the base reproduces the lifetime failure on all three and the guest-prefix failure on RADV.
  • The Windows cut/reimport cases pass on the exact head with the parent as a negative control.

Chuk49 also reports the exact head passing on an AMD Radeon 8060S (Strix Halo, RADV). Could you reassess the outstanding changes-requested review with these results in view, and let me know if you still see a specific gap?

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6297860160 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7849#issuecomment-6297860160). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-20T18:13:08Z. --- @adriadam10, the exact-head follow-ups now cover both points from your review on `5338420704b0bdd9cb95055b11e6e76682184efd`: - The selected nine tests pass 27/27 on NVIDIA, RADV, and lavapipe, including the prefix-import assertion after the middle unmap. Restoring only `GuestBufferMemory.cpp` from the base reproduces the lifetime failure on all three and the guest-prefix failure on RADV. - The Windows cut/reimport cases pass on the exact head with the parent as a negative control. Chuk49 also reports the exact head passing on an AMD Radeon 8060S (Strix Halo, RADV). Could you reassess the outstanding changes-requested review with these results in view, and let me know if you still see a specific gap?
MarcZX10 commented 2026-10-20 18:47:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-20T18:47:52Z.


Pushed the clean rebase to current main (b85d972f4208). The series now has five focused commits, all authored by MarcZX10. The rebased head passes diff/conventions checks; I have not rerun the runtime tests, and the PR description now distinguishes the previous-head reports from current-head validation. Please reassess this head when convenient.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6298563506 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7849#issuecomment-6298563506). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-20T18:47:52Z. --- Pushed the clean rebase to current main (`b85d972f4208`). The series now has five focused commits, all authored by MarcZX10. The rebased head passes diff/conventions checks; I have not rerun the runtime tests, and the PR description now distinguishes the previous-head reports from current-head validation. Please reassess this head when convenient.
MarcZX10 commented 2026-10-20 18:51:53 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-20T18:51:53Z.


Upstream main advanced to 84870f8a, so I rebased the same five-commit series again. Its only intervening main change was FileEvent.cpp; this PR does not touch that file. The new head d96a03c628 passes diff and conventions checks. Runtime tests have not been rerun on this rebased head, and the PR description keeps the earlier-head reports separate. Please reassess when convenient.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6298646616 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7849#issuecomment-6298646616). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-20T18:51:53Z. --- Upstream main advanced to `84870f8a`, so I rebased the same five-commit series again. Its only intervening main change was `FileEvent.cpp`; this PR does not touch that file. The new head `d96a03c628` passes diff and conventions checks. Runtime tests have not been rerun on this rebased head, and the PR description keeps the earlier-head reports separate. Please reassess when convenient.
MarcZX10 commented 2026-10-20 20:40:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-20T20:40:48Z.


The current head has follow-up commits d96a03c628 and fed5610a0e for the two points in your review. It removes the stale trimmed-import path and updates docs/dev/ARCHITECTURE.md to describe retiring the whole import; the middle-unmap assertion now expects that retirement. The author also added a Windows exact-head run showing the cut/reimport cases pass and the negative controls fail as expected (comment from screamm, Oct 20). Could you recheck the latest head for the prior lavapipe failure and docs wording?

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6301001459 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7849#issuecomment-6301001459). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-20T20:40:48Z. --- The current head has follow-up commits `d96a03c628` and `fed5610a0e` for the two points in your review. It removes the stale trimmed-import path and updates `docs/dev/ARCHITECTURE.md` to describe retiring the whole import; the middle-unmap assertion now expects that retirement. The author also added a Windows exact-head run showing the cut/reimport cases pass and the negative controls fail as expected (comment from screamm, Oct 20). Could you recheck the latest head for the prior lavapipe failure and docs wording?
janzezno commented 2026-10-20 20:58:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by janzezno on 2026-10-20T20:58:35Z.


Run on RADV, where #7784 reproduces.

Host: Arch Linux, kernel 7.2.11, AMD Radeon RX 7900 GRE (RADV NAVI31), Mesa 26.2.5, GCC 16.2.1, Release, BUILD_TESTING=ON.
main 50e0624d7; PR head d96a03c62 applied on top.

ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ctest --test-dir build -R 'guest_memory_lifetime|host_import|agc_driver_recorder' -V

  • main: agc_driver_guest_memory_lifetime fails with radv/amdgpu: The CS has been rejected, see dmesg for more information (-14) and guest memory host import lifetime: guest prefix unmap failed; 2 × VUID-vkResetFences-pFences-01123. The six other agc_driver_guest_memory_lifetime_* variants pass.
  • PR: 17 of 17 pass, 3 repeats; no VUID-, no CS rejection.
  • The validation layer loaded in both runs (no was not found but was requested).
  • Full suite with the PR, ctest -j12, 2 runs: no new failures. The two that remain also fail on main: agc_driver_image_array_window_past_layer_limit (#8361) and agc_driver_tessellation (Mesa, #5444).
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6301341715 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7849#issuecomment-6301341715). Originally posted by [janzezno](https://github.com/janzezno) on 2026-10-20T20:58:35Z. --- Run on RADV, where #7784 reproduces. Host: Arch Linux, kernel 7.2.11, AMD Radeon RX 7900 GRE (RADV NAVI31), Mesa 26.2.5, GCC 16.2.1, Release, `BUILD_TESTING=ON`. `main` `50e0624d7`; PR head `d96a03c62` applied on top. `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ctest --test-dir build -R 'guest_memory_lifetime|host_import|agc_driver_recorder' -V` - `main`: `agc_driver_guest_memory_lifetime` fails with `radv/amdgpu: The CS has been rejected, see dmesg for more information (-14)` and `guest memory host import lifetime: guest prefix unmap failed`; 2 × `VUID-vkResetFences-pFences-01123`. The six other `agc_driver_guest_memory_lifetime_*` variants pass. - PR: 17 of 17 pass, 3 repeats; no `VUID-`, no CS rejection. - The validation layer loaded in both runs (no `was not found but was requested`). - Full suite with the PR, `ctest -j12`, 2 runs: no new failures. The two that remain also fail on `main`: `agc_driver_image_array_window_past_layer_limit` (#8361) and `agc_driver_tessellation` (Mesa, #5444).
MarcZX10 commented 2026-10-20 21:00:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-20T21:00:49Z.


@adriadam10, could you reassess the current head d96a03c628ec1125972945c3ed6f4a230ba384c4 against your review when convenient?

The reviewer's two requested points appear addressed in the current diff: the overlap check now routes cuts through whole-import retirement, and docs/dev/ARCHITECTURE.md describes retiring the import and re-importing surviving ranges. The PR also has exact-head reports on the earlier 5338420704 revision for the strengthened middle-unmap/prefix assertions, including the parent negative control on Linux GPU setups and Windows. Those runtime reports predate the current rebase; this host cannot run the AGC tests past its CPU-feature guard, and hosted Linux/Windows jobs are skipped. I have not treated those older reports as a runtime pass for d96a03c.

Please let us know whether the requested code/docs changes are sufficient, or what specific gap remains on the current head.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6301384808 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7849#issuecomment-6301384808). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-20T21:00:49Z. --- @adriadam10, could you reassess the current head `d96a03c628ec1125972945c3ed6f4a230ba384c4` against your review when convenient? The reviewer's two requested points appear addressed in the current diff: the overlap check now routes cuts through whole-import retirement, and `docs/dev/ARCHITECTURE.md` describes retiring the import and re-importing surviving ranges. The PR also has exact-head reports on the earlier `5338420704` revision for the strengthened middle-unmap/prefix assertions, including the parent negative control on Linux GPU setups and Windows. Those runtime reports predate the current rebase; this host cannot run the AGC tests past its CPU-feature guard, and hosted Linux/Windows jobs are skipped. I have not treated those older reports as a runtime pass for `d96a03c`. Please let us know whether the requested code/docs changes are sufficient, or what specific gap remains on the current head.
MarcZX10 commented 2026-10-20 21:24:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-20T21:24:35Z.


Thanks for running the current head on RADV with the validation layer enabled and comparing it with main. The 17/17 result across three runs, with no VUIDs or queue rejection, directly addresses the reported lavapipe/RADV failure and provides a useful exact-head control.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6301807559 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7849#issuecomment-6301807559). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-20T21:24:35Z. --- Thanks for running the current head on RADV with the validation layer enabled and comparing it with main. The 17/17 result across three runs, with no VUIDs or queue rejection, directly addresses the reported lavapipe/RADV failure and provides a useful exact-head control.
MarcZX10 commented 2026-10-20 21:48:04 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-20T21:48:04Z.


Thanks for the RADV run and the main control. The 17/17 focused passes across three repeats, with the validation-layer and queue-rejection findings absent on the PR head, are useful independent evidence that this change addresses the reported guest-memory lifetime failure. I’ve noted that the other two full-suite failures also reproduce on main.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6302360452 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7849#issuecomment-6302360452). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-20T21:48:04Z. --- Thanks for the RADV run and the main control. The 17/17 focused passes across three repeats, with the validation-layer and queue-rejection findings absent on the PR head, are useful independent evidence that this change addresses the reported guest-memory lifetime failure. I’ve noted that the other two full-suite failures also reproduce on main.
MarcZX10 commented 2026-10-20 22:39:54 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-20T22:39:54Z.


The two requested follow-ups are now present on current head d96a03c628ec1125972945c3ed6f4a230ba384c4: ARCHITECTURE.md describes whole-import retirement on a cut, and surviving ranges being imported again. A fresh RADV/Mesa 26.2.5 run reports the relevant 17/17 tests passing with validation and no VUIDs, but I understand that does not answer your earlier lavapipe failure on Mesa 25.2.8. Could you rerun the exact current head on lavapipe to confirm whether that assertion is resolved? Until then I’m leaving your CI-driver finding open.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6303374024 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7849#issuecomment-6303374024). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-20T22:39:54Z. --- The two requested follow-ups are now present on current head `d96a03c628ec1125972945c3ed6f4a230ba384c4`: `ARCHITECTURE.md` describes whole-import retirement on a cut, and surviving ranges being imported again. A fresh RADV/Mesa 26.2.5 run reports the relevant 17/17 tests passing with validation and no VUIDs, but I understand that does not answer your earlier lavapipe failure on Mesa 25.2.8. Could you rerun the exact current head on lavapipe to confirm whether that assertion is resolved? Until then I’m leaving your CI-driver finding open.
MarcZX10 commented 2026-10-21 01:38:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T01:38:31Z.


I rechecked current head d96a03c628ec1125972945c3ed6f4a230ba384c4 and the CI checks. The Linux runtime job is skipped, and the available exact-head device reports are Windows/NVIDIA and RADV/RX 7900 GRE; I found no exact-head lavapipe run resolving the original CI-driver failure. WaitForLeasesAndImports now routes overlapping cuts through import retirement after dropping the cached address space, but I cannot verify the lavapipe branch locally (the saved worktree is absent and this host lacks the AGC runtime CPU/GPU requirements). Please add an exact-head lavapipe result or keep the reviewer’s driver-specific concern open.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6305868046 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7849#issuecomment-6305868046). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-21T01:38:31Z. --- I rechecked current head `d96a03c628ec1125972945c3ed6f4a230ba384c4` and the CI checks. The Linux runtime job is skipped, and the available exact-head device reports are Windows/NVIDIA and RADV/RX 7900 GRE; I found no exact-head lavapipe run resolving the original CI-driver failure. `WaitForLeasesAndImports` now routes overlapping cuts through import retirement after dropping the cached address space, but I cannot verify the lavapipe branch locally (the saved worktree is absent and this host lacks the AGC runtime CPU/GPU requirements). Please add an exact-head lavapipe result or keep the reviewer’s driver-specific concern open.
MarcZX10 commented 2026-10-21 07:22:43 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T07:22:43Z.


I rechecked the current head d96a03c628ec1125972945c3ed6f4a230ba384c4 against the earlier middle-unmap report. The new regression now asserts that the import no longer covers the unmapped range, that the prefix import is retired too, and that a later GPU use reimports the retained prefix. The architecture note now describes whole-import retirement on a cut.

I built agc_driver_guest_memory_lifetime_tests and its dependencies with GCC 12.2.0, and the conventions and diff checks pass. I attempted the copy/direct/locked/heap modes, but all abort at startup because this host lacks the AVX2-era CPU features AnyPS5 requires; Vulkan initialization and validation did not run. I updated the Tested section with those exact results. Could you re-review the current code and documentation changes?

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6310448145 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7849#issuecomment-6310448145). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-21T07:22:43Z. --- I rechecked the current head `d96a03c628ec1125972945c3ed6f4a230ba384c4` against the earlier middle-unmap report. The new regression now asserts that the import no longer covers the unmapped range, that the prefix import is retired too, and that a later GPU use reimports the retained prefix. The architecture note now describes whole-import retirement on a cut. I built `agc_driver_guest_memory_lifetime_tests` and its dependencies with GCC 12.2.0, and the conventions and diff checks pass. I attempted the copy/direct/locked/heap modes, but all abort at startup because this host lacks the AVX2-era CPU features AnyPS5 requires; Vulkan initialization and validation did not run. I updated the Tested section with those exact results. Could you re-review the current code and documentation changes?
root-over commented 2026-10-21 07:23:10 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by root-over on 2026-10-21T07:23:10Z.


@adriadam10 @MarcZX10 an exact-head lavapipe run, which is the case the review's first point was about, plus RADV on GCN as the control where #7784 reproduces.

Linux (Ubuntu, kernel 7.0), Ryzen 5 5625U, GCC 15.2.0, Release, one build directory. main b77bd5880 against the same main with head d96a03c62 merged (clean merge). One ICD per run via VK_DRIVER_FILES; the logs name the device in every test:

  • lavapipe: llvmpipe (LLVM 21.1.8, 256 bits), Mesa 26.0.8
  • RADV: RENOIR (Vega/GCN 5 iGPU), Mesa 26.0.8
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
ctest --test-dir build -j1 --timeout 120 --repeat until-fail:3 -V -R 'guest_memory_lifetime|host_import|agc_driver_recorder'

18 tests, each run 3 times:

main main + this head
lavapipe 18/18, 0 VUID- 18/18, 0 VUID-
RADV RENOIR 17/18: agc_driver_guest_memory_lifetime fails on its first run with radv/amdgpu: The CS has been rejected, see dmesg for more information (-14)., then guest prefix unmap failed, with 2 VUID-vkResetFences-pFences-01123 lines 18/18, 0 VUID-
  • On lavapipe, agc_driver_guest_memory_lifetime passes 3/3 on this head, including the asserts at GuestMemoryLifetime.cpp L123-L126: after the middle unmap, no import spans the range and the prefix is not imported, and the prefix is imported again by the next Fill. So the failure in the review (middle unmap left the original host import alive across the unmapped range) does not reproduce on d96a03c62.
  • The RADV result on main is the same failure as #7784, and this head removes it.
  • Neither log has was not found but was requested by env var VK_INSTANCE_LAYERS, and no test was skipped.
  • docs/dev/ARCHITECTURE.md on this head (L133) describes retiring the whole import, and retireOrTrim, trimmed and reattachTrimmed no longer appear in the docs or the driver, which covers the review's second point.

Not run: a title.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6310455217 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7849#issuecomment-6310455217). Originally posted by [root-over](https://github.com/root-over) on 2026-10-21T07:23:10Z. --- @adriadam10 @MarcZX10 an exact-head lavapipe run, which is the case the review's first point was about, plus RADV on GCN as the control where #7784 reproduces. Linux (Ubuntu, kernel 7.0), Ryzen 5 5625U, GCC 15.2.0, Release, one build directory. `main` `b77bd5880` against the same `main` with head `d96a03c62` merged (clean merge). One ICD per run via `VK_DRIVER_FILES`; the logs name the device in every test: - lavapipe: llvmpipe (LLVM 21.1.8, 256 bits), Mesa 26.0.8 - RADV: RENOIR (Vega/GCN 5 iGPU), Mesa 26.0.8 ``` ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \ ctest --test-dir build -j1 --timeout 120 --repeat until-fail:3 -V -R 'guest_memory_lifetime|host_import|agc_driver_recorder' ``` 18 tests, each run 3 times: | | `main` | `main` + this head | |---|---|---| | lavapipe | 18/18, 0 `VUID-` | **18/18, 0 `VUID-`** | | RADV RENOIR | 17/18: `agc_driver_guest_memory_lifetime` fails on its first run with `radv/amdgpu: The CS has been rejected, see dmesg for more information (-14).`, then `guest prefix unmap failed`, with 2 `VUID-vkResetFences-pFences-01123` lines | **18/18, 0 `VUID-`** | - On lavapipe, `agc_driver_guest_memory_lifetime` passes 3/3 on this head, including the asserts at `GuestMemoryLifetime.cpp` L123-L126: after the middle unmap, no import spans the range and the prefix is not imported, and the prefix is imported again by the next `Fill`. So the failure in the review (`middle unmap left the original host import alive across the unmapped range`) does not reproduce on `d96a03c62`. - The RADV result on `main` is the same failure as #7784, and this head removes it. - Neither log has `was not found but was requested by env var VK_INSTANCE_LAYERS`, and no test was skipped. - `docs/dev/ARCHITECTURE.md` on this head (L133) describes retiring the whole import, and `retireOrTrim`, `trimmed` and `reattachTrimmed` no longer appear in the docs or the driver, which covers the review's second point. Not run: a title.
MarcZX10 commented 2026-10-21 07:24:40 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T07:24:40Z.


Thanks @root-over for the exact-head controls. This directly answers the lavapipe report: the current head passes all 18 focused tests on lavapipe, and the RADV main control reproduces the reported prefix-unmap failure while this head passes 18/18 with no VUIDs. I’ve added the full environment and results to the Tested section. The architecture note also no longer describes the retired trim path. @adriadam10, could you re-review the current head and update the outstanding review if these address both points?

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6310479562 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7849#issuecomment-6310479562). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-21T07:24:40Z. --- Thanks @root-over for the exact-head controls. This directly answers the lavapipe report: the current head passes all 18 focused tests on lavapipe, and the RADV main control reproduces the reported prefix-unmap failure while this head passes 18/18 with no VUIDs. I’ve added the full environment and results to the Tested section. The architecture note also no longer describes the retired trim path. @adriadam10, could you re-review the current head and update the outstanding review if these address both points?
DavidSamir commented 2026-10-21 12:03:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by DavidSamir on 2026-10-21T12:03:25Z.


AMD Radeon 680M data point (Windows 11, AMD 32.0.21030.2001, 12 GB RAM), main 27fabb6b7: agc_reimport_bench fails rather than skips there. The default host-import budget is 1236 MiB (HostImportBudget with a ~2.4 GB host heap), and the bench holds its 1126 MiB range live while it imports the 256 MiB inside cut (1 imports (256 MiB) refused), so it ends with the smaller side of a cut inside the re-import bench range was not imported. With APS5_HOST_IMPORT_MIB=4096 it passes. Since this PR rewrites the bench, a budget skip may belong here.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6315429646 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7849#issuecomment-6315429646). Originally posted by [DavidSamir](https://github.com/DavidSamir) on 2026-10-21T12:03:25Z. --- AMD Radeon 680M data point (Windows 11, AMD 32.0.21030.2001, 12 GB RAM), `main` `27fabb6b7`: `agc_reimport_bench` fails rather than skips there. The default host-import budget is 1236 MiB (`HostImportBudget` with a ~2.4 GB host heap), and the bench holds its 1126 MiB range live while it imports the 256 MiB inside cut (`1 imports (256 MiB) refused`), so it ends with `the smaller side of a cut inside the re-import bench range was not imported`. With `APS5_HOST_IMPORT_MIB=4096` it passes. Since this PR rewrites the bench, a budget skip may belong here. AI-assisted: yes
MarcZX10 commented 2026-10-21 16:54:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T16:54:24Z.


I rebased the five implementation commits onto current main and added a budget guard for the Windows-only re-import benchmark. It now returns the configured skip code when the current host-import budget has less than 1,382 MiB available, covering the reported 1,236 MiB Radeon 680M setup; otherwise the existing benchmark runs unchanged. The exact current head c566d31d1f472506518ad9490c5347141cdebf1a builds agc_driver_recorder_tests on Linux, and conventions/eligibility/labels/report pass. The benchmark cannot run on this Linux host because it is Windows-only. @DavidSamir, could you rerun agc_reimport_bench on the Radeon 680M at this head and confirm it reports a skip with the default budget, then still passes with APS5_HOST_IMPORT_MIB=4096? Previous lavapipe/RADV runtime reports were for d96a03c62, before the rebase.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6321593545 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7849#issuecomment-6321593545). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-21T16:54:24Z. --- I rebased the five implementation commits onto current `main` and added a budget guard for the Windows-only re-import benchmark. It now returns the configured skip code when the current host-import budget has less than 1,382 MiB available, covering the reported 1,236 MiB Radeon 680M setup; otherwise the existing benchmark runs unchanged. The exact current head `c566d31d1f472506518ad9490c5347141cdebf1a` builds `agc_driver_recorder_tests` on Linux, and conventions/eligibility/labels/report pass. The benchmark cannot run on this Linux host because it is Windows-only. @DavidSamir, could you rerun `agc_reimport_bench` on the Radeon 680M at this head and confirm it reports a skip with the default budget, then still passes with `APS5_HOST_IMPORT_MIB=4096`? Previous lavapipe/RADV runtime reports were for `d96a03c62`, before the rebase.
adriadam10 commented 2026-10-21 18:10:27 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-21T18:10:27Z.


Re-checked both points against the new head:

  • The cache-drop path in WaitForLeasesAndImports now falls through to the import-retirement loop when an import overlaps the cut, and the middle-unmap test asserts that neither the whole import nor the prefix survives and that the prefix is imported again. The exact-head lavapipe and RADV runs from @root-over (with the main control failing) cover the CI-driver case.
  • docs/dev/ARCHITECTURE.md now describes whole-import retirement on a cut, with no retireOrTrim/trimmed/reattachTrimmed left.

The re-import bench skip below the host-import budget also covers the 680M report; merged.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6323119592 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7849#issuecomment-6323119592). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-21T18:10:27Z. --- Re-checked both points against the new head: - The cache-drop path in `WaitForLeasesAndImports` now falls through to the import-retirement loop when an import overlaps the cut, and the middle-unmap test asserts that neither the whole import nor the prefix survives and that the prefix is imported again. The exact-head lavapipe and RADV runs from @root-over (with the `main` control failing) cover the CI-driver case. - `docs/dev/ARCHITECTURE.md` now describes whole-import retirement on a cut, with no `retireOrTrim`/`trimmed`/`reattachTrimmed` left. The re-import bench skip below the host-import budget also covers the 680M report; 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!7849
No description provided.