Windows: start Direct3D 12 first, and Vulkan only without a D3D12 GPU (#1190)
* Windows: start Direct3D 12 first, and Vulkan only without a D3D12 GPU wgpu started Vulkan, D3D12 and OpenGL together and preferred Vulkan, so every Windows start loaded all installed Vulkan drivers. An old Intel Vulkan driver (igvk64.dll) crashed 0.10.1 at startup inside the driver. The app now probes D3D12, then Vulkan, then OpenGL, one backend at a time, and starts only the first with a hardware adapter (WARP when none has one). WGPU_BACKEND still wins; graphics.json's "backend" sets the order by hand; the software renderer (safe mode, the retry) uses D3D12 alone. A new Windows CI job starts the real app under several settings. Co-Authored-By: Claude Opus 5.5 <[email protected]> * CI: a test filter YAML parses Co-Authored-By: Claude Opus 5.5 <[email protected]> * CI: the startup smoke test writes graphics.json where the app reads it Co-Authored-By: Claude Opus 5.5 <[email protected]> * CI: run the WARP shader tests one at a time WARP's shader JIT (d3d10warp.dll) crashed twice in 124 runs of the gpu tests with four test threads, with a null read inside its own optimizer while several devices compiled compute pipelines at once. Serial runs did not crash. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
241dac1542
commit
95ea05e7c8
7 files changed
+302
-14
No files matched your search
@@ -629,7 +629,14 @@ pub fn show_mm_bare(app: &SolveApp, v: f64) -> String {
|
||||
/// change while it is open).
|
||||
fn save_graphics(app: &SolveApp) {
|
||||
if let Some(path) = &app.services.graphics_path {
|
||||
let _ = std::fs::write(path, json!({ "msaa": app.preferences.msaa }).to_string());
|
||||
// Other settings in the file (the graphics `backend`) stay as they are.
|
||||
let mut graphics = std::fs::read_to_string(path)
|
||||
.ok()
|
||||
.and_then(|s| serde_json::from_str::<serde_json::Value>(&s).ok())
|
||||
.filter(serde_json::Value::is_object)
|
||||
.unwrap_or_else(|| json!({}));
|
||||
graphics["msaa"] = json!(app.preferences.msaa);
|
||||
let _ = std::fs::write(path, graphics.to_string());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1215,10 +1222,12 @@ mod tests {
|
||||
// WebGPU's guarantee for the surface format: 8x saved, the device can only do 1x and 4x.
|
||||
app.msaa_supported = vec![1, 4];
|
||||
app.preferences.msaa = 8;
|
||||
std::fs::write(&path, r#"{"msaa":8,"backend":"vulkan"}"#).unwrap();
|
||||
check_msaa(&mut app, 8);
|
||||
assert_eq!(app.preferences.msaa, 4);
|
||||
let saved: serde_json::Value = serde_json::from_str(&std::fs::read_to_string(&path).unwrap_or_default()).unwrap_or_default();
|
||||
assert_eq!(saved["msaa"], 4);
|
||||
assert_eq!(saved["backend"], "vulkan", "the backend preference is kept");
|
||||
assert_eq!(app.settings_reset, [SettingReset::Msaa { requested: 8, reset: 4, supported: vec![1, 4] }]);
|
||||
assert_eq!(
|
||||
app.settings_reset[0].message(),
|
||||
|
||||
Reference in new issue
Block a user