fix: the launcher draws its window with Direct3D 12 on Windows #522
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/522"
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 LooperSalty/AnyXboxX. Originally posted by Luke-Ervin on 2026-11-27T15:57:17Z.
Change
On Windows, the launcher now draws its own window with Direct3D 12 alone, instead of letting wgpu try Vulkan and Direct3D 12.
In #483 the launcher never opened its window on one Windows 11 machine (Home, Insider Preview 26H2, build 26340), from the release download or a local build: the process stayed in memory at about 1 MB until it was killed, with no Smart App Control block and no quarantine. Started after
set WGPU_BACKEND=dx12, it opened normally (the reporter's answer:dx12).crates/anyxboxx-launcher/src/renderer.rs:window_backends()takes the backendsWGPU_BACKENDnames when it is set; else Direct3D 12 alone on Windows; else, under Proton and Wine, egui-wgpu's own default.wgpu_options()puts that into eframe'sWgpuConfiguration.main.rspasseswgpu_options(host::detect_host())inNativeOptions, using the launcher's existing host detection (Wine'swine_get_versionexport).docs/launcher.mdanddocs/fr/lanceur.md: a troubleshooting line for a launcher that never opens its window, with theWGPU_BACKENDsetting.Why Direct3D 12, and only on real Windows:
d3d12.dll), so every machine that runs the game has it. Vulkan is then never loaded for the window: no Vulkan instance, no implicit layers.WGPU_BACKENDstill wins, so Vulkan stays one setting away.What it changes for other Windows users: with both backends allowed, wgpu lists Vulkan adapters before Direct3D 12 ones (wgpu-core 29:
Instance::newadds Vulkan, then Metal, then Dx12, andrequest_adaptersorts only by device type, stably), so on a machine with a Vulkan driver the window has been drawn through Vulkan until now. It is drawn through Direct3D 12 from now on: the API the game itself uses on that machine.Not known: why the hang happens (an implicit Vulkan layer from another program, or a driver on a preview build, are the usual suspects). Only one machine has shown it.
Linked issue: Refs #483
Verification
Linux, Rust 1.98.1, GNU Windows target (
x86_64-pc-windows-gnu, MinGW), on top ofmainat173bee0:Not run: the launcher's tests (Wine aborts at start-up in that container) and the launcher itself on Windows. The Windows
cargo testjob of CI runs the tests.cargo fmt --check -p anyxboxx-launcherreports diffs inenv.rs,launch.rsandoptions.rsthat are already onmain; this pull request leaves those files untouched.Oracle and test data
WGPU_BACKEND=dx12), and egui-wgpu 0.34's default (Backends::from_env().unwrap_or(Backends::PRIMARY | Backends::GL)), read in its source.renderer::testscheck the choice on each host, thatWGPU_BACKENDwins on both, and that the options still let eframe create its own wgpu instance (otherwise the backends would be ignored). They fail to compile without the module.Checklist
E_NOTIMPL), never a fake success.test_readme_sync.pychecks it). No README change; the launcher guide is changed in both languages.This change was made with AI assistance (Claude Code): written and statically checked by the AI as described above. It was not run on Windows.
🤖 Generated with Claude Code
Imported from LooperSalty/AnyXboxX. Originally posted by chatgpt-codex-connector[bot] on 2026-11-27T15:57:26Z.
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
1cba944ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.