test(agc): present the FSR test only on a driver with its own headless surface #17179
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/17179"
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 GiannisG1 on 2026-11-08T14:05:15Z.
What
agc_driver_present_upscalepresents through aVK_EXT_headless_surfacewindow, and it skips when the Vulkan instance doesn't offer that extension (#17065 worded that skip as a device limitation). The extension is an instance extension, though: when Mesa's drivers are installed next to NVIDIA's, the instance offers it, while NVIDIA's driver doesn't implement it.VulkanDevicethen asks every candidate for surface support, and the NVIDIA device is asked about a surface its driver never created. Here (GTX 1050 Ti, 580.178.04, with Mesa 25.2.8 ANV and llvmpipe), onmain105c9e4d91:vkGetPhysicalDeviceSurfaceSupportKHRcall, inlibnvidia-glcore.so.580.178.04(gdb). That happens withANYPS5_GPUnaming the GTX and also with it unset. Loaders before Vulkan-Loader 322d6340a2 ("Lazily allocate ICD surface objects") pass the loader's own surface object to a driver that has novkCreateHeadlessSurfaceEXT.VK_ERROR_EXTENSION_NOT_PRESENT, and the constructor throwsvkGetPhysicalDeviceSurfaceSupportKHR: Vulkan result -7.This PR follows EagleBearerYS' suggestion in https://github.com/boykopovar/AnyPS5/pull/17065#issuecomment-6722281817 (my analysis: https://github.com/boykopovar/AnyPS5/pull/17065#issuecomment-6721542332). Before the first
VulkanDevice, the test reads each Vulkan 1.2 device's driver ID:ANYPS5_GPUunset, it setsANYPS5_GPUto the name of the best-ranked device whose driver implements the extension, ranked the wayVulkanDeviceranks candidates.VulkanDevicedrops a candidate whose name doesn't matchANYPS5_GPUbefore it asks for surface support, so no other driver is asked.skipped, the device lacks VK_EXT_headless_surface) when no device qualifies, or whenANYPS5_GPUnames a device whose driver isn't on the list.The list covers drivers that report the extension by themselves. Here I called
vkEnumerateInstanceExtensionPropertieswithVK_DRIVER_FILESset to one ICD at a time: Mesa 25.2.8'sintelandintel_hasvk(INTEL_OPEN_SOURCE_MESA),radeon(MESA_RADV),lvp(MESA_LLVMPIPE),nouveau(MESA_NVK),virtio(MESA_VENUS) andasahi(MESA_HONEYKRISP) report it;nvidiaandgfxstreamdon't. MoltenVK's runtime user guide lists it among its extensions, soMOLTENVKis on the list too. A driver that isn't on the list gets the skip instead of the crash, and adding one is onecaseline. Only the test changes.Tested
Linux Mint 22.3, kernel 7.0.0-38, GCC 13.3.0, Release,
BUILD_TESTING=ON, onmain105c9e4d91(it merges cleanly withmain1086833f9a; nothing since touches the file). The PR changes only this test's source, so every other test binary is the same asmain's.ctest -R '^agc_driver_present_upscale$' -Vunder Xvfb, 3 runs per device,tools/check_skips.pyon each JUnit file:ANYPS5_GPUmainGTX 1050(NVIDIA 580.178.04)SegFault3/3check_skips.pyexit 0HD Graphics 630(Mesa 25.2.8 ANV)llvmpipe(Mesa 25.2.8)The test binary run directly in other setups:
mainANYPS5_GPUunset, all ICDsPhysical device selectedis the HD 630)ANYPS5_GPU=NVIDIAANYPS5_GPU=intelANYPS5_GPUunset, Vulkan-Loader 1.4.313vkGetPhysicalDeviceSurfaceSupportKHR: Vulkan result -7ANYPS5_GPU=GTX 1050, Vulkan-Loader 1.4.313VK_DRIVER_FILES= NVIDIA's ICD only,ANYPS5_GPUunset or the GTXVK_DRIVER_FILES= llvmpipe's ICD only,ANYPS5_GPUunsetVK_LOADER_DRIVERS_DISABLE=*nvidia*,ANYPS5_GPUunsetWith
VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation(layers 1.3.275),ANYPS5_REQUIRE_VULKAN=1,ctest -V, on the HD 630 and llvmpipe: nowas not found but was requested by env var VK_INSTANCE_LAYERS. VUIDs are the same onmainand this PR: none on the HD 630, and on llvmpipe 21 mentions ofVUID-VkDeviceCreateInfo-pNext-pNext.The 264 source-scanning tests (
conventions_*,public_headers*,check_*,tools_*) pass.check_conventions.py,check_test_registration.py,check_main_sync.py(merges cleanly) andcheck_compile.py --build build(1 translation unit) are clean.tools/pr_overlap.py --branch: no overlap with open pull requests.Doorriiaann ran it on an NVIDIA RTX 3070 (610.57.04, Debian 13, loader 1.4.309, Mesa 25.0.7 llvmpipe installed beside it), 5 runs per row. With
ANYPS5_GPU=NVIDIAand with it unset,mainsegfaults and this PR skips or passes (selecting llvmpipe); there are no VUIDs on either side: https://github.com/boykopovar/AnyPS5/pull/17179#issuecomment-6727066506Checklist
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