mirror of
https://github.com/storytold/designcraft.git
synced 2026-10-24 10:16:59 -06:00
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.
This commit is contained in:
@@ -231,7 +231,10 @@ impl Fallback {
|
|||||||
choice.backend.name(),
|
choice.backend.name(),
|
||||||
choice.record.failed
|
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);
|
let instance = instance_backends(choice.backend, &choice.record.failed);
|
||||||
Some(Fallback { backend: choice.backend, switched_from: choice.switched_from, instance, path, record: choice.record })
|
Some(Fallback { backend: choice.backend, switched_from: choice.switched_from, instance, path, record: choice.record })
|
||||||
|
|||||||
Reference in New Issue
Block a user