test(agc): skip submit progress and pipelined metadata pass without a Vulkan device #11638
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/11638"
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 dantdmdarealguy on 2026-10-27T00:43:45Z.
What
On a host without a Vulkan driver,
ctestonmainskips 770 Vulkan tests but fails these four:There are two causes:
PipelinedMetadataPass.cppdoes not probe for a device. It goes straight to the driver, so the driver'sVulkanDeviceconstructor throws and the test returns 1. It now opensOpenVulkanTestDevice()first and returnsVulkanTestSkipped, asPipelinedFill.cpp,PipelinedPredicationRead.cppand the other pipelined tests do. Both registrations already haveSKIP_RETURN_CODE 77.agc_submit_progressandagc_submit_progress_no_timelinesetANYPS5_REQUIRE_VULKAN=1in their own ctestENVIRONMENT. No other test does this.SubmitProgress.cppalready skips throughOpenVulkanTestDevice(), but the forced variable makes that helper rethrow, so the skip could never run. The variable is removed from both registrations.OpenVulkanTestDevice()itself is narrowed so that the skip covers only a missing driver or device:Before, it caught every
std::exceptionfrom theVulkanDeviceconstructor. A construction failure on a host that has a device was therefore reported as "no usable Vulkan device" and skipped wheneverANYPS5_REQUIRE_VULKANwas unset.The constructor now throws
AgcDriver::VulkanUnavailable, astd::runtime_error, in exactly three cases:vulkan-1.dll/libvulkan.so.1) cannot be loaded;vkCreateInstancereturnsVK_ERROR_INCOMPATIBLE_DRIVER, which the loader returns when it finds no driver;The messages are unchanged.
The helper skips only on
VulkanUnavailable. Every other failure propagates and fails the test, with or withoutANYPS5_REQUIRE_VULKAN. That covers enumeration errors, any othervkCreateInstanceresult, required features,vkCreateDevice, allocation, andANYPS5_GPUnaming no device. ExcludingANYPS5_GPUfollowsBdaDevice.cpp(#8167),SampledCacheBudget.cppandPerformanceOverlay.cpp, which already never skip for an unmatchedANYPS5_GPU.ANYPS5_REQUIRE_VULKAN=1with no device still fails, as before.New regression test
tests/execution/VulkanTestDevice.cpp, with two registrations:agc_driver_vulkan_test_device:ANYPS5_REQUIRE_VULKAN=1;ANYPS5_GPUnaming no device, construction fails and the helper throws the plain error (notVulkanUnavailable) instead of skipping;ANYPS5_REQUIRE_VULKAN=1is set.agc_driver_vulkan_test_device_no_driver:VK_DRIVER_FILESandVK_ICD_FILENAMESpoint at a missing file. WithoutANYPS5_REQUIRE_VULKANthe helper must skip; with it, the helper must throwVulkanUnavailable. This runs on every host, with or without a GPU.Same shape as #5045 and #2628.
Tested
Rebased onto
main80b209d984(1 ahead, 0 behind;tools/check_main_sync.py: merge clean). The runs below were onb7105f7285. Since thenmainchangedVulkanDevice.cppand the driver's CMakeLists only in unrelated places (frame dumps, the keyboard overlay, barycentric built-ins); the threeVulkanUnavailablethrows are unchanged.Windows 11 Pro, Intel Core i9-14900K, 128 GB RAM, NVIDIA GeForce RTX 5080 (driver 32.0.16.1742), WinLibs GCC 15.2.0, Release,
BUILD_TESTING=ON:cmake --build --parallel 6and--target libssucceed, with no warnings in the touched files.ctest -R "^(agc_driver_vulkan_test_device|agc_driver_vulkan_test_device_no_driver|agc_submit_progress|agc_submit_progress_no_timeline|agc_driver_pipelined_metadata_pass|agc_driver_pipelined_metadata_pass_draw_pipeline|agc_driver_device_selection|patched_libraries)$"passes 8 of 8.OpenVulkanTestDevice():ctest --parallel 2 -R "^agc|^guest_job_manager_profiler", 1092 tests.VK_EXT_shader_stencil_export, sample locations, a test not built), none of them "no usable Vulkan device".VK_DRIVER_FILESandVK_ICD_FILENAMESpointing at a missing file), 1092 of 1092 pass with 776 skipped. 773 of the skips are "no usable Vulkan device" fromvkCreateInstance: Vulkan result -9.mainfails them (vkCreateInstance: Vulkan result -9);Skipped;ANYPS5_REQUIRE_VULKAN=1they still fail.ANYPS5_GPU="no such device 5c1e0b7a", so the constructor throws after enumerating the RTX 5080 and the Intel UHD 770):Skipped("no usable Vulkan device: Vulkan: no usable device whose name contains ANYPS5_GPU=..."), andagc_driver_vulkan_test_devicefails: "a device construction failure on a host with NVIDIA GeForce RTX 5080 was reported as a skip".agc_driver_vulkan_test_devicepasses.agc_driver_vulkan_test_devicein all four combinations:ANYPS5_REQUIRE_VULKANunset or1: passes.Skipped.ANYPS5_REQUIRE_VULKAN=1: fails ("opening the default device failed: vkCreateInstance: Vulkan result -9").agc_driver_vulkan_test_device_no_driverpasses in all four.ctest -V,VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,ANYPS5_NO_SHADER_CACHE=1andANYPS5_REQUIRE_VULKAN=1. The layer was a user-local copy loaded throughVK_ADD_LAYER_PATH.main: the four tests plusagc_driver_device_selection, 5 of 5 pass.agc_driver_vulkan_test_device, 6 of 6 pass.VK_LOADER_DEBUG=layershows the validation layer inserted in every test process (9 times onmain, 14 with the change).was not found but was requested by env var VK_INSTANCE_LAYERS, and neither has anyVUID-errors.tools/check_conventions.py --base origin/main,tools/check_test_registration.pyandtools/check_main_sync.py --base origin/main --head HEADpass.From the first version of this PR, on Arch Linux on WSL2 with no Vulkan ICD: the four tests failed on
main3 of 3 runs in Release and Debug, and wereSkippedwith the change.ANYPS5_REQUIRE_VULKAN=1still failed them. The fullctestpassed 2431 of 2431.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)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-27T01:09:20Z.
Review: APPROVED
Reviewed exact head 489d9354. In PipelinedMetadataPass, OpenVulkanTestDevice is now called before constructing the driver so the test can return the configured skip code when no usable device exists. The two submit-progress CTest registrations no longer force ANYPS5_REQUIRE_VULKAN=1, allowing their existing probe/skip path to work outside the strict CI environment. The target set compiled locally. Execution of the submit-progress binary could not reach test logic on this host: emulator startup rejects the Xeon E5-1620 v2 for lacking LZCNT, BMI1, BMI2, MOVBE, AVX2 and FMA. The author reports repeated no-ICD skip checks in Release/Debug, GPU runs on RTX 5080, and validation-layer runs with no VUIDs; hosted product jobs for this PR are skipped by path policy. The refreshed policy checks pass.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-27T01:41:38Z.
Review: DISMISSED
The no-device skips fix a reproducible test-registration problem, and the author reports extensive no-ICD, GPU, Debug/Release, and validation-layer runs. I’m changing my earlier approval after reviewing the collaborator’s exception-path concern.
OpenVulkanTestDevice()catches everystd::exceptionfrom the entireVulkanDeviceconstructor and returns a skip whenANYPS5_REQUIRE_VULKANis unset. The constructor can throw after instance creation for failures unrelated to device absence (for example, physical-device enumeration, device selection/creation, required feature setup, or allocation). In that case these newly routed tests report “no usable Vulkan device” and pass as skipped on a developer host that does have a Vulkan device, hiding a test/setup regression.Please make the skip conditional on a specific missing-loader/no-usable-device outcome and allow other initialization failures to fail, with a regression covering device-present initialization failure in addition to no-device and required-device cases. The current
ANYPS5_REQUIRE_VULKAN=1CI behavior protects that CI configuration but does not protect local runs with the variable unset.