forked from 1b-agent/opencadstudio-upstream
fix(windows): default to DX12/Vulkan so AMD GL driver can't crash startup (#55)
On some Windows hybrid-GPU laptops the AMD OpenGL driver (atio6axx.dll) access-violates the instant wgpu enumerates its GL backend at startup, killing the app before any window appears — even though DX12 works fine. The crash is inside AMD's proprietary GL ICD, so it can't be fixed app-side; instead default WGPU_BACKEND to dx12,vulkan on Windows so the GL ICD is never touched. An explicit user-set WGPU_BACKEND still wins, so GL remains available via override. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
1 parent
e708f90517
commit
12e5a4b744
1 file changed
+9
@@ -17,5 +17,14 @@ mod ui;
|
||||
mod update_check;
|
||||
|
||||
fn main() -> iced::Result {
|
||||
// On some Windows hybrid-GPU laptops the AMD OpenGL driver (atio6axx.dll)
|
||||
// access-violates the moment wgpu enumerates its GL backend at startup,
|
||||
// killing the app before any window appears — even though DX12 would work
|
||||
// fine (#55). Restrict wgpu to DX12/Vulkan so the GL ICD is never touched.
|
||||
// An explicit user-set WGPU_BACKEND still wins.
|
||||
#[cfg(target_os = "windows")]
|
||||
if std::env::var_os("WGPU_BACKEND").is_none() {
|
||||
std::env::set_var("WGPU_BACKEND", "dx12,vulkan");
|
||||
}
|
||||
app::run()
|
||||
}
|
||||
Reference in new issue
Block a user