Skip to content

test(agc): honor ANYPS5_GPU in the fixtures that open their own Vulkan device - #9253

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
SandstromPL:test/agc-fixture-gpu-selection
Oct 24, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
SandstromPL:test/agc-fixture-gpu-selection

Conversation

@SandstromPL

@SandstromPL SandstromPL commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

What

Seven AGC fixtures create their own Vulkan instance and pick a device without reading ANYPS5_GPU: PresentationPass, DepthPlaneGuestLayers, DepthStorage, DepthSurfaceLastWriter and PartiallyResidentSnapshot take the first enumerated device, OversizedDescriptorSets the first discrete one, and SparseBufferHoles ranks by device type. On a machine with more than one Vulkan device, a run meant for one GPU can report results from another: #5271 reports agc_driver_sparse_buffer_holes logging the RTX with ANYPS5_GPU=Radeon on a machine with both. With a name that matches no device, all of them still pass on main.

#6225, #7104, #7570, #7602 and #8167 fixed this one fixture at a time, each with its own copy of the selection. These seven now share one header, tests/execution/FixtureDeviceSelection.hpp, with the driver's rule from VulkanDevice.cpp:

  • among Vulkan 1.1 devices, the first whose name contains ANYPS5_GPU, ignoring case;
  • without a request, the first of the highest-ranked type (discrete, integrated, virtual, then the rest).

A name that matches nothing throws no Vulkan 1.1 device whose name contains ANYPS5_GPU="…"; devices: …. The fixtures keep their existing handling of that: a skip, or a failure under ANYPS5_REQUIRE_VULKAN. A new CPU test, agc_driver_fixture_device_selection, covers the ranking, the name matching, ANYPS5_GPU itself and the error text.

Two other fixtures read ANYPS5_GPU but match it case-sensitively: PooledBufferRange (#7104) and NativeMultisampleDepth. #10050 moves them onto this header. The other four that select their own device (Recorder, PerformanceOverlay, SampledCacheBudget, BdaDevice) already follow the driver's rule with their own copies, so this PR doesn't touch them.

Tested

Linux (Ubuntu 24.04, GCC 13.3), NVIDIA GeForce RTX 3050 Ti Laptop GPU (driver 580.178.04), on main cecb540 and on this PR. The 9 tests these fixtures run are agc_driver_presentation_pass, agc_driver_depth_plane_guest_layers, agc_driver_depth_storage, agc_driver_depth_surface_last_writer, agc_driver_oversized_descriptor_sets, agc_driver_partially_resident_snapshot, agc_driver_partially_resident_pending_stores, agc_driver_large_tracked_snapshot and agc_driver_sparse_buffer_holes.

  • With VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_NO_SHADER_CACHE=1 and ANYPS5_REQUIRE_VULKAN=1 (ctest -V), all 9 pass on main and on this PR. The layer loads in both logs, and neither has a VUID- line.
  • With ANYPS5_GPU="no such device 1d3d154f" and ANYPS5_REQUIRE_VULKAN=1:
    • main: all 9 pass on the NVIDIA GPU.
    • This PR: all 9 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 ANYPS5_GPU="geforce rtx", all 9 pass.
  • agc_driver_fixture_device_selection passes, and tools/check_test_registration.py passes on the build.

This machine has one GPU, so the multi-device cases 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: none
  • 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 21, 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 5021 core/libs/prx/libSceAgcDriver/tests/execution/OversizedDescriptorSets.cpp
PR 7642 core/libs/prx/libSceAgcDriver/tests/PresentationPass.cpp
PR 9508 core/libs/prx/libSceAgcDriver/tests/PresentationPass.cpp
PR 10193 core/libs/prx/libSceAgcDriver/tests/PresentationPass.cpp

@EagleBearerYS

Copy link
Copy Markdown
Contributor

A note on merge order. Our upcoming fix for Ghost of Tsushima Director's Cut (PPSA02225), fix/agc-3d-view-committed-slices-v2, adds cases to tests/execution/PartiallyResidentSnapshot.cpp, and its includes sit next to the lines this PR changes there. Ours uploads only the committed slabs of a sampled 3D view whose range is only partly committed, so the two don't otherwise overlap.

Ours will go second and adapt to this one when it merges, with this PR in its Depends on.

…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>
@SandstromPL
SandstromPL force-pushed the test/agc-fixture-gpu-selection branch from e4be20d to 98f9a89 Compare October 23, 2026 19:49
@SandstromPL

Copy link
Copy Markdown
Contributor Author

@EagleBearerYS thanks for the heads-up. I've moved this PR's FixtureDeviceSelection.hpp include in PartiallyResidentSnapshot.cpp up to sit after TextureTiling.hpp, so it no longer shares the spot after GuestWriteWatch.hpp where #10064 and #9159 add theirs. git merge-tree now finds no conflict in that file between this PR (or #10050, which builds on it) and either of yours, so the merge order doesn't matter there and #10064 doesn't need it under Depends on.

AI-assisted: yes (Claude Code)

@oneandonlydean oneandonlydean self-assigned this Oct 23, 2026
@oneandonlydean
oneandonlydean merged commit 1bf232a 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.

3 participants