test(agc): honor ANYPS5_GPU in the fixtures that open their own Vulkan device #9253
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/9253"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by SandstromPL on 2026-10-21T16:34:22Z.
What
Seven AGC fixtures create their own Vulkan instance and pick a device without reading
ANYPS5_GPU:PresentationPass,DepthPlaneGuestLayers,DepthStorage,DepthSurfaceLastWriterandPartiallyResidentSnapshottake the first enumerated device,OversizedDescriptorSetsthe first discrete one, andSparseBufferHolesranks by device type. On a machine with more than one Vulkan device, a run meant for one GPU can report results from another: #5271 reportsagc_driver_sparse_buffer_holeslogging the RTX withANYPS5_GPU=Radeonon a machine with both. With a name that matches no device, all of them still pass onmain.#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 fromVulkanDevice.cpp:ANYPS5_GPU, ignoring case;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 underANYPS5_REQUIRE_VULKAN. A new CPU test,agc_driver_fixture_device_selection, covers the ranking, the name matching,ANYPS5_GPUitself and the error text.Two other fixtures read
ANYPS5_GPUbut match it case-sensitively:PooledBufferRange(#7104) andNativeMultisampleDepth. #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
maincecb540a6and on this PR. The 9 tests these fixtures run areagc_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_snapshotandagc_driver_sparse_buffer_holes.VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,ANYPS5_NO_SHADER_CACHE=1andANYPS5_REQUIRE_VULKAN=1(ctest -V), all 9 pass onmainand on this PR. The layer loads in both logs, and neither has aVUID-line.ANYPS5_GPU="no such device 1d3d154f"andANYPS5_REQUIRE_VULKAN=1:main: all 9 pass on the NVIDIA GPU.no Vulkan 1.1 device whose name contains ANYPS5_GPU="no such device 1d3d154f"; devices: NVIDIA GeForce RTX 3050 Ti Laptop GPU.ANYPS5_GPU="geforce rtx", all 9 pass.agc_driver_fixture_device_selectionpasses, andtools/check_test_registration.pypasses on the build.This machine has one GPU, so the multi-device cases are covered only by the CPU test.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code