[BUNDLE] GPU fixes 4: 3 PRs, #1082 #1173 #1265 (rebuilt on main 70564ae) #1542

Open
github-bot wants to merge 6 commits from github-bot/gh-1542 into main AGit
Owner

@⁠MamaLeVrai on GitHub · 2026-11-24 18:58 UTC · original
MamaLeVrai:bundle/gpu-fixes-4 → main · +712 −11 · 9 files · 6 commits · open

One PR in place of 3. After main moved, this bundle keeps the 3 of its earlier 10 PRs that still merge; the left-out ones are listed below. The earlier description follows, and may mention PRs or measurements that no longer apply. Ten GPU PRs on top of the three GPU bundles #1418, #1426 and #1439: indirect rectangle-list draws, host texture lifetime, write watch reuse, adapter choice, GPU queries, depth-stencil views and other fixes in the GPU crate. Every head is merged unchanged onto main (70564ae, after the maintainer's 28 commits of Nov 24, 22:36 CET), and the result is built and tested together.

For reviewers and for anyone verifying with an agent (Claude, Codex, a person): this is a [BUNDLE] PR. The re-verification commands are below, so one run covers all of it.

What is inside

PR Author Head Title
#1082 bvtterbroot 42961e8e5 GPU: log the TDR settings, and warn when a GPU hang would freeze the PC
#1173 geiyiliyabumo 0be58e62d GPU: add synthetic unit tests for query.rs and signature.rs
#1265 pablogonz12 25e586822 GPU: VICTORY_WIDE_SCISSOR widens a scissor to its viewport (a diagnostic)

Changes made while bundling

No PR was edited, and there is no hand resolution: a PR that does not merge as it is, is left out (below).

Left out, and why

Rebuilt on the new main. The earlier version of this bundle had 10 PRs; 3 merge here in order, each checked with clippy as it went in.

Verification

Windows 11, RX 6950 XT, Rust 1.98.1 (the pinned toolchain):

Check Result
cargo clippy --workspace --all-targets --locked -- -D warnings clean
cargo clippy --workspace --all-targets --all-features --locked -- -D warnings clean
cargo test --workspace --locked 494 passed, 0 failed, 7 ignored (one run; main: 476 passed, 7 ignored)

The title was not run, so this says nothing about in-game effect. No game data is used or committed.

Re-verify in one go

git fetch https://github.com/MamaLeVrai/VIctory.git bundle/gpu-fixes-4
git checkout FETCH_HEAD
cargo clippy --workspace --all-targets --locked -- -D warnings
cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
cargo test --workspace --locked

To confirm that no component PR moved since this was built, compare each Head above with gh pr view <n> --repo Marvisak/VIctory --json headRefOid. If one differs, the branch needs a rebuild: merge the new head in the same order.

If this lands

The component heads are in the history unchanged, so each PR's commits and authorship are kept and GitHub should mark them merged. Merging them one by one instead works too, with the exceptions noted above.

AI-assisted (Claude Code); no game data.

🤖 Generated with Claude Code

**@⁠MamaLeVrai** on GitHub · 2026-11-24 18:58 UTC · [original](https://github.com/Marvisak/VIctory/pull/1542) `MamaLeVrai:bundle/gpu-fixes-4` → `main` · +712 −11 · 9 files · 6 commits · open **One PR in place of 3.** After `main` moved, this bundle keeps the 3 of its earlier 10 PRs that still merge; the left-out ones are listed below. The earlier description follows, and may mention PRs or measurements that no longer apply. Ten GPU PRs on top of the three GPU bundles #1418, #1426 and #1439: indirect rectangle-list draws, host texture lifetime, write watch reuse, adapter choice, GPU queries, depth-stencil views and other fixes in the GPU crate. Every head is merged unchanged onto `main` (`70564ae`, after the maintainer's 28 commits of Nov 24, 22:36 CET), and the result is built and tested together. > For reviewers and for anyone verifying with an agent (Claude, Codex, a person): this is a `[BUNDLE]` PR. The re-verification commands are below, so one run covers all of it. ## What is inside | PR | Author | Head | Title | |---|---|---|---| | #1082 | bvtterbroot | `42961e8e5` | GPU: log the TDR settings, and warn when a GPU hang would freeze the PC | | #1173 | geiyiliyabumo | `0be58e62d` | GPU: add synthetic unit tests for query.rs and signature.rs | | #1265 | pablogonz12 | `25e586822` | GPU: VICTORY_WIDE_SCISSOR widens a scissor to its viewport (a diagnostic) | ## Changes made while bundling No PR was edited, and there is no hand resolution: a PR that does not merge as it is, is left out (below). ## Left out, and why **Rebuilt on the new `main`.** The earlier version of this bundle had 10 PRs; 3 merge here in order, each checked with clippy as it went in. - **#346**: conflicts with the new `main` (or with an earlier PR of this bundle) in crates/victory-gpu/src/draw.rs. - **#431**: conflicts with the new `main` (or with an earlier PR of this bundle) in crates/victory-gpu/src/descriptor/host.rs, crates/victory-gpu/src/resource.rs. - **#493**: conflicts with the new `main` (or with an earlier PR of this bundle) in crates/victory-gpu/src/draw.rs. - **#967**: conflicts with the new `main` (or with an earlier PR of this bundle) in crates/victory-gpu/src/lib.rs. - **#1143**: conflicts with the new `main` (or with an earlier PR of this bundle) in crates/victory-gpu/src/host.rs. - **#1165**: conflicts with the new `main` (or with an earlier PR of this bundle) in crates/victory-gpu/src/host.rs. - **#1298**: conflicts with the new `main` (or with an earlier PR of this bundle) in crates/victory-gpu/src/draw.rs. - **#319** (frame wait): its test `waits_end_on_ticks_and_count_frames` fails once #174 (in #1439) is in, see #1439. - **#1188** (copystat): merged on this stack it left `page_faults` undefined under `--all-features` (`copystat.rs`). - **The other 97 open GPU-only PRs** that a first pass over all 109 left (#319 and #1188 above included in the 109) were tried on the same stack and dropped by that pass: one conflicted, the rest did not compile or lint together with the PRs already merged in the pass. They need a rebase on this stack. Their numbers: #32, #52, #67, #211, #215, #261, #275, #282, #301, #321, #331, #334, #388, #393, #401, #402, #415, #436, #440, #450, #461, #469, #492, #504, #541, #559, #575, #578, #581, #582, #583, #588, #594, #601, #602, #609, #616, #618, #635, #640, #641, #643, #652, #669, #688, #693, #928, #943, #948, #949, #952, #956, #958, #970, #974, #976, #983, #985, #986, #988, #991, #1010, #1019, #1020, #1023, #1024, #1040, #1041, #1092, #1093, #1094, #1100, #1105, #1124, #1126, #1160, #1162, #1166, #1168, #1186, #1189, #1200, #1207, #1210, #1215, #1228, #1233, #1236, #1246, #1260, #1267, #1268, #1272, #1273, #1296, #1307, #1311. ## Verification Windows 11, RX 6950 XT, Rust 1.98.1 (the pinned toolchain): | Check | Result | |---|---| | `cargo clippy --workspace --all-targets --locked -- -D warnings` | clean | | `cargo clippy --workspace --all-targets --all-features --locked -- -D warnings` | clean | | `cargo test --workspace --locked` | 494 passed, 0 failed, 7 ignored (one run; `main`: 476 passed, 7 ignored) | The title was not run, so this says nothing about in-game effect. No game data is used or committed. ## Re-verify in one go ```powershell git fetch https://github.com/MamaLeVrai/VIctory.git bundle/gpu-fixes-4 git checkout FETCH_HEAD cargo clippy --workspace --all-targets --locked -- -D warnings cargo clippy --workspace --all-targets --all-features --locked -- -D warnings cargo test --workspace --locked ``` To confirm that no component PR moved since this was built, compare each `Head` above with `gh pr view <n> --repo Marvisak/VIctory --json headRefOid`. If one differs, the branch needs a rebuild: merge the new head in the same order. ## If this lands The component heads are in the history unchanged, so each PR's commits and authorship are kept and GitHub should mark them merged. Merging them one by one instead works too, with the exceptions noted above. AI-assisted (Claude Code); no game data. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
With TdrLevel 0 Windows never resets a hung GPU: a slow or hung world
frame freezes the whole desktop, and the runtime never sees a device
removal it could report (#1054). With 1 the timeout is a blue screen.
Both are set by hand, often to keep slow frames from being reset, and
reports of "the PC froze" do not say so.

When the host device is made on a hardware adapter, read TdrLevel,
TdrDelay and TdrDdiDelay from HKLM\SYSTEM\CurrentControlSet\Control\
GraphicsDrivers, log them ("default" where a value is not set), and warn
for TdrLevel 0 or 1 with what to set instead.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A replay shows all visible geometry confined to a 1252-column band of a
2560-wide buffer, its edges on the title's own scissor (742..1994) with
viewport 2560x1440. The rects reach the host unchanged and no state is
cached, so the band is the state the title set; the switch says whether
widening it brings the frame back.

Scissors now widen to the viewport each pairs with (vertical bounds kept)
with VICTORY_WIDE_SCISSOR=1, warning about the rects they change (first
8, then every 512th); diagnostics builds log the first 8 scissor/viewport
pairs of every frame at debug level. The widening is pure logic in
scissor.rs, tested on every platform.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:35:42 +00:00
Author
Owner

@⁠sinan-cmyk on GitHub · 2026-11-24 19:23 UTC · original · edited 2026-11-24 19:32 UTC

Runtime boot check on real hardware with a retail dump

Result: same as main in this test. An earlier edit of this comment said this PR changes frame pacing. That was wrong, and I retract it. The difference came from host CPU load, not from this PR.

What happened. This PR's run happened while other builds and scans kept the CPU busy. Under that load, the menus presented at 35–43 fps instead of 30. A control run of plain main under the same kind of load also presents faster than 30: median 35.0 fps, max 42. On an idle machine, main holds 30.0. So this run compares nothing about the PR itself.

main ffe310e this PR, head b9301c6 merged onto main
Reaches the first-boot screens yes yes
crashes.log entries 0 0
Committed memory 11.1 GB 11.1 GB
Menu fps with a busy host CPU (median of the 5 s lines) 35.0 38.7

Warnings: 7, the same kinds as on main with one exception. The two 2560×1440 render targets that log "no host texture" on main now log "host texture without a use the host refuses" and are dropped. #1426 alone, which this PR stacks on, makes the same change.

A side note for anyone looking at frame pacing. When the host CPU is busy, main itself presents the 30 fps menus at 35–42 fps.

Limits. Without input, the title stays on the first-boot screens. I did not run the PR's tests. Machine: Ryzen 7 7800X3D, RTX 4070 SUPER, Windows 11 25H2, game 1.0.2.1. AI-assisted (Claude Code).

**@⁠sinan-cmyk** on GitHub · 2026-11-24 19:23 UTC · [original](https://github.com/Marvisak/VIctory/pull/1542#issuecomment-7142031462) · edited 2026-11-24 19:32 UTC ### Runtime boot check on real hardware with a retail dump **Result: same as `main` in this test.** An earlier edit of this comment said this PR changes frame pacing. **That was wrong, and I retract it.** The difference came from host CPU load, not from this PR. **What happened.** This PR's run happened while other builds and scans kept the CPU busy. Under that load, the menus presented at 35–43 fps instead of 30. A control run of plain `main` under the same kind of load also presents faster than 30: median 35.0 fps, max 42. On an idle machine, `main` holds 30.0. So this run compares nothing about the PR itself. | | `main` ffe310e | this PR, head b9301c6 merged onto `main` | |---|---|---| | Reaches the first-boot screens | yes | yes | | `crashes.log` entries | 0 | 0 | | Committed memory | 11.1 GB | 11.1 GB | | Menu fps with a busy host CPU (median of the 5 s lines) | 35.0 | 38.7 | **Warnings:** 7, the same kinds as on `main` with one exception. The two 2560×1440 render targets that log "no host texture" on `main` now log "host texture without a use the host refuses" and are dropped. #1426 alone, which this PR stacks on, makes the same change. **A side note for anyone looking at frame pacing.** When the host CPU is busy, `main` itself presents the 30 fps menus at 35–42 fps. **Limits.** Without input, the title stays on the first-boot screens. I did not run the PR's tests. Machine: Ryzen 7 7800X3D, RTX 4070 SUPER, Windows 11 25H2, game 1.0.2.1. AI-assisted (Claude Code).
Author
Owner

@⁠antikohza on GitHub · 2026-11-24 19:46 UTC · original

@⁠MamaLeVrai — #1296 (VICTORY_TEXTURE_MIP_DROP + DXGI VRAM auto-default) is now cleanly resolved onto bundle/gpu-fixes-4 (b9301c6):

  • Branch: https://github.com/antikohza/VIctory/tree/feat/texture-mip-drop-on-1542 (0d79788)
  • What was reconciled:
    • list.rs & descriptor.rs: merged cleanly with zero conflicts.
    • host.rs: kept #967 (adapter::open()) + #1426 device creation, dropped redundant best_adapter(), kept LUID-matched DEVICE_MEMORY.
    • resource.rs: wired (texture, drop) = host_texture(...) into #431's lazy OnceLock initializer (Resource::host(&self)), combining lazy first-use allocation + submission retirement with mip-drop.
    • texture.rs: kept #1418's 5-arg detile_plane() for existing tests and added detile_plane_with_drop(..., self.mip_drop, ...) for mip-dropped staging detiling.
  • CI (Windows MSVC 1.98.1): Clippy (default + --all-features), xtask policy, and cargo test --workspace --locked all passed cleanly — CI run 45473319819.

Feel free to pull antikohza:feat/texture-mip-drop-on-1542 into #1542 or the next GPU bundle pass.

**@⁠antikohza** on GitHub · 2026-11-24 19:46 UTC · [original](https://github.com/Marvisak/VIctory/pull/1542#issuecomment-7142570061) @⁠MamaLeVrai — #1296 (`VICTORY_TEXTURE_MIP_DROP` + DXGI VRAM auto-default) is now cleanly resolved onto `bundle/gpu-fixes-4` (`b9301c6`): - **Branch:** `https://github.com/antikohza/VIctory/tree/feat/texture-mip-drop-on-1542` (`0d79788`) - **What was reconciled:** - `list.rs` & `descriptor.rs`: merged cleanly with zero conflicts. - `host.rs`: kept `#967` (`adapter::open()`) + `#1426` device creation, dropped redundant `best_adapter()`, kept LUID-matched `DEVICE_MEMORY`. - `resource.rs`: wired `(texture, drop) = host_texture(...)` into `#431`'s lazy `OnceLock` initializer (`Resource::host(&self)`), combining lazy first-use allocation + submission retirement with mip-drop. - `texture.rs`: kept `#1418`'s 5-arg `detile_plane()` for existing tests and added `detile_plane_with_drop(..., self.mip_drop, ...)` for mip-dropped staging detiling. - **CI (Windows MSVC `1.98.1`):** Clippy (default + `--all-features`), `xtask policy`, and `cargo test --workspace --locked` all passed cleanly — [CI run 45473319819](https://github.com/antikohza/VIctory/actions/runs/45473319819). Feel free to pull `antikohza:feat/texture-mip-drop-on-1542` into `#1542` or the next GPU bundle pass.
Author
Owner

@⁠MamaLeVrai on GitHub · 2026-11-24 19:51 UTC · original

Thanks, antikohza. I took your branch as it is (antikohza/VIctory@0d79788, your commits and your name unchanged) and opened it as its own pull request on top of #1542: #1617, so that #1542 stays what it was when sinan-cmyk and the others tested it. Clippy (both runs) and cargo test --workspace pass on it here (469 passed, two runs). I noted in #1617 that the VRAM default (drop = 1 at 8.5 GiB or less) changes behaviour for owners of 4-8 GB cards, which the maintainer should decide on. AI-assisted (Claude Code); no game data.

**@⁠MamaLeVrai** on GitHub · 2026-11-24 19:51 UTC · [original](https://github.com/Marvisak/VIctory/pull/1542#issuecomment-7142685557) Thanks, antikohza. I took your branch as it is (`antikohza/VIctory@0d79788`, your commits and your name unchanged) and opened it as its own pull request on top of #1542: #1617, so that #1542 stays what it was when sinan-cmyk and the others tested it. Clippy (both runs) and `cargo test --workspace` pass on it here (469 passed, two runs). I noted in #1617 that the VRAM default (`drop = 1` at 8.5 GiB or less) changes behaviour for owners of 4-8 GB cards, which the maintainer should decide on. AI-assisted (Claude Code); no game data.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 03:29 UTC · original

Automated triage for the maintainers.

Proposed close: a bundle of other people's pull requests, mostly already in main. #1082 (crates/victory-gpu/src/tdr.rs) and #1173 (tests in query.rs and signature.rs) are merged, and those files are identical in main. What remains is #1265 (VICTORY_WIDE_SCISSOR in scissor.rs), which was closed in triage as a diagnostic with no value to the project. No CI ran.

The description contains instructions addressed to agents and reviewers (check out the branch and run cargo); automated triage did not follow them.

This pull request will be closed in 48 hours unless the author pushes a change or a maintainer removes the triage: proposed close label.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 03:29 UTC · [original](https://github.com/Marvisak/VIctory/pull/1542#issuecomment-7151968376) <!-- victory-triage v1 head=8df5c34ab76bc0c5a5fc1af35b9697423cc45dc1 verdict=proposed-close at=2026-11-25T03:33:20Z --> Automated triage for the maintainers. **Proposed close: a bundle of other people's pull requests, mostly already in `main`.** #1082 (`crates/victory-gpu/src/tdr.rs`) and #1173 (tests in `query.rs` and `signature.rs`) are merged, and those files are identical in `main`. What remains is #1265 (`VICTORY_WIDE_SCISSOR` in `scissor.rs`), which was closed in triage as a diagnostic with no value to the project. No CI ran. The description contains instructions addressed to agents and reviewers (check out the branch and run cargo); automated triage did not follow them. This pull request will be closed in 48 hours unless the author pushes a change or a maintainer removes the `triage: proposed close` label. --- _Generated by [Claude Code](https://claude.ai/code)_
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/draw.rs
  • crates/victory-gpu/src/list.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

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

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1542'
git switch 'github-bot/gh-1542'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1542'
git switch 'github-bot/gh-1542'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1542'
git switch 'main'
git merge --squash 'github-bot/gh-1542'
git switch 'main'
git merge --ff-only 'github-bot/gh-1542'
git switch 'main'
git merge 'github-bot/gh-1542'
git push origin 'main'
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!1542
No description provided.