forked from 1b-agent/opencadstudio-upstream
Older GPUs without usable DirectX 12 Feature Level 12_0 or working Vulkan support (e.g. legacy Intel iGPUs and other old parts), and old GLES drivers whose shader compiler rejects iced's own shaders, crash at startup or on the first drawing viewport: StagingBelt aborts in Buffer::get_mapped_range (panic=abort, silent exit) on the DX12 path, and shader compilation fails inside iced's gradient pipeline on the GLES path. Selecting a working backend via WGPU_BACKEND before iced boots avoids both classes. - Probe each candidate backend (Windows: dx12,vulkan,gl; Linux: vulkan,gl) in an isolated --gpu-probe child: device request, staging-style mapped upload, render pipeline creation (its fragment shader reads a private vec4 array, catching old-Mesa compile failures), offscreen render and readback. First fully-passing backend wins; explicit --backend / WGPU_BACKEND / --safe-mode always win, and Windows keeps preferring DX12/Vulkan (#55). - Software adapters (WARP/llvmpipe/SwiftShader) are the last resort before a best-effort GL attempt: slow but alive. - The crash sentinel names the attempted backend so only implicated backends are skipped next launch. - Winning probes report adapter limits; GPUs without shader storage buffers get the packed compatibility renderer automatically, with a startup command-line notice so the switch is never silent.
30 lines
550 B
Rust
30 lines
550 B
Rust
#![allow(non_snake_case)]
|
|
#![recursion_limit = "256"]
|
|
|
|
pub mod app;
|
|
#[cfg(not(target_arch = "wasm32"))]
|
|
pub mod cli;
|
|
pub mod command;
|
|
pub mod config;
|
|
pub mod discussions;
|
|
pub mod entities;
|
|
#[cfg(not(target_arch = "wasm32"))]
|
|
pub mod gpu_backend;
|
|
pub mod i18n;
|
|
pub(crate) mod input;
|
|
pub mod io;
|
|
#[cfg(not(target_arch = "wasm32"))]
|
|
pub mod mcp;
|
|
pub mod modules;
|
|
#[cfg(not(target_arch = "wasm32"))]
|
|
pub(crate) mod network;
|
|
pub mod par;
|
|
pub mod patreon;
|
|
pub mod perf;
|
|
pub mod plugin;
|
|
pub mod scene;
|
|
pub mod snap;
|
|
pub mod sys;
|
|
pub mod ui;
|
|
pub mod videos;
|