test(agc): match ANYPS5_GPU ignoring case in two more fixtures #10050

Merged
SandstromPL merged 2 commits from upstream-pr/10050 into main 2026-10-24 07:22:53 +00:00
SandstromPL commented 2026-10-23 06:31:10 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by SandstromPL on 2026-10-23T06:31:10Z.


What

ANYPS5_GPU is a case-insensitive substring of the device name: that is how the driver matches it (VulkanDevice.cpp), and how docs/dev/ENVIRONMENT.md and docs/user/USAGE.md describe it. Two fixtures that open their own Vulkan device match it case-sensitively instead:

  • PooledBufferRange uses std::strstr, from #7104. With a request it matches nothing, it keeps the first device and then refuses it: selected device does not match ANYPS5_GPU.
  • NativeMultisampleDepth uses std::string::find. With a request it matches nothing, it finds no device: no Vulkan 1.1 device.

So a request the driver accepts, such as ANYPS5_GPU=nvidia on an NVIDIA GPU, makes both report a skip, and ctest still prints 100% tests passed. Under ANYPS5_REQUIRE_VULKAN they fail instead.

Both now pick their device with #9253's SelectFixturePhysicalDevice, which follows the driver's rule. This depends on #9253, which adds that helper; until #9253 merges, its commit shows here too.

On machines with more than one device, this also changes two choices:

  • Without ANYPS5_GPU, PooledBufferRange now ranks devices by type (discrete, integrated, virtual, then the rest) and needs Vulkan 1.1. Before, it took the first discrete device, or else the first device.
  • With a request, NativeMultisampleDepth now takes the first matching device instead of the best-ranked match. This is what the driver does, and since #6727 the fixture also uses the driver's own device, so the two now pick the same GPU.
  • A new case in the selection CPU test covers the second point: a request that matches an integrated GPU and a later discrete one takes the integrated one. With the old rank-among-matches rule, this check fails.

As in #9253, the helper does not skip a device that lacks a graphics and compute queue, as the driver does. Neither fixture checked queues before.

The other four fixtures that select their own device (Recorder, PerformanceOverlay, SampledCacheBudget, BdaDevice) already match ignoring case, so this PR leaves them as they are.

Tested

Linux (Ubuntu 24.04, GCC 13.3), NVIDIA GeForce RTX 3050 Ti Laptop GPU (driver 580.178.04). The main runs are on main 0db47b263. The PR runs are on the same main with #9253 and this PR merged (a clean merge). All runs use ANYPS5_REQUIRE_VULKAN=1 and ANYPS5_NO_SHADER_CACHE=1.

The 14 tests are:

  • agc_driver_pooled_buffer_range;
  • the four NativeMultisampleDepth tests (agc_driver_native_multisample_depth, agc_driver_native_depth_clears, agc_driver_native_depth_clear_refusals, agc_driver_native_depth_retirement);
  • #9253's nine.
ANYPS5_GPU main this PR
NVIDIA 14 pass 14 pass
nvidia, geforce rtx 5 fail: agc_driver_pooled_buffer_range (selected device does not match ANYPS5_GPU) and the four NativeMultisampleDepth tests (no Vulkan 1.1 device); without ANYPS5_REQUIRE_VULKAN the same 5 are skipped 14 pass
no such device 1d3d154f the same 5 fail; #9253's nine pass, since they ignore the request on main 14 fail with no Vulkan 1.1 device whose name contains ANYPS5_GPU="no such device 1d3d154f"; devices: NVIDIA GeForce RTX 3050 Ti Laptop GPU
  • With VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation (ctest -V), the 14 pass on main and with this PR. The layer loads in both logs.
    • Both logs have the same five VUID-VkDeviceCreateInfo-pNext-pNext lines, all in the four NativeMultisampleDepth tests and already on main.
  • agc_driver_fixture_device_selection passes, with the new case.

This machine has one GPU, so the choices between several devices are covered only by the CPU test.

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: #9253
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 3050 Ti Laptop GPU (driver 580.178.04), Ubuntu 24.04
  • AI-assisted: yes (Claude Code)

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4978829867 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10050). Originally posted by [SandstromPL](https://github.com/SandstromPL) on 2026-10-23T06:31:10Z. --- ### What `ANYPS5_GPU` is a case-insensitive substring of the device name: that is how the driver matches it (`VulkanDevice.cpp`), and how `docs/dev/ENVIRONMENT.md` and `docs/user/USAGE.md` describe it. Two fixtures that open their own Vulkan device match it case-sensitively instead: - `PooledBufferRange` uses `std::strstr`, from #7104. With a request it matches nothing, it keeps the first device and then refuses it: `selected device does not match ANYPS5_GPU`. - `NativeMultisampleDepth` uses `std::string::find`. With a request it matches nothing, it finds no device: `no Vulkan 1.1 device`. So a request the driver accepts, such as `ANYPS5_GPU=nvidia` on an NVIDIA GPU, makes both report a skip, and ctest still prints `100% tests passed`. Under `ANYPS5_REQUIRE_VULKAN` they fail instead. Both now pick their device with #9253's `SelectFixturePhysicalDevice`, which follows the driver's rule. This depends on #9253, which adds that helper; until #9253 merges, its commit shows here too. On machines with more than one device, this also changes two choices: - Without `ANYPS5_GPU`, `PooledBufferRange` now ranks devices by type (discrete, integrated, virtual, then the rest) and needs Vulkan 1.1. Before, it took the first discrete device, or else the first device. - With a request, `NativeMultisampleDepth` now takes the first matching device instead of the best-ranked match. This is what the driver does, and since #6727 the fixture also uses the driver's own device, so the two now pick the same GPU. - A new case in the selection CPU test covers the second point: a request that matches an integrated GPU and a later discrete one takes the integrated one. With the old rank-among-matches rule, this check fails. As in #9253, the helper does not skip a device that lacks a graphics and compute queue, as the driver does. Neither fixture checked queues before. The other four fixtures that select their own device (`Recorder`, `PerformanceOverlay`, `SampledCacheBudget`, `BdaDevice`) already match ignoring case, so this PR leaves them as they are. ### Tested Linux (Ubuntu 24.04, GCC 13.3), NVIDIA GeForce RTX 3050 Ti Laptop GPU (driver 580.178.04). The `main` runs are on `main` 0db47b263. The PR runs are on the same `main` with #9253 and this PR merged (a clean merge). All runs use `ANYPS5_REQUIRE_VULKAN=1` and `ANYPS5_NO_SHADER_CACHE=1`. The 14 tests are: - `agc_driver_pooled_buffer_range`; - the four `NativeMultisampleDepth` tests (`agc_driver_native_multisample_depth`, `agc_driver_native_depth_clears`, `agc_driver_native_depth_clear_refusals`, `agc_driver_native_depth_retirement`); - #9253's nine. | `ANYPS5_GPU` | `main` | this PR | |---|---|---| | `NVIDIA` | 14 pass | 14 pass | | `nvidia`, `geforce rtx` | 5 fail: `agc_driver_pooled_buffer_range` (`selected device does not match ANYPS5_GPU`) and the four `NativeMultisampleDepth` tests (`no Vulkan 1.1 device`); without `ANYPS5_REQUIRE_VULKAN` the same 5 are skipped | 14 pass | | `no such device 1d3d154f` | the same 5 fail; #9253's nine pass, since they ignore the request on `main` | 14 fail with `no Vulkan 1.1 device whose name contains ANYPS5_GPU="no such device 1d3d154f"; devices: NVIDIA GeForce RTX 3050 Ti Laptop GPU` | - With `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation` (`ctest -V`), the 14 pass on `main` and with this PR. The layer loads in both logs. - Both logs have the same five `VUID-VkDeviceCreateInfo-pNext-pNext` lines, all in the four `NativeMultisampleDepth` tests and already on `main`. - `agc_driver_fixture_device_selection` passes, with the new case. This machine has one GPU, so the choices between several devices are covered only by the CPU test. ### Checklist - [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: #9253 - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: NVIDIA GeForce RTX 3050 Ti Laptop GPU (driver 580.178.04), Ubuntu 24.04 - [x] AI-assisted: yes (Claude Code) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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!10050
No description provided.