Diagnostics: VICTORY_D3D12_WARP=0 still selects the software adapter #610
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory#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?
@Fluxxer763664 on GitHub · 2026-11-24 05:35 UTC · original
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.
github-bot referenced this issue2026-11-26 04:13:19 +00:00
@LAKSHYA-cmd-tech on GitHub · 2026-11-24 08:30 UTC · original
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
@0xmp3 on GitHub · 2026-11-24 09:57 UTC · original
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).
@Sunkiller-qc on GitHub · 2026-11-24 12:54 UTC · original
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.