Diagnostics: VICTORY_D3D12_WARP=0 still selects the software adapter #610
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Marvisak/VIctory. Originally posted by Fluxxer763664 on 2026-11-24T05:35:32Z.
While comparing hardware and WARP results for #533, a run with
VICTORY_D3D12_WARP=0still showedd3d10warp.dllin the crash stack. Removing the variable was the workaround.At
d2a4bae,crates/victory-gpu/src/host.rschecks only whether the variable exists withvar_os(...).is_some(). The adapter-selection proposal in #208 retains that behavior.I tested a small patch that treats
0like an unset variable and preserves the documented1and existing behavior for other values. Keep the diagnostics feature gate and change the predicate to:On Windows,
cargo test --locked -p victory-gpu --features diagnostics warp_passed both the setting regression test (unset,0,1, empty) and the existing adapter test. This addresses adapter selection for diagnostics. The world-rendering crash is tracked in #533.AI-assisted.
Imported from Marvisak/VIctory. Originally posted by LAKSHYA-cmd-tech on 2026-11-24T08:30:16Z.
Implemented and verified:
std::env::var_os("VICTORY_D3D12_WARP").is_some_and(|value| value != "0")now correctly treatsVICTORY_D3D12_WARP=0as unset, preserving the software adapter only when set to1or other truthy values.Added unit test
warp_adapter_setting_ignores_zero.Verification on Windows 11 MSVC:
cargo test -p victory-gpu --features diagnosticspassed (53 passed, 1 ignored benchmark).cargo clippy -p victory-gpu --features diagnostics --all-targets -- -D warningsclean with zero warnings.cargo xtask policyverified (152 files ok).Branch:
https://github.com/LAKSHYA-cmd-tech/VIctory/tree/fix/diagnostics-warp-zero-check
Imported from Marvisak/VIctory. Originally posted by 0xmp3 on 2026-11-24T09:57:26Z.
Still present at
8e79c80:crates/victory-gpu/src/host.rs:179checksvar_os(..).is_some(), soVICTORY_D3D12_WARP=0selects the software adapter.I took the route you described, but gave the setting its own predicate so it can have a regression test rather than only the adapter probe:
Evidence on this machine (Windows 11, RX 9070 XT / gfx1201, Ryzen 5 5600, Rust 1.98.1, MSVC):
is_some()predicate put back, the test fails athost.rs:270(0 must mean off); with the fix it passes. So the test pins the behaviour rather than the helper's existence.cargo clippy -p victory-gpu --all-targets --locked -- -D warnings: clean. Same with--all-features: clean.cargo test --workspace: 312 passed, 0 failed (311 before this test).An empty value still selects WARP, so no existing script changes meaning. Scope: this covers the predicate and its test; I did not run the title under either setting, so adapter selection itself is unobserved here.
Not opening a PR because external creation is
collaborators_onlyright now (#712). If a linked branch is more useful than a patch in a comment, say so and I will push it to a fork — the whole change iscrates/victory-gpu/src/host.rs, 12 added lines.AI-assisted (Hermes Agent).
Imported from Marvisak/VIctory. Originally posted by Sunkiller-qc on 2026-11-24T12:54:08Z.
Two open PRs fix this: #615 (any
VICTORY_*switch set to 0 counts as off) and #695 (onlyVICTORY_D3D12_WARP=0). Bug confirmed again at8e79c80(host.rs:179checksis_some()). #615 is the broader one. Merging one of them and closing the other would close this.