test(agc): honor GPU selection in pooled buffer checks #7104

Merged
Amoenus merged 1 commit from upstream-pr/7104 into main 2026-10-17 13:01:32 +00:00
Amoenus commented 2026-10-17 11:47:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Amoenus on 2026-10-17T11:47:01Z.


What

Make agc_driver_pooled_buffer_range honor its existing ANYPS5_GPU device-name substring selector. It currently picks the first discrete adapter and only then checks the requested name, so requesting the AMD integrated GPU on an NVIDIA/AMD machine throws before device creation.

Select the requested matching adapter during enumeration. An unset or empty selector retains the discrete-device preference; an unmatched name still throws. One fixture file, 3 additions / 2 deletions; no production changes.

Found while validating #6882 during PPSA99902 bring-up (discussion #4443). This enables actual AMD allocation/cleanup validation on a dual-GPU host; it does not change title execution. Prior report: https://github.com/boykopovar/AnyPS5/pull/6882#issuecomment-6233368117.

Tested

Baseline: unchanged main 1846719e46ec35a8cc1de1ca0db57fbcfab4af4b. Change: 3f1dcad6ddcba68a941a8243b1f95e1c48c67b4a. Latest main checked before submission: e09dbc2b4231103552a108b2c582cee52e46be68; its intervening libc changes do not touch AGC, this fixture, or contribution guidance, and the branch merges cleanly.

Reproduce on a host with NVIDIA discrete and AMD integrated adapters:

$env:ANYPS5_GPU = 'AMD Radeon(TM) Graphics'
ctest --test-dir build -V -R '^agc_driver_pooled_buffer_range$' --timeout 30 --no-tests=error

Main fails 3/3 fresh processes before vkCreateDevice:

device NVIDIA GeForce RTX 5080 vendor=0x10de device=0x2c02
AGC graphics: selected device does not match ANYPS5_GPU

On the change, every positive run verifies the actual fixture-reported vendor/device, zero leaked slab-metadata bytes, and the full pooled-buffer fixture success:

Host Selector cases Result, 3 fresh processes per case
Windows 11 Enterprise 26200 unset, empty, RTX 5080, full NVIDIA name 12 NVIDIA passes
Same host full AMD name, Radeon 6 AMD passes
Ubuntu 24.04 / WSL2 unset, empty, llvmpipe 9 llvmpipe passes
Both hosts deliberately unmatched name 6 expected explicit refusals

Windows positive runs loaded Khronos validation 1.4.363: zero validation errors/warnings. The Linux matrix did not explicitly enable that layer. Every fixture process completed under 1 second locally (30-second CTest limit).

Also: relinker, all system-library targets, this fixture and agc_driver_graphics_tests build successfully on Windows GCC 15.2.0 and Linux GCC 13.3. The separate CPU graphics group passes 3/3 per OS. Changed-TU Cppcheck and clang-tidy are clean (7.623 seconds combined; no parse/configuration errors). Conventions and git diff --check pass. This is focused validation, not a full-suite or performance claim.

Ran tools/pr_overlap.py; manually inspected its uncomparable #6222 file: that PR only adds macOS Vulkan loading/portability setup in this fixture. #6788 changes runtime driver-name selection; #6943, #7057 and #7065 carry the pre-existing selector assertion but do not fix this selection loop. No duplicate implementation found.

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 (test fixture correction discovered during PPSA99902 #4443 validation)
  • GPUs tested: NVIDIA GeForce RTX 5080 (10de:2c02), driver 32.0.16.1062, Windows 11 Enterprise 26200; AMD Radeon(TM) Graphics (1002:13c0), driver 32.0.21036.18, same OS; Mesa 25.2.8 llvmpipe (LLVM 20.1.2), Ubuntu 24.04 / WSL2
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4899782601 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7104). Originally posted by [Amoenus](https://github.com/Amoenus) on 2026-10-17T11:47:01Z. --- ### What Make `agc_driver_pooled_buffer_range` honor its existing `ANYPS5_GPU` device-name substring selector. It currently picks the first discrete adapter and only then checks the requested name, so requesting the AMD integrated GPU on an NVIDIA/AMD machine throws before device creation. Select the requested matching adapter during enumeration. An unset or empty selector retains the discrete-device preference; an unmatched name still throws. One fixture file, 3 additions / 2 deletions; no production changes. Found while validating #6882 during PPSA99902 bring-up (discussion #4443). This enables actual AMD allocation/cleanup validation on a dual-GPU host; it does not change title execution. Prior report: https://github.com/boykopovar/AnyPS5/pull/6882#issuecomment-6233368117. ### Tested <!-- 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. --> Baseline: unchanged main `1846719e46ec35a8cc1de1ca0db57fbcfab4af4b`. Change: `3f1dcad6ddcba68a941a8243b1f95e1c48c67b4a`. Latest main checked before submission: `e09dbc2b4231103552a108b2c582cee52e46be68`; its intervening libc changes do not touch AGC, this fixture, or contribution guidance, and the branch merges cleanly. Reproduce on a host with NVIDIA discrete and AMD integrated adapters: ```powershell $env:ANYPS5_GPU = 'AMD Radeon(TM) Graphics' ctest --test-dir build -V -R '^agc_driver_pooled_buffer_range$' --timeout 30 --no-tests=error ``` Main fails 3/3 fresh processes before `vkCreateDevice`: ```text device NVIDIA GeForce RTX 5080 vendor=0x10de device=0x2c02 AGC graphics: selected device does not match ANYPS5_GPU ``` On the change, every positive run verifies the actual fixture-reported vendor/device, zero leaked slab-metadata bytes, and the full pooled-buffer fixture success: | Host | Selector cases | Result, 3 fresh processes per case | | --- | --- | --- | | Windows 11 Enterprise 26200 | unset, empty, `RTX 5080`, full NVIDIA name | 12 NVIDIA passes | | Same host | full AMD name, `Radeon` | 6 AMD passes | | Ubuntu 24.04 / WSL2 | unset, empty, `llvmpipe` | 9 llvmpipe passes | | Both hosts | deliberately unmatched name | 6 expected explicit refusals | Windows positive runs loaded Khronos validation 1.4.363: zero validation errors/warnings. The Linux matrix did not explicitly enable that layer. Every fixture process completed under 1 second locally (30-second CTest limit). Also: relinker, all system-library targets, this fixture and `agc_driver_graphics_tests` build successfully on Windows GCC 15.2.0 and Linux GCC 13.3. The separate CPU graphics group passes 3/3 per OS. Changed-TU Cppcheck and clang-tidy are clean (7.623 seconds combined; no parse/configuration errors). Conventions and `git diff --check` pass. This is focused validation, not a full-suite or performance claim. Ran `tools/pr_overlap.py`; manually inspected its uncomparable #6222 file: that PR only adds macOS Vulkan loading/portability setup in this fixture. #6788 changes runtime driver-name selection; #6943, #7057 and #7065 carry the pre-existing selector assertion but do not fix this selection loop. No duplicate implementation found. ### 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 (test fixture correction discovered during PPSA99902 #4443 validation) - [x] GPUs tested: NVIDIA GeForce RTX 5080 (10de:2c02), driver 32.0.16.1062, Windows 11 Enterprise 26200; AMD Radeon(TM) Graphics (1002:13c0), driver 32.0.21036.18, same OS; Mesa 25.2.8 llvmpipe (LLVM 20.1.2), Ubuntu 24.04 / WSL2 - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-17 12:07:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-17T12:07:16Z.


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 6222 core/libs/prx/libSceAgcDriver/tests/execution/PooledBufferRange.cpp
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6233695337 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7104#issuecomment-6233695337). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-17T12:07:16Z. --- <!-- 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 6222](https://www.github.com/boykopovar/AnyPS5/pull/6222) | `core/libs/prx/libSceAgcDriver/tests/execution/PooledBufferRange.cpp` |
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!7104
No description provided.