mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-14 19:27:01 -04:00
wgpu loads the driver of every backend in an instance's set while it enumerates adapters. The compute device (crates/gpu) hard-coded Backends::PRIMARY (Vulkan + DX12 + Metal) and ignored WGPU_BACKEND, and was created from LightcraftApp::new on a background thread at launch, so a crashing Vulkan driver (Intel UHD 630, igvk64.dll) killed the process before the window appeared; the window (egui-wgpu) also listed Vulkan. - lightcraft_gpu::backend: DX12 only on Windows (Metal on macOS, as before on Linux) for both the compute device and the window; LIGHTCRAFT_GPU_BACKEND=dx12|vulkan|metal|gl|auto|off, else WGPU_BACKEND; backends missing from the build fall back to the default. - The device is created only when GPU rendering is enabled, after the first frame; the preference is applied before the window opens. - Crash sentinel: gpu-init.marker in the settings folder around device creation; if left behind, the next launch starts with GPU rendering off and a notice saying how to turn it back on. - Tests: backend parsing/selection, sentinel, window defaults, headless snapshot with LIGHTCRAFT_GPU=0 / LIGHTCRAFT_GPU_BACKEND=off. - Docs: gpu-pipeline.md (backends, env vars, troubleshooting), whats-new, parity LR-BEHAV-GPU. Co-Authored-By: Claude Opus 5.5 <[email protected]>