Skip to content

fix(agc): skip devices without required BDA features - #4847

Draft
Isrrael101 wants to merge 1 commit into
boykopovar:mainfrom
Isrrael101:fix/vulkan-bda-device-selection
Draft

Isrrael101 wants to merge 1 commit into
boykopovar:mainfrom
Isrrael101:fix/vulkan-bda-device-selection

Conversation

@Isrrael101

@Isrrael101 Isrrael101 commented Oct 12, 2026 •

Copy link
Copy Markdown

What

The GPU selector accepts a discrete adapter with graphics, compute and presentation queues before checking its required BDA features. WSL's Dozen adapter for an RTX 3060 is selected despite lacking VK_KHR_8bit_storage, so device initialization fails instead of using the available compatible lavapipe device.

Probe the existing byte-storage and buffer-device-address requirements before accepting each candidate. Log the rejection reason and continue selecting among compatible adapters. Explicit ANYPS5_GPU filtering still applies. Document the selection requirements.

Tested

Ubuntu 26.04 under WSL, Intel i7-11370H, Mesa 26.2.4. Full relinker and patched system-library build completed.

  • agc_driver_device_selection passed with Dozen and lavapipe both installed; the unsupported NVIDIA and Intel Dozen adapters were skipped.
  • agc_driver_bda_device passed with VK_DRIVER_FILES=/usr/share/vulkan/icd.d/lvp_icd.json (the default adapter skips this test because it lacks byte storage).
  • Eight existing tests covering guest exception handlers, raised exceptions, address synchronization, _umtx_op, guest module directories and Intel conversion passed.
  • Conventions and git diff --check passed.
  • 7 Days to Die - Console Edition (PPSA16645) rendered its loading screen and reached the license-agreement screen with automatic lavapipe selection. A five-minute run and a subsequent six-minute run completed without the startup abort, ending at the configured time limits. The agreement was not accepted. Gameplay and online services are not verified; this is not a full compatibility claim.

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; no silent stubs added
  • No notes, investigation files or images added to the repository
  • No new third-party code
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: PPSA16645 startup GPU selection; no existing Game bring-up discussion found; gameplay remains unverified
  • AI-assisted: yes, with Codex

@github-actions github-actions Bot added docs agc libSceAgc* labels Oct 13, 2026
This was referenced Oct 15, 2026
@github-actions

github-actions Bot commented Oct 15, 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 1395 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 2434 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 4040 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 4472 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 5021 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/user/USAGE.md
PR 5925 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/user/USAGE.md
PR 6188 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6804 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6924 docs/user/USAGE.md
PR 7275 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 7449 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 7464 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 7642 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/user/USAGE.md
PR 8004 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 9345 docs/user/USAGE.md
PR 9356 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 9387 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 9898 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 10193 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/user/USAGE.md
PR 10442 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 10479 docs/user/USAGE.md
PR 10861 docs/user/USAGE.md
PR 10867 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 11351 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 11435 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 11436 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 11483 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 12120 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 12567 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 12678 docs/user/USAGE.md
PR 12746 docs/user/USAGE.md
PR 12828 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 12863 docs/user/USAGE.md
PR 12930 docs/user/USAGE.md
PR 12944 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 12970 docs/user/USAGE.md
PR 13148 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 13646 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 13707 docs/user/USAGE.md
PR 13863 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 13920 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 13928 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/user/USAGE.md
PR 13929 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/user/USAGE.md
PR 14217 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 14218 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 14264 docs/user/USAGE.md
PR 14344 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 14943 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp

This was referenced Oct 15, 2026
@github-actions github-actions Bot added the unblocks title Names a title ID on the Unblocks line label Oct 18, 2026

@BunnyFl BunnyFl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reads right. QueryBdaByteFeatures and QueryBdaFeatures refuse a missing extension or feature through Graphics::Require, which throws std::runtime_error (Graphics/include/Context.hpp:31-41), so the new catch in the selection loop sees exactly those refusals and moves to the next device. The device chosen is then queried again with the same two calls (Execution/src/VulkanDevice.cpp:1061-1062 at this head). Those calls throw on the same conditions there (VulkanDevice.cpp:1061-1062), so a device skipped by the new check would have failed that setup anyway and no previously working GPU is lost. With ANYPS5_GPU naming only an unsupported device, selection still ends in the "no usable device whose name contains ANYPS5_GPU=..." error (:1027), after the skip reason is logged.

Tested on Windows 11, WinLibs GCC 15.2.0, with this head merged onto main: agc_driver_device_selection, agc_driver_bda_device and agc_driver_bda_device_selection_cpu pass, nothing skipped. The ctest output of this run has no "Skipping physical device" line. The Dozen case itself wasn't reproduced here.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* docs unblocks title Names a title ID on the Unblocks line

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants