mirror of
https://github.com/storytold/cadcraft.git
synced 2026-12-02 02:38:30 -06:00
When the first start of the window's graphics fails, run eframe again in the same process with the next attempt instead of exiting: - the start as it always was (DirectX 12 alone on Windows, eframe's backends elsewhere); - OpenGL alone, where those backends have it beside another; - the same backends on a software adapter (WARP, llvmpipe). Each is tried with a stencil buffer, then without. No attempt creates a backend the first one didn't, so Windows still never creates OpenGL (#31). What failed picks the next attempt: an adapter, device or surface error moves to another adapter; a failure the stencil buffer is part of tries the same adapter without it. Before the app is created, a clear-and-read-back check catches a driver that takes the stencil buffer and draws nothing (#1724's Mesa log). A canvas whose GPU pipelines are refused draws on the CPU. WGPU_BACKEND and CADCRAFT_STENCIL still win. Nothing is remembered between starts. The log and the status bar say which renderer draws and why. When every attempt fails, the first error is returned. A debug-only CADCRAFT_GRAPHICS_FAULT switch fails one step of one attempt, for testing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>