[BUNDLE] GPU pipeline library, shader cache, draw state and frame wait: 5 PRs, #1000 #626 #642 #174 #1279 (rebuilt on main 70564ae) #1439

Open
github-bot wants to merge 13 commits from github-bot/gh-1439 into main AGit
Owner

@⁠MamaLeVrai on GitHub · 2026-11-24 18:00 UTC · original
MamaLeVrai:bundle/gpu-fixes-3 → main · +1303 −64 · 5 files · 13 commits · open

One PR in place of 5. After main moved, this bundle keeps the 5 of its earlier 16 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. Sixteen GPU PRs on the pipeline library and cache saves, the shader cache, mesh pipeline loading, blending on integer targets, root signature flags, draw state, list recording and the frame wait. 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
#1000 TG0000 f821cb9d7 GPU: pipelines of different names load from the library at the same time
#626 LAKSHYA-cmd-tech df9ab3c69 GPU: fall back to standard root signature flags when host runtime rejects 0xC01/0xC00
#642 nathanbzrr bdef690c7 GPU: translate enhanced texture barriers in ID3D12GraphicsCommandList7::Barrier
#174 AndyLatimer 882664e13 GPU: a frame wait takes its tick before it sleeps
#1279 Mumogg 4dd4cfc8c GPU: an argument clamp Wine's compiler builds too

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 16 PRs; 5 merge here in order, each checked with clippy as it went in.

  • #72: conflicts with the new main (or with an earlier PR of this bundle) in crates/victory-gpu/src/pipeline/library.rs.
  • #347: conflicts with the new main (or with an earlier PR of this bundle) in crates/victory-gpu/src/pipeline/library.rs.
  • #358: conflicts with the new main (or with an earlier PR of this bundle) in crates/victory-gpu/src/shader_cache.rs.
  • #352: conflicts with the new main (or with an earlier PR of this bundle) in crates/victory-gpu/src/pipeline/host.rs.
  • #1152: conflicts with the new main (or with an earlier PR of this bundle) in crates/victory-gpu/src/pipeline/host.rs.
  • #1129: conflicts with the new main (or with an earlier PR of this bundle) in crates/victory-gpu/src/pipeline/make.rs.
  • #1203: conflicts with the new main (or with an earlier PR of this bundle) in crates/victory-gpu/src/pipeline/make.rs.
  • #24: conflicts with the new main (or with an earlier PR of this bundle) in crates/victory-gpu/src/list.rs.
  • #427: conflicts with the new main (or with an earlier PR of this bundle) in crates/victory-gpu/src/draw.rs.
  • #485: conflicts with the new main (or with an earlier PR of this bundle) in crates/victory-gpu/src/draw.rs.
  • #550: conflicts with the new main (or with an earlier PR of this bundle) in crates/victory-gpu/src/draw.rs.
  • #319: its test waits_end_on_ticks_and_count_frames fails once #174 is in (8 where it expects 9): #174 takes the frame wait's tick before the sleep, #319 counts on the old order. They disagree on that behaviour, so it is a choice for the maintainer. Both merge without a text conflict, which is why this only shows when the tests run.
  • Thirteen other PRs of this area (#652, #1168, #1228, #616, #1233, #321, #985, #640, #983, #415, #1200, #618, #1207) conflict with the ones above in the same file; they need a rebase after these land.

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 484 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-3
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:00 UTC · [original](https://github.com/Marvisak/VIctory/pull/1439) `MamaLeVrai:bundle/gpu-fixes-3` → `main` · +1303 −64 · 5 files · 13 commits · open **One PR in place of 5.** After `main` moved, this bundle keeps the 5 of its earlier 16 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. Sixteen GPU PRs on the pipeline library and cache saves, the shader cache, mesh pipeline loading, blending on integer targets, root signature flags, draw state, list recording and the frame wait. 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 | |---|---|---|---| | #1000 | TG0000 | `f821cb9d7` | GPU: pipelines of different names load from the library at the same time | | #626 | LAKSHYA-cmd-tech | `df9ab3c69` | GPU: fall back to standard root signature flags when host runtime rejects 0xC01/0xC00 | | #642 | nathanbzrr | `bdef690c7` | GPU: translate enhanced texture barriers in ID3D12GraphicsCommandList7::Barrier | | #174 | AndyLatimer | `882664e13` | GPU: a frame wait takes its tick before it sleeps | | #1279 | Mumogg | `4dd4cfc8c` | GPU: an argument clamp Wine's compiler builds too | ## 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 16 PRs; 5 merge here in order, each checked with clippy as it went in. - **#72**: conflicts with the new `main` (or with an earlier PR of this bundle) in crates/victory-gpu/src/pipeline/library.rs. - **#347**: conflicts with the new `main` (or with an earlier PR of this bundle) in crates/victory-gpu/src/pipeline/library.rs. - **#358**: conflicts with the new `main` (or with an earlier PR of this bundle) in crates/victory-gpu/src/shader_cache.rs. - **#352**: conflicts with the new `main` (or with an earlier PR of this bundle) in crates/victory-gpu/src/pipeline/host.rs. - **#1152**: conflicts with the new `main` (or with an earlier PR of this bundle) in crates/victory-gpu/src/pipeline/host.rs. - **#1129**: conflicts with the new `main` (or with an earlier PR of this bundle) in crates/victory-gpu/src/pipeline/make.rs. - **#1203**: conflicts with the new `main` (or with an earlier PR of this bundle) in crates/victory-gpu/src/pipeline/make.rs. - **#24**: conflicts with the new `main` (or with an earlier PR of this bundle) in crates/victory-gpu/src/list.rs. - **#427**: conflicts with the new `main` (or with an earlier PR of this bundle) in crates/victory-gpu/src/draw.rs. - **#485**: conflicts with the new `main` (or with an earlier PR of this bundle) in crates/victory-gpu/src/draw.rs. - **#550**: conflicts with the new `main` (or with an earlier PR of this bundle) in crates/victory-gpu/src/draw.rs. - **#319**: its test `waits_end_on_ticks_and_count_frames` fails once #174 is in (8 where it expects 9): #174 takes the frame wait's tick before the sleep, #319 counts on the old order. They disagree on that behaviour, so it is a choice for the maintainer. Both merge without a text conflict, which is why this only shows when the tests run. - Thirteen other PRs of this area (#652, #1168, #1228, #616, #1233, #321, #985, #640, #983, #415, #1200, #618, #1207) conflict with the ones above in the same file; they need a rebase after these land. ## 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` | 484 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-3 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)
frame::wait marked the tick it waited for as taken (LAST) only after
the sleep, outside the clock's lock, so two threads waiting for one
event kind at once both got the same tick and both returned on it,
against the module's once-per-tick rule (an origin wait then begins two
frames in one interval). next_tick now takes the tick under the clock's
lock when the wait comes within its time-out; a time-out takes none, as
before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The previous commit dropped the tick next_tick returns, but the
diagnostics build's tracing::debug! still names it (E0425). Bind it
again; it is unused without the feature, so that lint is allowed there.
Reported by Sunkiller-qc and r4tedx. cargo check -p victory-gpu passes
with and without --features diagnostics.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The pipeline workers held the library's lock while a pipeline loaded. A
load is not always a lookup: an AMD driver's library holds about 140 bytes
per pipeline, and what the driver's own cache lacks is compiled inside the
load, for up to seconds. All eight workers then waited for the one that
held the lock.

The library is documented as thread-safe but for loads of one pipeline on
several threads (ID3D12Device1::CreatePipelineLibrary, "Thread Safety"),
so only those exclude each other now: a name is held by one thread at a
time, and loads run without the library's lock. Stores and serialising
keep it.

Measured on an RX 6800 and a Ryzen 9 5900X (sampled stacks, diagnostics
build, the same start from a kept pipeline library):
- worker CPU while a backlog is made: 1.05 cores -> 7.8; samples blocked on
  the lock: 481 -> 0
- in the world, two runs each: pipelines still being made 1219-1315 -> 43-54,
  draws run per frame 3-20 -> 1860-2086, time per frame outside preparing,
  GPU and copy-back 196-303 ms -> 24-37 ms

The frame itself is not shorter on its own: the draws that used to be
dropped now run (750-799 -> 1090-1379 ms per frame).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The clamp of indirect arguments is HLSL compiled at run time by the
system's compiler. Under Wine that is vkd3d-shader's, which has no
methods on byte address buffers and ignores the RootSignature attribute:

    argument clamp: clamp:19:27: E5005: Method 'Load' is not defined on
    type 'RWByteAddressBuffer'.

Without the clamp every indirect execution is dropped ("not bounded"),
which is most of the world's draws and dispatches.

The buffers become structured buffers of uint, indexed in words (the
caller already refuses addresses and strides that are not multiples of
4), and the root signature is serialized beside the shader instead of
read from it. The bounds and the budget are unchanged.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
# Conflicts:
#	crates/victory-gpu/src/list.rs
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:31:47 +00:00
Author
Owner

@⁠sinan-cmyk on GitHub · 2026-11-24 18:45 UTC · original

Runtime boot check on real hardware with a retail dump

Result: no difference from main in this test.

I merged head f9eb979 onto main ffe310e (clean merge), built it (release), and ran victory run <title exe> --execute with an empty data folder for 100 s, without any input. I compared the run with main built and run the same way.

main ffe310e this PR
Reaches the first-boot screens yes yes
Caption at 100 s (one sample) 30 fps, 12 draws/frame 36 fps, 12 draws/frame
Frames presented 2,048 2,048
crashes.log entries 0 0
Committed memory 11.1 GB 11.1 GB

Warnings: 7, the same kinds and counts as on main. 0 errors.

Limits. Without input, the title stays on the first-boot screens. This run does not exercise saves, the intro video, the start screen, loading or the world. It shows only that the change does not break startup or the first menus on this machine. 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 18:45 UTC · [original](https://github.com/Marvisak/VIctory/pull/1439#issuecomment-7141109419) ### Runtime boot check on real hardware with a retail dump **Result: no difference from `main` in this test.** I merged head f9eb979 onto `main` ffe310e (clean merge), built it (release), and ran `victory run <title exe> --execute` with an empty data folder for 100 s, without any input. I compared the run with `main` built and run the same way. | | `main` ffe310e | this PR | |---|---|---| | Reaches the first-boot screens | yes | yes | | Caption at 100 s (one sample) | 30 fps, 12 draws/frame | 36 fps, 12 draws/frame | | Frames presented | 2,048 | 2,048 | | `crashes.log` entries | 0 | 0 | | Committed memory | 11.1 GB | 11.1 GB | **Warnings:** 7, the same kinds and counts as on `main`. 0 errors. **Limits.** Without input, the title stays on the first-boot screens. This run does not exercise saves, the intro video, the start screen, loading or the world. It shows only that the change does not break startup or the first menus on this machine. 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

@⁠Marvisak on GitHub · 2026-11-25 01:28 UTC · original · edited 2026-11-25 14:54 UTC

Automated triage for the maintainers.

Needs rebase. This pull request conflicts with main (conflicting: crates/victory-gpu/src/indirect.rs, crates/victory-gpu/src/list.rs). It will be reviewed once it is rebased onto the current main.

Note for the maintainers: the description has a section addressed to reviewing agents ("Re-verify in one go"), with commands to fetch and check out another branch and run cargo on it. The triage routine did not run them, and never runs code from a pull request.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 01:28 UTC · [original](https://github.com/Marvisak/VIctory/pull/1439#issuecomment-7149585165) · edited 2026-11-25 14:54 UTC <!-- victory-triage v1 head=05ec5a983be560c85fe70b2d1eb2628470cdfad1 verdict=needs-rebase at=2026-11-25T15:03:00Z --> Automated triage for the maintainers. **Needs rebase.** This pull request conflicts with `main` (conflicting: `crates/victory-gpu/src/indirect.rs`, `crates/victory-gpu/src/list.rs`). It will be reviewed once it is rebased onto the current `main`. Note for the maintainers: the description has a section addressed to reviewing agents ("Re-verify in one go"), with commands to fetch and check out another branch and run cargo on it. The triage routine did not run them, and never runs code from a pull request. --- _Generated by [Claude Code](https://claude.ai/code)_
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/frame.rs
  • crates/victory-gpu/src/indirect.rs
  • crates/victory-gpu/src/list.rs
  • crates/victory-gpu/src/pipeline/library.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/1439/head:github-bot/gh-1439'
git switch 'github-bot/gh-1439'

Merge

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