Repository navigation
Windows: an Intel GPU runs on DX12, not Vulkan (0.1.7's Intel integrated graphics crash) - #180
Merged
Merged
Conversation
…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.
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
0.1.7's tester on Windows 10 crashed on Intel integrated graphics under Vulkan;
WGPU_BACKEND=dx12was the workaround. Nothing in 0.1.7 or 0.1.8-rc2 changed this:gpu/deviceasked wgpu for every backend, and wgpu picks Vulkan's adapter for that GPU.What changes:
WGPU_BACKENDset, raea asks DX12 for an adapter first, and keeps it when it's Intel's own hardware (vendor0x8086, not WARP).WGPU_BACKENDall keep today's pick. The release's Windows check setsvulkanfor 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), andsystems/k's kernels.Tests:
dx12_first's unit testintel_on_windows_runs_on_dx12covers the Intel, NVIDIA, AMD, WARP, no-DX12, env-set and non-Windows cases.cargo test -p raea-gpu-devicepasses, andraea-clibuilds (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