tests: BDA-device fixture ignores ANYPS5_GPU and can overstate vendor coverage #8157

Closed
opened 2026-10-20 00:53:24 +00:00 by Amoenus · 3 comments
Amoenus commented 2026-10-20 00:53:24 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by Amoenus on 2026-10-20T00:53:24Z.


Merged: #8167, via main commit 402763059f on 2026-10-21. Independently retested at exact PR head 3bac1f0b4355e884a64d96b288b434cdd7aa7bad. The updated validation comment records correct NVIDIA/AMD selection and confirms that the optional-Vulkan unmatched-name edge case is now resolved: all six unmatched controls exit1, with and without the require flag. The new CPU-only selector test passes3/3; nine verified GPU executions pass with loaded Khronos validation and zero diagnostics. This remains focused Windows fixture validation, with the earlier mainb509 comparison separately pinned. The independently prepared reference guard is preserved; no duplicate PR is planned. The issue was automatically closed by that merge; the evidence below retains its original source pins. No post-merge full-suite or title claim.

Observed

agc_driver_bda_device passes when ANYPS5_GPU=AMD Radeon(TM) Graphics is requested, but the Vulkan loader reports that the fixture actually used the NVIDIA GeForce RTX 5080. This can make a selector matrix look like independent AMD/NVIDIA coverage when both entries exercised NVIDIA.

On Windows 11 build 26200, WinLibs GCC 15.2 r7, NVIDIA RTX 5080 driver 610.62 / 32.0.16.1062 and AMD Radeon(TM) Graphics driver 32.0.21036.18, the AMD-requested case passed 3/3, with all three loader device records naming NVIDIA, Khronos validation loaded, and no validation errors or warnings. Those executions are excluded from AMD coverage. Five other focused groups in the same session selected AMD correctly, including the alias-copy, extra-mip, native-depth/BDA-consumer and small-copy synchronization fixtures.

Reproduction

With both a discrete and integrated GPU available, build agc_driver_bda_device_tests, then run in PowerShell:

$env:ANYPS5_GPU = 'AMD Radeon(TM) Graphics'
$env:ANYPS5_REQUIRE_VULKAN = '1'
$env:ANYPS5_NO_SHADER_CACHE = '1'
$env:APS5_NO_PIPELINE_JOURNAL = '1'
$env:VK_INSTANCE_LAYERS = 'VK_LAYER_KHRONOS_validation'
$env:VK_LOADER_DEBUG = 'error,warn,info,layer,driver'
ctest --test-dir build -V --timeout 30 --repeat until-fail:3 -R '^agc_driver_bda_device$'

Use a name matching the other installed GPU and the normal installed validation-layer setup. Compare the loader's actual Using device lines, not just the requested environment variable or CTest status. Our AMD-requested log repeatedly contains Using "NVIDIA GeForce RTX 5080" with driver:.

Public-source cause

Device::Device() ranks the enumerated devices, preferring discrete over integrated GPUs. It never reads ANYPS5_GPU. No change to production AGC behavior is needed to explain this result.

The observed executions used composed integration 7a0ce124fadf8b2ed000dbbf67aa96cbe208dfe4, containing main ad80f5f967c320df2615fe6717767e9eba7dad6d. This is not an unmodified-main runtime claim. BdaDevice.cpp is identical in that integration, main ad80f5f967, and freshly checked main a569f47cb7: Git blob 61a1612f876953b21a679c37624c8b949e31a862. Tested 2026-10-20. No title, performance, Linux or console behavior claim.

Expected / proposed correction

Honor the requested device using the project's established name-selection rules, retain default ranking when no selection is requested, and fail clearly when the requested usable device is absent. Emit the actual selected device. Validate with each installed GPU and an intentionally unmatched name; the latter must fail instead of silently selecting the discrete GPU.

Duplicate checks found related selector fixes #6225, #7104, #7602 and open #7570; #7570 currently changes SampledCacheBudget.cpp and its registrations, not BdaDevice.cpp. The macOS portability work #7886 mentions this fixture but does not establish a correction for its name selection. No focused BDA-device-selector report or implementation was found in the searches.

AI-assisted: yes (Codex); author responsible.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5933994307 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/8157). Originally posted by [Amoenus](https://github.com/Amoenus) on 2026-10-20T00:53:24Z. --- <!-- codex-bda-selector-current-v1 --> **Merged: #8167, via main commit `402763059f` on 2026-10-21. Independently retested at exact PR head `3bac1f0b4355e884a64d96b288b434cdd7aa7bad`.** The updated [validation comment](https://github.com/boykopovar/AnyPS5/pull/8167#issuecomment-6280996025) records correct NVIDIA/AMD selection and confirms that the optional-Vulkan unmatched-name edge case is now resolved: all six unmatched controls exit1, with and without the require flag. The new CPU-only selector test passes3/3; nine verified GPU executions pass with loaded Khronos validation and zero diagnostics. This remains focused Windows fixture validation, with the earlier mainb509 comparison separately pinned. The independently prepared [reference guard](https://github.com/Amoenus/AnyPS5/commit/0fc97d9fe0fdd4793eb5bf0f5219b7fd5a80a9e9) is preserved; no duplicate PR is planned. The issue was automatically closed by that merge; the evidence below retains its original source pins. No post-merge full-suite or title claim. <!-- /codex-bda-selector-current-v1 --> ## Observed `agc_driver_bda_device` passes when `ANYPS5_GPU=AMD Radeon(TM) Graphics` is requested, but the Vulkan loader reports that the fixture actually used the NVIDIA GeForce RTX 5080. This can make a selector matrix look like independent AMD/NVIDIA coverage when both entries exercised NVIDIA. On Windows 11 build 26200, WinLibs GCC 15.2 r7, NVIDIA RTX 5080 driver 610.62 / 32.0.16.1062 and AMD Radeon(TM) Graphics driver 32.0.21036.18, the AMD-requested case passed **3/3**, with **all three loader device records naming NVIDIA**, Khronos validation loaded, and no validation errors or warnings. Those executions are excluded from AMD coverage. Five other focused groups in the same session selected AMD correctly, including the alias-copy, extra-mip, native-depth/BDA-consumer and small-copy synchronization fixtures. ## Reproduction With both a discrete and integrated GPU available, build `agc_driver_bda_device_tests`, then run in PowerShell: ```powershell $env:ANYPS5_GPU = 'AMD Radeon(TM) Graphics' $env:ANYPS5_REQUIRE_VULKAN = '1' $env:ANYPS5_NO_SHADER_CACHE = '1' $env:APS5_NO_PIPELINE_JOURNAL = '1' $env:VK_INSTANCE_LAYERS = 'VK_LAYER_KHRONOS_validation' $env:VK_LOADER_DEBUG = 'error,warn,info,layer,driver' ctest --test-dir build -V --timeout 30 --repeat until-fail:3 -R '^agc_driver_bda_device$' ``` Use a name matching the other installed GPU and the normal installed validation-layer setup. Compare the loader's actual `Using` device lines, not just the requested environment variable or CTest status. Our AMD-requested log repeatedly contains `Using "NVIDIA GeForce RTX 5080" with driver:`. ## Public-source cause [`Device::Device()` ranks the enumerated devices](https://github.com/boykopovar/AnyPS5/blob/a569f47cb7ae49d2ed66d8ce5c829ecb2fbc28e8/core/libs/prx/libSceAgcDriver/tests/BdaDevice.cpp#L41-L70), preferring discrete over integrated GPUs. It never reads `ANYPS5_GPU`. No change to production AGC behavior is needed to explain this result. The observed executions used composed integration `7a0ce124fadf8b2ed000dbbf67aa96cbe208dfe4`, containing main `ad80f5f967c320df2615fe6717767e9eba7dad6d`. **This is not an unmodified-main runtime claim.** `BdaDevice.cpp` is identical in that integration, main `ad80f5f967`, and freshly checked main `a569f47cb7`: Git blob `61a1612f876953b21a679c37624c8b949e31a862`. Tested 2026-10-20. No title, performance, Linux or console behavior claim. ## Expected / proposed correction Honor the requested device using the project's established name-selection rules, retain default ranking when no selection is requested, and fail clearly when the requested usable device is absent. Emit the actual selected device. Validate with each installed GPU and an intentionally unmatched name; the latter must fail instead of silently selecting the discrete GPU. Duplicate checks found related selector fixes #6225, #7104, #7602 and open #7570; #7570 currently changes `SampledCacheBudget.cpp` and its registrations, not `BdaDevice.cpp`. The macOS portability work #7886 mentions this fixture but does not establish a correction for its name selection. No focused BDA-device-selector report or implementation was found in the searches. AI-assisted: yes (Codex); author responsible.
MarcZX10 commented 2026-10-20 01:05:39 +00:00 (Migrated from github.com)
Author
Contributor

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


I opened PR #8167. The BDA-device fixture now honors the existing ANYPS5_GPU name-selection rules, reports the selected device, and fails clearly when no requested Vulkan 1.1 device matches. CPU selector regression tests pass, and Linux/MinGW syntax checks plus conventions pass. I could not run the full Vulkan test or a dual-GPU check here. When convenient, could you rerun the AMD-requested case and confirm the loader-selected device and unmatched-name failure on your Windows setup?

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6280894487 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/8157#issuecomment-6280894487). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-20T01:05:39Z. --- I opened [PR #8167](https://github.com/boykopovar/AnyPS5/pull/8167). The BDA-device fixture now honors the existing `ANYPS5_GPU` name-selection rules, reports the selected device, and fails clearly when no requested Vulkan 1.1 device matches. CPU selector regression tests pass, and Linux/MinGW syntax checks plus conventions pass. I could not run the full Vulkan test or a dual-GPU check here. When convenient, could you rerun the AMD-requested case and confirm the loader-selected device and unmatched-name failure on your Windows setup?
MarcZX10 commented 2026-10-20 17:49:09 +00:00 (Migrated from github.com)
Author
Contributor

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


I checked again against current main: PR #8595 adds a distinct socket descriptor exhaustion guard and does not change the BDA-device fixture, so #8157 remains accurately tracked by #8167. I have no additional test evidence to report beyond the previously posted CPU selector tests, syntax checks, and conventions pass.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6297397390 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/8157#issuecomment-6297397390). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-20T17:49:09Z. --- I checked again against current main: PR #8595 adds a distinct socket descriptor exhaustion guard and does not change the BDA-device fixture, so #8157 remains accurately tracked by #8167. I have no additional test evidence to report beyond the previously posted CPU selector tests, syntax checks, and conventions pass.
MarcZX10 commented 2026-10-20 17:49:28 +00:00 (Migrated from github.com)
Author
Contributor

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


Amoenus has now independently retested the updated PR #8167 head 3bac1f0b4355e884a64d96b288b434cdd7aa7bad. The optional-Vulkan unmatched-name case is resolved: the new CPU-only selection test passed 3/3, GPU selection passed on NVIDIA and AMD with the loader-reported device verified, and all six unmatched-name controls exited 1 as expected. Khronos validation reported no diagnostics. This is focused Windows fixture validation, not a full build or suite; #8167 remains open with a CLEAN merge state.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6297403147 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/8157#issuecomment-6297403147). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-20T17:49:28Z. --- Amoenus has now independently retested the updated PR #8167 head `3bac1f0b4355e884a64d96b288b434cdd7aa7bad`. The optional-Vulkan unmatched-name case is resolved: the new CPU-only selection test passed 3/3, GPU selection passed on NVIDIA and AMD with the loader-reported device verified, and all six unmatched-name controls exited 1 as expected. Khronos validation reported no diagnostics. This is focused Windows fixture validation, not a full build or suite; #8167 remains open with a CLEAN merge state.
Sign in to join this conversation.
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#8157
No description provided.