Skip to content

Windows: an Intel GPU runs on DX12, not Vulkan (0.1.7's Intel integrated graphics crash) - #180

Merged
shinyobjectz merged 2 commits into
mainfrom
windows-intel-dx12
Nov 18, 2026
Merged

shinyobjectz merged 2 commits into
mainfrom
windows-intel-dx12

Conversation

@shinyobjectz

@shinyobjectz shinyobjectz commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

0.1.7's tester on Windows 10 crashed on Intel integrated graphics under Vulkan; WGPU_BACKEND=dx12 was the workaround. Nothing in 0.1.7 or 0.1.8-rc2 changed this: gpu/device asked wgpu for every backend, and wgpu picks Vulkan's adapter for that GPU.

What changes:

  • On Windows with no WGPU_BACKEND set, raea asks DX12 for an adapter first, and keeps it when it's Intel's own hardware (vendor 0x8086, not WARP).
  • Any other pick is dropped, and every backend is asked as before.
  • NVIDIA, AMD, a PC with no GPU, macOS, Linux, and an explicit WGPU_BACKEND all keep today's pick. The release's Windows check sets vulkan for lavapipe, so its path doesn't change.

Coverage: raea_gpu_device::backends() is the one rule, and every wgpu instance raea makes asks it. That covers the shared device (the app window, the stage and renders), Bevy's own device when the shared one isn't there (runtime/view), and systems/k's kernels.

Tests: dx12_first's unit test intel_on_windows_runs_on_dx12 covers the Intel, NVIDIA, AMD, WARP, no-DX12, env-set and non-Windows cases. cargo test -p raea-gpu-device passes, and raea-cli builds (macOS), and on this Mac the sample room renders at the same speed as main (10.0–10.1 ms a frame warm, against 10.1–10.5). An Intel PC isn't available to try it on; the rc's Windows build compiles the DX12 branch natively.

🤖 Generated with Claude Code

…ulkan driver

raea 0.1.7 crashed on a Windows 10 PC's Intel integrated graphics under Vulkan, and ran with WGPU_BACKEND=dx12. Asked for
every backend, wgpu takes Vulkan's adapter for the same GPU. With no WGPU_BACKEND on Windows, DX12's pick is asked
first now, and kept when it's Intel's own hardware (vendor 0x8086, not WARP); any other pick is dropped and every
backend asked as before. NVIDIA and AMD, a PC with no GPU, a Mac or Linux, and a WGPU_BACKEND someone set (Windows'
release check sets vulkan, for lavapipe) keep wgpu's own pick (dx12_first, tested). The page window, the stage and
renders all take this device (runtime/view render_creation); only its fallbacks (Bevy's own device, systems/k when
the shared device is off) don't.
…nd the kernels take DX12 on an Intel GPU too

#180's first commit chose DX12 for an Intel GPU only in the shared device. Bevy's own device (when the shared one
fails) and systems/k's kernels asked wgpu for every backend, so they still met the Intel Vulkan driver that crashed
0.1.7 on Windows. raea_gpu_device::backends() is now the one answer for all three: WGPU_BACKEND when set; else, on
Windows, DX12 alone when DX12's pick is Intel's own GPU (dx12_first); else every backend, wgpu's default. Found once
a process. On a Mac nothing changes: the sample room renders at 10.0-10.1 ms a frame warm, against main's 10.1-10.5.
@shinyobjectz
shinyobjectz merged commit 4bb9478 into main Nov 18, 2026
4 checks passed
rosaldo pushed a commit to rosaldo/raea that referenced this pull request Nov 19, 2026
…ws meshes right

shinyobjectz#155: raea's app crashed before its window in AMD's OpenGL driver (atio6axx.dll, 0xc0000005) on a laptop with an
AMD 780M beside an RTX 5060, under wgpu's every-backend default and under Vulkan, and ran with WGPU_BACKEND=dx12.
shinyobjectz#180 put an Intel GPU on DX12, but looked only at DX12's high-performance pick, which on that laptop is the NVIDIA
GPU. Now dx12_first looks at every GPU DX12 lists: an Intel or AMD one (not WARP) puts the process on DX12, whichever
GPU it then draws on. A PC with only NVIDIA GPUs, a Mac, Linux and a WGPU_BACKEND someone set keep wgpu's own pick.

Testing that on the RTX 4070 (the laptop's pick) found DX12 drawing meshes wrong: a box and a sphere came out as one
mangled shape. The shared device drops wgpu's indirect-draw validation in release builds, and on DX12 that pass is
what writes each indirect draw's first vertex and first instance (wgpu-core's D3D12 special constants). With it on,
the same frame matches Vulkan's. So the validation now stays wherever DX12 can be the backend (on Windows, unless
WGPU_BACKEND leaves DX12 out); Mac, Linux and a Vulkan-only Windows process keep the speed-up. Without this, 0.1.8's
shinyobjectz#180 would have drawn every Intel GPU's 3D mangled.

Known cost, unchanged here: DX12 compiles shaders with FXC (raea ships no dxcompiler.dll; DXC 1.9.2609 fails on
bevy_hanabi's shaders), so a 3D render's first frame on DX12 took 22 s on the 4070 against Vulkan's 8 s.

docs/settings.md gets a WGPU_BACKEND row (what raea picks, and the override).
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.

1 participant