8000 vk: log the adapters rejected during device selection by yuminn-k · Pull Request #426 · kvark/blade · GitHub
[go: up one dir, main page]

Skip to content

vk: log the adapters rejected during device selection - #426

Merged
kvark merged 1 commit into
kvark:mainfrom
yuminn-k:log-rejected-adapter
Nov 22, 2026
Merged

kvark merged 1 commit into
kvark:mainfrom
yuminn-k:log-rejected-adapter

Conversation

@yuminn-k
Copy link
Copy Markdown
Contributor

Related to #111.

When no adapter passes inspect_adapter, Context::init returned NoSupportedDeviceFound and nothing in the log said which adapter was rejected or why. The reason string returned by inspect_adapter was dropped by .ok() in the normal path and by map_err(|_| ..) in the OpenXR path.

This logs Rejected adapter {name:?}: {reason} at warn level in both paths. enumerate() is unchanged, since it already reports the reason through DeviceReportStatus::Rejected.

Checked in a rust:latest Linux container with Mesa lavapipe, asking for a device ID that does not exist (RUST_LOG=warn,blade_graphics=info):

Before:

INFO  blade_graphics::hal::init] Adapter: "llvmpipe (LLVM 19.1.7, 128 bits)"
result: Some(NoSupportedDeviceFound)

After:

INFO  blade_graphics::hal::init] Adapter: "llvmpipe (LLVM 19.1.7, 128 bits)"
WARN  blade_graphics::hal::init] Rejected adapter "llvmpipe (LLVM 19.1.7, 128 bits)": device ID 0x0 doesn't match requested 0xDEADBEEF
result: Some(NoSupportedDeviceFound)

cargo test -p blade-graphics, cargo clippy -p blade-graphics and cargo fmt --check pass in the same container. The OpenXR branch only compiles here; I did not run it.

One side effect: a device that is rejected while another one is accepted also logs a warning, since the search stops at the first accepted adapter. Say if you would rather have this at info.

@chatgpt-codex-connector
chatgpt-codex-connector Bot commented Nov 22, 2026 •
Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-22T00:48:33.936005Z 4544be2 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@kvark
kvark enabled auto-merge (rebase) November 22, 2026 15:38
@kvark
kvark merged commit b83a6d2 into kvark:main Nov 22, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0