gpu: say at startup when Resizable BAR / GPU upload heaps are unavailable #168

Open
github-bot wants to merge 1 commit from github-bot/gh-167 into main AGit
Owner

@⁠SovietBearz0r on GitHub · 2026-12-05 20:50 UTC · original
SovietBearz0r:rebar-warning → main · +78 −7 · 2 files · 1 commits · open

Darner warns at start when Resizable BAR is off (72 of 266 player logs were missing its fast path because ReBAR was off — "the build now warns you when it starts"). Our tree quietly falls back for the same capabilities.

What

  • Host::mapped_card_memory() already queries D3D12_FEATURE_D3D12_OPTIONS16::GPUUploadHeapSupported (the D3D12 ReBAR/upload-heap capability) lazily on first use. It is now asked once when the D3D12 device is created: info when available, warn when not, naming what falls back — ReBAR mapped windows (VICTORY_WINDOWS_BAR_MB) and card-memory submission uploads (VICTORY_SEND_BAR=1) — and the honest causes (ReBAR in BIOS/UEFI, Win11 24H2+ runtime, driver).
  • WARP/software adapters skip the line. Opt-out VICTORY_REBAR_WARN=0. No behaviour change.

Verification

  • cargo test -p victory-gpu --lib: 717 passed, 0 failed, 21 ignored (new test pins the info/warn text, the two affected switches, and the opt-out); clippy -D warnings default+all-features clean; cargo check -p victory; policy 442 files.
  • Needs in-game: one run ReBAR-on shows the info line once before the first frame, one ReBAR-off/non-ReBAR card shows the warning once.
**@⁠SovietBearz0r** on GitHub · 2026-12-05 20:50 UTC · [original](https://github.com/ReTerryDavis/ReVIctory/pull/167) `SovietBearz0r:rebar-warning` → `main` · +78 −7 · 2 files · 1 commits · open Darner warns at start when Resizable BAR is off (72 of 266 player logs were missing its fast path because ReBAR was off — "the build now warns you when it starts"). Our tree quietly falls back for the same capabilities. ## What - `Host::mapped_card_memory()` already queries `D3D12_FEATURE_D3D12_OPTIONS16::GPUUploadHeapSupported` (the D3D12 ReBAR/upload-heap capability) lazily on first use. It is now asked once when the D3D12 device is created: **info** when available, **warn** when not, naming what falls back — ReBAR mapped windows (`VICTORY_WINDOWS_BAR_MB`) and card-memory submission uploads (`VICTORY_SEND_BAR=1`) — and the honest causes (ReBAR in BIOS/UEFI, Win11 24H2+ runtime, driver). - WARP/software adapters skip the line. Opt-out `VICTORY_REBAR_WARN=0`. No behaviour change. ## Verification - `cargo test -p victory-gpu --lib`: **717 passed, 0 failed, 21 ignored** (new test pins the info/warn text, the two affected switches, and the opt-out); clippy `-D warnings` default+all-features clean; `cargo check -p victory`; policy 442 files. - **Needs in-game**: one run ReBAR-on shows the info line once before the first frame, one ReBAR-off/non-ReBAR card shows the warning once.
Darner's rig.rs/play.rs warn at start when the card's memory cannot be
mapped by the CPU (GPU upload heaps), which is what its fast path needs:
72 of 266 player logs lacked it because Resizable BAR was off. Our tree
already asks D3D12_FEATURE_D3D12_OPTIONS16.GPUUploadHeapSupported in
Host::mapped_card_memory(), but only logged "card memory the CPU maps"
on first use: a minute in at the earliest, and only with the launcher's
Extra GPU optimizations (VICTORY_WINDOWS_BAR_MB) or VICTORY_SEND_BAR=1.

Now the line is said once when the host device is made: info when GPU
upload heaps are there, warn when they are not, and the warn names what
is off without them (ReBAR mapped windows, VICTORY_WINDOWS_BAR_MB, and
submission uploads through card memory, VICTORY_SEND_BAR=1). The
wording claims nothing this tree does not have, and the software
adapter (WARP) is skipped, as "check the BIOS" would be wrong there.
VICTORY_REBAR_WARN=0 silences the line. upload_heap_line() is the pure
choice of line and is tested.

Gates: cargo test -p victory-gpu --lib = 717 passed, 0 failed, 21
ignored; cargo clippy -p victory-gpu --all-targets --all-features --
-D warnings; cargo check -p victory; cargo xtask policy.

In-game check still needed: a run with Resizable BAR on should log the
info line once (before the first frame) and one without it the warn
line; no setting and no rendered output changes.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-05 20:53:15 +00:00
Author
Owner

@⁠SovietBearz0r on GitHub · 2026-12-05 21:48 UTC · original

In-game check done on this box (RX 9070 XT 16 GB, RDNA4, Ryzen 9 9900X, Windows; diag build, bench.ps1 builtin:cruise, -Gpu 0): the warning path works exactly as intended — one line at start, no errors:

WARN [gpu] … the card's memory is not mapped by the CPU: GPU upload heaps are unavailable (they need Resizable BAR on …) … supported=false

This machine actually reports upload heaps unavailable, so the warn path is verified and the info path is not (needs a ReBAR-on machine). No behaviour/pacing change; log: data\ingame-verify\logs\rebar-default.log (this was the cold-cache lap, 139 shader translations, later runs clean).

**@⁠SovietBearz0r** on GitHub · 2026-12-05 21:48 UTC · [original](https://github.com/ReTerryDavis/ReVIctory/pull/167#issuecomment-7446016033) In-game check done on this box (RX 9070 XT 16 GB, RDNA4, Ryzen 9 9900X, Windows; diag build, `bench.ps1` builtin:cruise, `-Gpu 0`): the warning path works exactly as intended — one line at start, no errors: ``` WARN [gpu] … the card's memory is not mapped by the CPU: GPU upload heaps are unavailable (they need Resizable BAR on …) … supported=false ``` This machine actually reports upload heaps unavailable, so the warn path is verified and the info path is not (needs a ReBAR-on machine). No behaviour/pacing change; log: `data\ingame-verify\logs\rebar-default.log` (this was the cold-cache lap, 139 shader translations, later runs clean).
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/168/head:github-bot/gh-167'
git switch 'github-bot/gh-167'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-167'
git switch 'github-bot/gh-167'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-167'
git switch 'github-bot/gh-167'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-167'
git switch 'main'
git merge --squash 'github-bot/gh-167'
git switch 'main'
git merge --ff-only 'github-bot/gh-167'
git switch 'main'
git merge 'github-bot/gh-167'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.