GPU: reject non-software WARP adapters under Proton #41

Manually merged
github merged 1 commit from gh-pr/41/head into gh-pr/41/base 2026-11-26 03:47:45 +00:00
Owner

@⁠LaunchDoesntCode on GitHub · 2026-11-23 23:39 UTC · original
codex/proton-warp-safety → main · +51 −2 · 1 files · 1 commits · merged 2026-11-24 00:43 UTC

Summary

VICTORY_D3D12_WARP=1 is intended to keep diagnostics on a software adapter. Under Proton/DXVK, EnumWarpAdapter can instead return the first adapter with no software flag. Creating a device on it would silently use the host GPU while VIctory reports WARP.

  • Check DXGI_ADAPTER_FLAG_SOFTWARE before D3D12CreateDevice; refuse the adapter and log its vendor/flags when the flag is absent.
  • Return an HRESULT without Error::new, whose WinRT error-message path calls Wine's unimplemented RoOriginateErrorW.
  • Add a focused Windows DXGI test that checks the same adapter boundary without creating a D3D12 device or reading title data.

Validation

  • Diagnostics Windows MSVC cross-build (--profile diag --features diagnostics with xwin SDK and lld-link): passed.
  • Targeted Windows DXGI test under Proton 10 with lavapipe: 1 passed. DXVK logged WARP not supported, returning first hardware adapter; the returned descriptor had vendor 0x10005, flags 0x0, and the guard rejected it without a Wine abort.
  • cargo xtask policy: passed (148 files).
  • git diff --check: passed.

This verifies adapter selection, not title rendering. The test uses only DXGI and synthetic code.

**@⁠LaunchDoesntCode** on GitHub · 2026-11-23 23:39 UTC · [original](https://github.com/Marvisak/VIctory/pull/41) `codex/proton-warp-safety` → `main` · +51 −2 · 1 files · 1 commits · merged 2026-11-24 00:43 UTC ## Summary `VICTORY_D3D12_WARP=1` is intended to keep diagnostics on a software adapter. Under Proton/DXVK, `EnumWarpAdapter` can instead return the first adapter with no software flag. Creating a device on it would silently use the host GPU while VIctory reports WARP. - Check `DXGI_ADAPTER_FLAG_SOFTWARE` before `D3D12CreateDevice`; refuse the adapter and log its vendor/flags when the flag is absent. - Return an HRESULT without `Error::new`, whose WinRT error-message path calls Wine's unimplemented `RoOriginateErrorW`. - Add a focused Windows DXGI test that checks the same adapter boundary without creating a D3D12 device or reading title data. ## Validation - Diagnostics Windows MSVC cross-build (`--profile diag --features diagnostics` with xwin SDK and `lld-link`): passed. - Targeted Windows DXGI test under Proton 10 with lavapipe: 1 passed. DXVK logged `WARP not supported, returning first hardware adapter`; the returned descriptor had vendor `0x10005`, flags `0x0`, and the guard rejected it without a Wine abort. - `cargo xtask policy`: passed (148 files). - `git diff --check`: passed. This verifies adapter selection, not title rendering. The test uses only DXGI and synthetic code.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:47:44 +00:00
github manually merged commit 0b607b1ca5 into gh-pr/41/base 2026-11-26 03:47:45 +00:00
Author
Owner

@⁠raffclar on GitHub · 2026-11-23 23:50 UTC · original

Looks good! Tested and checked

**@⁠raffclar** on GitHub · 2026-11-23 23:50 UTC · [original](https://github.com/Marvisak/VIctory/pull/41#issuecomment-7117424219) Looks good! Tested and checked
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!41
No description provided.