fix(agc): keep failed import handles out of cleanup #7082

Merged
Ondra97 merged 3 commits from upstream-pr/7082 into main 2026-10-20 23:18:29 +00:00
Ondra97 commented 2026-10-17 10:38:54 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Ondra97 on 2026-10-17T10:38:54Z.


What

A failed vkCreateBuffer or vkAllocateMemory can leave an undefined non-null output. bindImport stored those outputs directly in the import entry, and fallback cleanup could call vkDestroyBuffer or vkFreeMemory on a handle that was never successfully created. This can turn an import failure into invalid driver calls instead of the intended copy fallback.

Publish the buffer handle after successful creation and free imported memory only when the existing allocated flag confirms success. Binding failures still destroy the valid buffer and allocation. Failure reporting and file descriptor ownership stay intact.

The Vulkan runtime-error rules leave error outputs undefined unless a command specifies otherwise. The regression injects host/device out-of-memory results with non-null error outputs, counts invalid release attempts before forwarding to the real backend, and checks ordinary cleanup and fresh imports. No physical memory exhaustion or invalid native destruction is induced.

Related: #6548 selects a coherent import memory type and #6499 retains imports across split ranges. Their implementations were compared; neither handles these failed outputs. The allocation-status guard leaves the type-selection line intact. #6548 already conflicts with main above bindImport; this change adds no conflict block.

Tested

Base: bf2053816976bb9c821e37df58ef64a7362b81c7 with the same regression cases. Fixed head: a963820ce4288db9d2ef56d3c696d232bea26191. Release, BUILD_TESTING=ON, SPIRV-Tools disabled. There are six cases per backend: create, allocate and bind, each with VK_ERROR_OUT_OF_HOST_MEMORY and VK_ERROR_OUT_OF_DEVICE_MEMORY. Each case registers a 64 KiB heap with imports set to Unwatch. The refused-import table is cleared before the successful retry, matching the existing refusal-cache policy.

Windows (native host)

AMD Ryzen 9 7900X, 32 GB RAM, NVIDIA GeForce RTX 4070 Ti SUPER, driver 617.42 / 32.0.16.1742, Windows 11 Pro 10.0.26300, WinLibs GCC 15.2.0; Tracy enabled.

Metric Before (base) After (fix)
Invalid cleanup calls, four create/allocation failure cases, NVIDIA 4/4 0/4
Invalid cleanup calls, same CPU failure cases 4/4 0/4

The two bind-error controls released their valid objects on both revisions. All six fresh imports on each native run copied 4096 bytes through real Vulkan buffers and verified GPU readback. Native device diagnostics: vendor=0x10de, device=0x2705, host-import alignment 4096 bytes. Guards intercepted the baseline's invalid handles before they reached the driver.

Full application/library build passed: cmake --build build-runtime --target all libs --parallel 3. Of 27 selected tests, 26 passed, 0 failed, 1 skipped. The skip is agc_host_import_sparse, whose fixture is Linux-only. ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and ANYPS5_GPU=NVIDIA GeForce RTX 4070 Ti SUPER were set:

ctest --test-dir build-runtime --output-on-failure -V -R "^(patched_libraries|agc_host_import_retire|agc_host_import_sparse|agc_device_memory_fallback|agc_buffer_pool|agc_driver_(host_import_failure_handles|host_import_at_map|host_import_windows|host_import_teardown|bda_device|bda_span_reads|pooled_buffer_range|buffer.*|flat_cache_bits|constant_store|sampled_cache_budget|storage_cache_budget))$"

The primary CPU regression is agc_host_import_retire_tests; the native regression is agc_driver_bda_device_tests --host-import-failures. Both passed without skips. Conventions and test registration passed.

Linux (VirtualBox)

Ubuntu 24.04.5 LTS, kernel 7.0.0-31-generic, GCC 13.3.0, 4 vCPU and 8 GiB assigned RAM; VirtualBox 7.2.20r175154 on the Windows host above. Tracy disabled. Graphics: not exercised.

The same fixed head and required dependency sources were verified against Git objects. The CPU baseline reproduced four invalid release attempts; the fix produced zero, with all six import-failure cases and retries clean. Full application/library build, including the modified native-fixture compilation, passed. Of 8 selected CPU tests, 7 passed, 0 failed, 1 skipped. agc_host_import_sparse skipped because /dev/udmabuf is inaccessible; actual dma-buf importing is untested. In these commands build is the prepared Linux build directory:

cmake --build build --target all libs agc_host_import_retire_tests agc_driver_bda_device_tests --parallel 2
ctest --test-dir build --output-on-failure -V -R "^(agc_host_import_retire|agc_host_import_sparse|agc_device_memory_fallback|agc_buffer_pool|agc_structurizer|agc_shader_mode_register|agc_shader_control_flow|agc_constant_phi)$"

Conventions and test registration passed. Full hosted Windows/Linux builds require a maintainer's manual workflow dispatch.

Linux graphics/Vulkan tests: NOT RUN — intentionally excluded from VirtualBox validation.
Native/bare-metal Linux was not tested.
Native Linux GPU validation: not tested.

No retail title run, FPS improvement or other GPU-vendor result is claimed.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 4070 Ti SUPER, driver 617.42 / 32.0.16.1742, Windows 11 Pro 10.0.26300
  • AI-assisted: yes — Codex
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4899374313 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7082). Originally posted by [Ondra97](https://github.com/Ondra97) on 2026-10-17T10:38:54Z. --- ### What A failed `vkCreateBuffer` or `vkAllocateMemory` can leave an undefined non-null output. `bindImport` stored those outputs directly in the import entry, and fallback cleanup could call `vkDestroyBuffer` or `vkFreeMemory` on a handle that was never successfully created. This can turn an import failure into invalid driver calls instead of the intended copy fallback. Publish the buffer handle after successful creation and free imported memory only when the existing `allocated` flag confirms success. Binding failures still destroy the valid buffer and allocation. Failure reporting and file descriptor ownership stay intact. The [Vulkan runtime-error rules](https://docs.vulkan.org/spec/latest/chapters/fundamentals.html) leave error outputs undefined unless a command specifies otherwise. The regression injects host/device out-of-memory results with non-null error outputs, counts invalid release attempts before forwarding to the real backend, and checks ordinary cleanup and fresh imports. No physical memory exhaustion or invalid native destruction is induced. Related: #6548 selects a coherent import memory type and #6499 retains imports across split ranges. Their implementations were compared; neither handles these failed outputs. The allocation-status guard leaves the type-selection line intact. #6548 already conflicts with main above `bindImport`; this change adds no conflict block. ### Tested Base: `bf2053816976bb9c821e37df58ef64a7362b81c7` with the same regression cases. Fixed head: `a963820ce4288db9d2ef56d3c696d232bea26191`. Release, `BUILD_TESTING=ON`, SPIRV-Tools disabled. There are six cases per backend: create, allocate and bind, each with `VK_ERROR_OUT_OF_HOST_MEMORY` and `VK_ERROR_OUT_OF_DEVICE_MEMORY`. Each case registers a 64 KiB heap with imports set to `Unwatch`. The refused-import table is cleared before the successful retry, matching the existing refusal-cache policy. **Windows (native host)** AMD Ryzen 9 7900X, 32 GB RAM, NVIDIA GeForce RTX 4070 Ti SUPER, driver 617.42 / 32.0.16.1742, Windows 11 Pro 10.0.26300, WinLibs GCC 15.2.0; Tracy enabled. | Metric | Before (base) | After (fix) | | --- | --- | --- | | Invalid cleanup calls, four create/allocation failure cases, NVIDIA | 4/4 | 0/4 | | Invalid cleanup calls, same CPU failure cases | 4/4 | 0/4 | The two bind-error controls released their valid objects on both revisions. All six fresh imports on each native run copied 4096 bytes through real Vulkan buffers and verified GPU readback. Native device diagnostics: `vendor=0x10de`, `device=0x2705`, host-import alignment 4096 bytes. Guards intercepted the baseline's invalid handles before they reached the driver. Full application/library build passed: `cmake --build build-runtime --target all libs --parallel 3`. Of **27 selected tests, 26 passed, 0 failed, 1 skipped**. The skip is `agc_host_import_sparse`, whose fixture is Linux-only. `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1` and `ANYPS5_GPU=NVIDIA GeForce RTX 4070 Ti SUPER` were set: ```text ctest --test-dir build-runtime --output-on-failure -V -R "^(patched_libraries|agc_host_import_retire|agc_host_import_sparse|agc_device_memory_fallback|agc_buffer_pool|agc_driver_(host_import_failure_handles|host_import_at_map|host_import_windows|host_import_teardown|bda_device|bda_span_reads|pooled_buffer_range|buffer.*|flat_cache_bits|constant_store|sampled_cache_budget|storage_cache_budget))$" ``` The primary CPU regression is `agc_host_import_retire_tests`; the native regression is `agc_driver_bda_device_tests --host-import-failures`. Both passed without skips. Conventions and test registration passed. **Linux (VirtualBox)** Ubuntu 24.04.5 LTS, kernel 7.0.0-31-generic, GCC 13.3.0, 4 vCPU and 8 GiB assigned RAM; VirtualBox 7.2.20r175154 on the Windows host above. Tracy disabled. Graphics: not exercised. The same fixed head and required dependency sources were verified against Git objects. The CPU baseline reproduced four invalid release attempts; the fix produced zero, with all six import-failure cases and retries clean. Full application/library build, including the modified native-fixture compilation, passed. Of **8 selected CPU tests, 7 passed, 0 failed, 1 skipped**. `agc_host_import_sparse` skipped because `/dev/udmabuf` is inaccessible; actual dma-buf importing is untested. In these commands `build` is the prepared Linux build directory: ```text cmake --build build --target all libs agc_host_import_retire_tests agc_driver_bda_device_tests --parallel 2 ctest --test-dir build --output-on-failure -V -R "^(agc_host_import_retire|agc_host_import_sparse|agc_device_memory_fallback|agc_buffer_pool|agc_structurizer|agc_shader_mode_register|agc_shader_control_flow|agc_constant_phi)$" ``` Conventions and test registration passed. Full hosted Windows/Linux builds require a maintainer's manual workflow dispatch. Linux graphics/Vulkan tests: NOT RUN — intentionally excluded from VirtualBox validation. Native/bare-metal Linux was not tested. Native Linux GPU validation: not tested. No retail title run, FPS improvement or other GPU-vendor result is claimed. <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: NVIDIA GeForce RTX 4070 Ti SUPER, driver 617.42 / 32.0.16.1742, Windows 11 Pro 10.0.26300 - [x] AI-assisted: yes — Codex
github-actions[bot] commented 2026-10-17 10:51:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-17T10:51:41Z.


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
PR 1395 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 2434 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 4448 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 4449 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 5021 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/BdaDevice.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
PR 6044 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6146 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6185 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6186 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6187 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6188 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6192 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6197 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6209 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6280 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6292 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6300 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6412 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6481 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6501 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6548 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6615 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6636 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6682 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6683 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6718 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6747 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6788 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6808 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6820 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6868 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6905 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6946 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6947 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7002 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7048 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7085 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7201 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7395 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7446 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7464 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7473 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7505 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7514 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/HostImportRetireHold.cpp
PR 7604 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7642 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7644 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7677 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7800 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 8206 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 8295 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 8484 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 8697 core/libs/prx/libSceAgcDriver/CMakeLists.txt
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6233032278 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7082#issuecomment-6233032278). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-17T10:51:41Z. --- <!-- pr-overlap --> 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` | | [PR 1395](https://www.github.com/boykopovar/AnyPS5/pull/1395) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 2434](https://www.github.com/boykopovar/AnyPS5/pull/2434) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 4448](https://www.github.com/boykopovar/AnyPS5/pull/4448) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 4449](https://www.github.com/boykopovar/AnyPS5/pull/4449) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 5021](https://www.github.com/boykopovar/AnyPS5/pull/5021) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/BdaDevice.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` | | [PR 6044](https://www.github.com/boykopovar/AnyPS5/pull/6044) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6146](https://www.github.com/boykopovar/AnyPS5/pull/6146) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 6185](https://www.github.com/boykopovar/AnyPS5/pull/6185) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 6186](https://www.github.com/boykopovar/AnyPS5/pull/6186) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 6187](https://www.github.com/boykopovar/AnyPS5/pull/6187) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6188](https://www.github.com/boykopovar/AnyPS5/pull/6188) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6192](https://www.github.com/boykopovar/AnyPS5/pull/6192) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6197](https://www.github.com/boykopovar/AnyPS5/pull/6197) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 6209](https://www.github.com/boykopovar/AnyPS5/pull/6209) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6280](https://www.github.com/boykopovar/AnyPS5/pull/6280) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6292](https://www.github.com/boykopovar/AnyPS5/pull/6292) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 6300](https://www.github.com/boykopovar/AnyPS5/pull/6300) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6412](https://www.github.com/boykopovar/AnyPS5/pull/6412) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6481](https://www.github.com/boykopovar/AnyPS5/pull/6481) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 6501](https://www.github.com/boykopovar/AnyPS5/pull/6501) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6548](https://www.github.com/boykopovar/AnyPS5/pull/6548) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 6615](https://www.github.com/boykopovar/AnyPS5/pull/6615) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 6636](https://www.github.com/boykopovar/AnyPS5/pull/6636) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 6682](https://www.github.com/boykopovar/AnyPS5/pull/6682) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 6683](https://www.github.com/boykopovar/AnyPS5/pull/6683) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6718](https://www.github.com/boykopovar/AnyPS5/pull/6718) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6747](https://www.github.com/boykopovar/AnyPS5/pull/6747) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [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 6820](https://www.github.com/boykopovar/AnyPS5/pull/6820) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6868](https://www.github.com/boykopovar/AnyPS5/pull/6868) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6905](https://www.github.com/boykopovar/AnyPS5/pull/6905) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6946](https://www.github.com/boykopovar/AnyPS5/pull/6946) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6947](https://www.github.com/boykopovar/AnyPS5/pull/6947) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 7002](https://www.github.com/boykopovar/AnyPS5/pull/7002) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7048](https://www.github.com/boykopovar/AnyPS5/pull/7048) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7085](https://www.github.com/boykopovar/AnyPS5/pull/7085) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [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 7395](https://www.github.com/boykopovar/AnyPS5/pull/7395) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7446](https://www.github.com/boykopovar/AnyPS5/pull/7446) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 7464](https://www.github.com/boykopovar/AnyPS5/pull/7464) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7473](https://www.github.com/boykopovar/AnyPS5/pull/7473) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 7505](https://www.github.com/boykopovar/AnyPS5/pull/7505) | `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/src/GuestBufferMemory.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/HostImportRetireHold.cpp` | | [PR 7604](https://www.github.com/boykopovar/AnyPS5/pull/7604) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7642](https://www.github.com/boykopovar/AnyPS5/pull/7642) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 7644](https://www.github.com/boykopovar/AnyPS5/pull/7644) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7677](https://www.github.com/boykopovar/AnyPS5/pull/7677) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7800](https://www.github.com/boykopovar/AnyPS5/pull/7800) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 8206](https://www.github.com/boykopovar/AnyPS5/pull/8206) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 8295](https://www.github.com/boykopovar/AnyPS5/pull/8295) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 8484](https://www.github.com/boykopovar/AnyPS5/pull/8484) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 8697](https://www.github.com/boykopovar/AnyPS5/pull/8697) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` |
Amoenus commented 2026-10-19 11:10:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Amoenus on 2026-10-19T11:10:13Z.


@Ondra97 the overlap checker found your BDA fixture command-handling changes while I was validating a separate GPU-selection correction. The current fixture ignores ANYPS5_GPU, so an AMD-requested run can actually execute on NVIDIA. ycbuzi originally reported that selection gap in #3358/#3882.

The focused fork fix selects the requested device and queries/reports its actual handle. Full BDA execution now passes three times each on our RTX 5080 and Radeon Graphics, with Khronos validation and no new VUIDs; a test-only main control demonstrates the wrong-device failure. Details are in the existing report.

There are no import-behavior changes in my branch. The overlap is includes, command modes and the adjacent CTest registration. I propose #7082 first, then adapting this fixture-only follow-up while preserving your host-import mode and its attribution. Does that ordering work for you? I have kept the fix on our fork rather than opening an upstream PR before coordinating this overlap.

AI-assisted: yes, Codex.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6265826384 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7082#issuecomment-6265826384). Originally posted by [Amoenus](https://github.com/Amoenus) on 2026-10-19T11:10:13Z. --- <!-- codex-bda-selector-7082-coordination-v1 --> @Ondra97 the overlap checker found your BDA fixture command-handling changes while I was validating a separate GPU-selection correction. The current fixture ignores `ANYPS5_GPU`, so an AMD-requested run can actually execute on NVIDIA. ycbuzi originally reported that selection gap in #3358/#3882. The focused [fork fix](https://github.com/Amoenus/AnyPS5/commit/744ced43b26c7756eb39e07e2317ebb4c930f18f) selects the requested device and queries/reports its actual handle. Full BDA execution now passes three times each on our RTX 5080 and Radeon Graphics, with Khronos validation and no new VUIDs; a [test-only main control](https://github.com/Amoenus/AnyPS5/commit/a53f068578bf09854183c4053f01ed7e02b27b32) demonstrates the wrong-device failure. Details are [in the existing report](https://github.com/boykopovar/AnyPS5/issues/3358#issuecomment-6265305251). There are no import-behavior changes in my branch. The overlap is includes, command modes and the adjacent CTest registration. I propose **#7082 first**, then adapting this fixture-only follow-up while preserving your host-import mode and its attribution. Does that ordering work for you? I have kept the fix on our fork rather than opening an upstream PR before coordinating this overlap. AI-assisted: yes, Codex. <!-- /codex-bda-selector-7082-coordination-v1 -->
Ondra97 commented 2026-10-19 12:00:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Ondra97 on 2026-10-19T12:00:32Z.


@Amoenus That ordering works for me: #7082 first, followed by your fixture-only GPU-selection fix.

I compared the cumulative diff with #7082. The fixes address separate problems, and the shared fixture changes can be combined. When adapting the follow-up, please preserve --host-import-failures, Device(importFailures), the external-host-memory setup and the agc_driver_host_import_failure_handles CTest registration alongside the new selection modes.

If you open the follow-up before #7082 merges, please declare Depends on: #7082. Thanks for checking the actual selected physical device and coordinating the overlap.

AI-assisted: yes, Codex.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6266699310 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7082#issuecomment-6266699310). Originally posted by [Ondra97](https://github.com/Ondra97) on 2026-10-19T12:00:32Z. --- @Amoenus That ordering works for me: #7082 first, followed by your fixture-only GPU-selection fix. I compared the cumulative diff with #7082. The fixes address separate problems, and the shared fixture changes can be combined. When adapting the follow-up, please preserve `--host-import-failures`, `Device(importFailures)`, the external-host-memory setup and the `agc_driver_host_import_failure_handles` CTest registration alongside the new selection modes. If you open the follow-up before #7082 merges, please declare `Depends on: #7082`. Thanks for checking the actual selected physical device and coordinating the overlap. AI-assisted: yes, Codex.
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!7082
No description provided.