GPU: VICTORY_* switches set to 0 are off

Six diagnostic switches (VICTORY_D3D12_DEBUG, _GBV, _DRED, _WARP,
VICTORY_GPU_TIMING and VICTORY_DUMP_TARGETS) were on whenever their
variable existed, so VICTORY_D3D12_WARP=0 still selected the software
adapter. They now go through one helper that reads a value other than 0
as on and an unset variable or 0 as off; every other value keeps the
meaning it had. The README says so above its switch table.

(cherry picked from commit a4974e4c21c16e2305942e37a868647d42eefe37)
This commit is contained in:
KoLolX3 authored and local committed 2026-11-25 01:02:59 -06:00
1 parent 20d9d1ebfe
commit 77582c3af4
5 files changed
+54 -9

No files matched your search

+1 -1
View File
@@ -358,7 +358,7 @@ static TARGETS: std::sync::Mutex<Vec<(usize, std::sync::Arc<crate::resource::Hos
fn dump_on() -> bool {
static ON: std::sync::OnceLock<bool> = std::sync::OnceLock::new();
*ON.get_or_init(|| folder().is_some() && std::env::var_os("VICTORY_DUMP_TARGETS").is_some())
*ON.get_or_init(|| folder().is_some() && crate::switch::on("VICTORY_DUMP_TARGETS"))
}
/// Notes a title texture the frame being built renders to or writes.