From e572a5316f28d5364c32dac5205a4fbb3d2d94f1 Mon Sep 17 00:00:00 2001 From: Hamza Date: Tue, 20 Oct 2026 18:26:44 +0500 Subject: [PATCH] Graphics: the start-up log says which backend was chosen and how to change it `Fallback::begin` returns before the fallback runs when `WGPU_BACKEND` is set, logging that wgpu picks the backend. So the line below it is reached only when the variable is *not* set -- and it said "(WGPU_BACKEND overrides)", which reads in a log as though the user's environment had chosen the backend when nothing had. before: graphics: DirectX 12 (WGPU_BACKEND overrides) after: graphics: DirectX 12 (first choice; set WGPU_BACKEND to choose another) The report quotes that line as evidence of which backend a start used, which is exactly the wrong conclusion to be led to. Part of #1343. --- apps/designcraft/src/gpu/backend.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/designcraft/src/gpu/backend.rs b/apps/designcraft/src/gpu/backend.rs index 0a3cda61..57073768 100644 --- a/apps/designcraft/src/gpu/backend.rs +++ b/apps/designcraft/src/gpu/backend.rs @@ -231,7 +231,10 @@ impl Fallback { choice.backend.name(), choice.record.failed ), - None => log::info!("graphics: {} (WGPU_BACKEND overrides)", choice.backend.name()), + // `begin` returns before this when `WGPU_BACKEND` is set, so reaching here means it is + // not: the message said the opposite, which reads in a log as though the user's + // environment had chosen the backend (#1343). + None => log::info!("graphics: {} (first choice; set WGPU_BACKEND to choose another)", choice.backend.name()), } let instance = instance_backends(choice.backend, &choice.record.failed); Some(Fallback { backend: choice.backend, switched_from: choice.switched_from, instance, path, record: choice.record })