Skip to content

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

Merged
oneandonlydean merged 2 commits into
boykopovar:mainfrom
SandstromPL:test/agc-pooled-buffer-gpu-case
Oct 24, 2026
Merged

oneandonlydean merged 2 commits into
boykopovar:mainfrom
SandstromPL:test/agc-pooled-buffer-gpu-case

Conversation

@SandstromPL

Copy link
Copy Markdown
Contributor

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 test(agc): honor GPU selection in pooled buffer checks #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 fix(agc): retire an unwritten native multisample depth surface on guest access #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 0db47b2. 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:

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: test(agc): honor ANYPS5_GPU in the fixtures that open their own Vulkan device #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

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

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 6300 core/libs/prx/libSceAgcDriver/tests/execution/NativeMultisampleDepth.cpp
PR 6808 core/libs/prx/libSceAgcDriver/tests/execution/NativeMultisampleDepth.cpp

@github-actions github-actions Bot added the agc libSceAgc* label Oct 23, 2026
SandstromPL and others added 2 commits October 24, 2026 01:04
…n device

Seven AGC fixtures create their own Vulkan instance and take the first
enumerated device or choose one by device type, without reading ANYPS5_GPU:
PresentationPass, DepthPlaneGuestLayers, DepthStorage,
DepthSurfaceLastWriter, OversizedDescriptorSets, PartiallyResidentSnapshot
and SparseBufferHoles. With a name that matches no device they still pass
on whichever GPU came first, so a run meant for one GPU can report results
from another.

They now pick their device through one shared helper with the driver's
rule: among Vulkan 1.1 devices, the first whose name contains ANYPS5_GPU
ignoring case, otherwise the first of the highest-ranked device type. A
name that matches nothing throws with the device names, which these
fixtures report as a skip, or as a failure under ANYPS5_REQUIRE_VULKAN.
A CPU test covers the selection and the error message.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PooledBufferRange and NativeMultisampleDepth match ANYPS5_GPU against
device names with std::strstr and std::string::find, which are
case-sensitive, while the driver and docs/dev/ENVIRONMENT.md match it
ignoring case. A request the driver accepts, such as ANYPS5_GPU=nvidia
for an NVIDIA GPU, matches no device in them: PooledBufferRange keeps
the first device and then refuses it with "selected device does not
match ANYPS5_GPU", NativeMultisampleDepth finds no device. Both report
a skip, or fail under ANYPS5_REQUIRE_VULKAN.

They now pick their device through SelectFixturePhysicalDevice, with
the driver's rule. That also changes two choices on machines with more
than one device: without ANYPS5_GPU, PooledBufferRange ranks devices by
type and needs Vulkan 1.1 instead of taking the first discrete one or
the first device, and with a request NativeMultisampleDepth takes the
first match instead of the best-ranked one, as the driver does. The
selection CPU test covers the second case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@SandstromPL
SandstromPL force-pushed the test/agc-pooled-buffer-gpu-case branch from 8990ce5 to 9d4909b Compare October 23, 2026 19:49
@oneandonlydean oneandonlydean self-assigned this Oct 23, 2026
@oneandonlydean
oneandonlydean merged commit c2f3c42 into boykopovar:main Oct 24, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc*

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants