GPU: VICTORY_* switches set to 0 are off (#610) #615
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/615"
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 KoLolX3 on 2026-11-24T05:39:58Z.
Fixes #610.
VICTORY_D3D12_WARP=0still selected the software adapter because the switch was read as "the variable exists" (var_os(..).is_some()). The issue proposes a one-line predicate for that one variable. The same pattern is used by five more switches that the README documents as=1, so=0turned each of them on:VICTORY_D3D12_DEBUGvictory-gpu/src/host.rsVICTORY_D3D12_GBVhost.rsVICTORY_D3D12_DREDhost.rsVICTORY_D3D12_WARPhost.rs(the issue)VICTORY_GPU_TIMINGhost.rsVICTORY_DUMP_TARGETSvictory-gpu/src/capture.rsChange: a small
victory-gpu/src/switch.rswith a purevalue_is_on(Option<&OsStr>)(set and not0) andswitch::on(name), used by all six reads, plus one sentence in the README above its switch table. Any value other than0keeps the meaning it had, so nothing that worked before changes. It lives invictory-gpubecause that crate does not depend onvictory-coreand all six reads are in it. This supersedes a patch for the WARP variable alone and will conflict textually with #208 inhost.rs's adapter selection, which is easy to resolve (the predicate becomesswitch::on(..)).The diagnosis and the predicate are from the report in #610.
Tested on Linux (Ryzen 7 5700, rustc 1.98.1, the repo's pinned toolchain).
victory-gpudoes not build on Linux onmainitself, so the unit tests were run in a scratch tree with #523 merged underneath this change:unset_is_off,zero_is_off,one_is_on,other_values_keep_their_old_meaning): pass. Negative control: with the oldis_some()logiczero_is_offfails.cargo test --workspace: 166 passed, 0 failed, 13 ignored.cargo xwin check --workspace --target x86_64-pc-windows-msvcok, andcargo xwin check -p victory-gpu --features diagnosticsok (the switches are diagnostics-gated, so both configurations were compiled, with no new warnings).main(this change adds none).Not run: the six call sites themselves under a real D3D12 device (no Windows host here); they are plain boolean substitutions covered by the type-check. No game data is in this PR.
Imported from Marvisak/VIctory. Originally posted by LAKSHYA-cmd-tech on 2026-11-24T05:43:51Z.
Review: APPROVED
Tested and verified on Windows 11 x64 (D3D12 WARP + Hardware).
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-24T05:53:26Z.
Verified #610 on Windows with the
diagnosticsfeature. Each setting ran in a fresh process through the normalhost()initialization. I resolved the live D3D12 device LUID through DXGI and checked the adapter's software flag.VICTORY_D3D12_WARPd2a4baea4974e401This verifies the WARP selection path without loading a title.
Imported from Marvisak/VIctory. Originally posted by Exorion1er on 2026-11-24T09:33:28Z.
#695 fixes the same issue (#610) for
VICTORY_D3D12_WARPonly. Its branch also carries a workspace-widecargo fmtcommit (37 files) and an unrelated speech commit, so it conflicts withmainand with much else. This PR fixes=0for all six switches and merges cleanly. One thing to know: it also makes=0mean off for the other five switches, which is wider than #610 asked for (probably what everyone wants, but it's a behaviour change).Checked by reading both diffs. AI-assisted (Claude Code).
Imported from Marvisak/VIctory. Originally posted by mercuryVM on 2026-11-24T11:20:39Z.
Review: APPROVED
Tested
a4974e4on Windows 11, RTX 5070, MSVC:cargo test -p victory-gpu -- --test-threads=147 passed, including the fourswitchtests. With--features diagnostics, 49 passed. Clippy's 1 warning is the existing one in host.rs.switch::onpredicate for all six switches is better than fixingVICTORY_D3D12_WARPalone. It keeps every documented=1usage working and only changes0.VICTORY_D3D12_WARP=0case with its ownwarp_selected_at. Whichever lands second should callswitch::oninstead of keeping two predicates.AI-assisted (Claude Code).