GPU: treat VICTORY_D3D12_WARP=0 as unset #639

Closed
Quat3rnion wants to merge 1 commit from upstream-pr/639 into main
Quat3rnion commented 2026-11-24 06:04:14 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Quat3rnion on 2026-11-24T06:04:14Z.


What

The diagnostics switch used var_os(...).is_some(), so an explicit
VICTORY_D3D12_WARP=0 still selected the software adapter; the workaround
was to delete the variable. The value is now parsed in a host-independent
helper where 0 means unset, while 1, empty and other values keep their
existing meaning. Fixes issue #610.

An AI tool wrote part of this change.

Tested

  • Linux: cargo test --workspace: 165 passed, 0 failed, 3 ignored. A new unit test checks unset, 0, 1, empty and an arbitrary value.
  • Windows cross-build: cargo check --target x86_64-pc-windows-gnu --workspace --tests passes. No Windows host here, so adapter selection itself was not exercised.
  • cargo xtask policy passes (151 files ok). No game files or data from them were added.

Checklist

  • Workspace tests and Windows cross-check pass.
  • cargo xtask policy passes. No game files or data from them were added.
  • AI authorship is disclosed above.
<!-- greyfinch-sync:Marvisak/VIctory:issue:6575732194 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/639). Originally posted by [Quat3rnion](https://github.com/Quat3rnion) on 2026-11-24T06:04:14Z. --- ## What The diagnostics switch used `var_os(...).is_some()`, so an explicit `VICTORY_D3D12_WARP=0` still selected the software adapter; the workaround was to delete the variable. The value is now parsed in a host-independent helper where `0` means unset, while `1`, empty and other values keep their existing meaning. Fixes issue #610. An AI tool wrote part of this change. ## Tested - Linux: `cargo test --workspace`: 165 passed, 0 failed, 3 ignored. A new unit test checks unset, `0`, `1`, empty and an arbitrary value. - Windows cross-build: `cargo check --target x86_64-pc-windows-gnu --workspace --tests` passes. No Windows host here, so adapter selection itself was not exercised. - `cargo xtask policy` passes (151 files ok). No game files or data from them were added. ## Checklist - [x] Workspace tests and Windows cross-check pass. - [x] `cargo xtask policy` passes. No game files or data from them were added. - [x] AI authorship is disclosed above.
upstream-sync closed this pull request 2026-11-24 06:54:07 +00:00
LAKSHYA-cmd-tech commented 2026-11-24 06:54:07 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by LAKSHYA-cmd-tech on 2026-11-24T06:13:02Z.

Review: APPROVED


Tested on native Windows 11 with Rust 1.98.1 (x86_64-pc-windows-msvc).

  • cargo test -p victory-gpu: all 40 tests passed cleanly.
  • cargo test -p victory-gpu --features diagnostics: all 41 tests passed cleanly, including diagnostics::tests::zero_is_like_an_unset_switch.
  • cargo xtask policy: 151 files ok.
  • Verified warp_requested treating � as unset across adapter selection. Fixes #610.
<!-- greyfinch-sync:Marvisak/VIctory:review:6034532381 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/639#pullrequestreview-6034532381). Originally posted by [LAKSHYA-cmd-tech](https://github.com/LAKSHYA-cmd-tech) on 2026-11-24T06:13:02Z. **Review:** APPROVED --- Tested on native Windows 11 with Rust 1.98.1 (x86_64-pc-windows-msvc). - cargo test -p victory-gpu: all 40 tests passed cleanly. - cargo test -p victory-gpu --features diagnostics: all 41 tests passed cleanly, including diagnostics::tests::zero_is_like_an_unset_switch. - cargo xtask policy: 151 files ok. - Verified warp_requested treating � as unset across adapter selection. Fixes #610.
Quat3rnion commented 2026-11-24 06:56:17 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Quat3rnion on 2026-11-24T06:15:55Z.


Duplicate of #615, which covers all six VICTORY_* switches rather than WARP alone. Closing in favour of that PR.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7123754587 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/639#issuecomment-7123754587). Originally posted by [Quat3rnion](https://github.com/Quat3rnion) on 2026-11-24T06:15:55Z. --- Duplicate of #615, which covers all six VICTORY_* switches rather than WARP alone. Closing in favour of that PR.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Marvisak/VIctory!639
No description provided.