feat(agc): select Vulkan devices by driver name #6788
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/6788"
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 Muhammed-Jameel on 2026-10-16T11:56:17Z.
What
ANYPS5_GPUcannot distinguish Vulkan implementations that expose the same device name, such as MoltenVK and KosmicKrisp on one Apple GPU. AddANYPS5_VULKAN_DRIVERas a case-insensitive substring filter on the standardizeddriverName, combined with the existing GPU filter. An unmatched explicit request fails and lists device/driver identities instead of selecting another implementation. Empty requests preserve existing ranking.Query driver properties through Vulkan 1.2 core support or
VK_KHR_driver_propertieson older devices. Include the identity in candidate/selected-device diagnostics and preserve it for performance reports. Add focused tests for duplicate GPU names, combined filters, unavailable identities and core promotion, and extend the existing runtime selection regression.This is the first part of controlled macOS driver comparisons. It does not install drivers, implement a complete Mac runtime, change shader semantics, or claim a speedup. It also works with other Vulkan implementations.
Related work checked: #6222 already provides Mac loader/portability changes, #4847 addresses BDA candidate eligibility, and #5021 contains the experimental ARM64 AOT route. Their implementations are not duplicated here. The selector has no merge dependency on those changes, but end-to-end macOS runtime validation still needs the Mac prerequisites. This draft remains pending full runtime validation.
Tested
Apple M1 Pro, 16 GiB, macOS 27.0.1 (26A434), AppleClang 17 / Xcode 26.2 with its matching macOS 26.2 SDK. Rebased onto
c8044c3a7.-Wall -Wextra -Werror -Wno-missing-field-initializers.agc_vulkan_driver_selection_testsbuilt and its CTest passed under Rosetta.VulkanDevice.cppadditionally required the bundled SDL include directory because the current Mac build does not supply it.agc_driver_device_selection_testsbuild attempted, blocked in existing macOS libc code (CLOCK_REALTIME_COARSE,stat.st_mtim, stdio macros and Linuxlink.h). The extended runtime test was not run. No Linux/Windows full build or game/FPS comparison is claimed.main; the attempt was terminated.Checklist
main; no other open PR found implementing driver-name filteringImported from boykopovar/AnyPS5. Originally posted by al3w0f205 on 2026-10-16T12:07:10Z.
Review: COMMENTED
Tested on Windows 11 with MinGW-w64 (GCC 15.2.0, Ninja, CMake 4.2.3, Release):
tools/check_conventions.py --base origin/main: passed cleanly.agc_vulkan_driver_selection_tests, the link step fails on Windows MinGW with an unresolved personality symbol:This happens because
agc_vulkan_driver_selection_testsdoes not linklibc. Adding:under
core/libs/prx/libSceAgcDriver/CMakeLists.txt(matching the other AGC tests) resolves the linker error.ninja -C build-all agc_vulkan_driver_selection_testsbuilds cleanly without warnings.ctest -R "^agc_vulkan_driver_selection$": passed 100% (20/20 with--repeat until-fail:20).Pull request closed