Proton/vkd3d-proton: bounded wait for once-only compute dispatches (heads without skin); the pipeline library with a null blob (same as #151) #166

Open
github-bot wants to merge 9 commits from github-bot/gh-166 into main AGit
Owner

@⁠Beqren on GitHub · 2026-11-26 08:54 UTC · original
Beqren:proton-fixes → main · +612 −19 · 6 files · 9 commits · open

Replaces #129, which I opened before auditing it properly; what is here is only what held up. Three changes, each usable on its own (the branch also holds a stopgap commit and its revert, see 3). The branch sits on f249fe0 and merges into main (014d52d) without conflict; the merged tree was built, its GPU unit tests run and the wait run on it once (I cannot push a merge or rebase itself: my token may not push a branch that carries the later change to ci.yml).

Updated 2026-11-27: the compute wait (section 2) is reshaped after UwUCammie measured 11 s stalls with its first form (in #386). It now holds a frame at most half a second. The same update removes this branch's one line in Pending::make, which had come to conflict with main.

Tested on one machine only: CachyOS (kernel 7.3), Radeon RX 9070 16 GB, Mesa RADV 26.3.1, Proton Experimental 11.0-20261112 (its vkd3d-proton 3.2.0, build 2576c0b4), view-tree wineserver, Series X profile, the play.ps1 settings. Each piece was also run with vkd3d-proton master 71cae09 built from source. Not tested on Windows, NVIDIA, Intel or other AMD cards.

1. An empty pipeline library is asked for with a null blob

#151 (gomeaw) is the same fix for this tree, was opened before this, and has a Windows test, which mine does not: please take #151 for this. I missed it when I opened this; I will drop this commit as soon as #151 is in (the other commits do not depend on it). What follows is only extra evidence that the fix works under Proton on RADV.

From Marvisak/VIctory#347 (AugustoZFJ), also fxceless/victory-fork#885 (Filip722); credit is theirs. CreatePipelineLibrary(&[]) passes a non-null pointer with length 0, which vkd3d-proton rejects (d3d12_pipeline_library_init: if (!blob_length && blob) return E_INVALIDARG), so under Proton there was never a library: "no host pipeline library: pipelines are not kept", every session cold.

  • A unit test fails on main under Proton and passes with the change.
  • First start: "no host pipeline library yet; starting an empty one"; the library and the early list are saved. Second start: "host pipeline library loaded bytes=348920", 1,950 pipelines started early, 1,974 loaded and 20 made, (0 being made) in every world frame.
  • Not gated: Microsoft's page only says an empty blob gives an empty library and does not mention a null pointer, so Windows behaviour is unverified by me (the two PRs above are where it comes from).

2. A compute dispatch waits for its own pipeline, within bounds

A draw dropped for a missing pipeline costs one frame's picture; a compute dispatch the title issues once costs its output for the session. With a cold driver shader cache the head blend-shape map (61e54e90adccaf6a) was dropped and every head had no skin (eyes, teeth, hair only).

  • Reproduced with the wait off and cold caches on vkd3d-proton 3.2.0 and on 71cae09; with warm caches the skin is there. So it is a cold-cache timing race, not a Wine fault, and probably the same thing as #75 on Windows and the checkpoint observation in #67.
  • Bounds: a frame's compute waits end 500 ms after the first began (wall clock, any number of threads); each pipeline gets one wait (once a dispatch has waited 100 ms for it in vain, its later dispatches wait as draws do, so a pipeline that is never made holds one frame once); compute pipelines are made newest first, the one a dispatch is waiting for next, and with four workers or more the last free worker takes only such a pipeline or a screen pass. Dispatches past a bound are dropped as today and logged once.
  • Why this shape: the first form allowed 10 s a frame, chosen only to stay under the title's ~30 s watchdog. On a cold start every frame that dispatched unmade pipelines was held again: 8 and 9 gaps of 1 to 10 s in the first 300 s here, and 30 gaps over 1 s (11.3 s longest) in UwUCammie's run on an RX 7900 XT in #386, which is what prompted this. Waiting longer does not make a compile faster: the head map compiles in 1 to 3 ms, and what delayed it was waiting for a free worker.
  • Measured here only (diagnostics builds, cold starts: empty driver, vkd3d-proton, pipeline and translation caches; the same checkpoint; the first 300 s after the first frame; vkd3d-proton 71cae09 unless said):
compute wait runs frames/s longest gap gaps over 1 s compute dispatches missed heads
off (=0) 1 (+1 that crashed at 57 s) 15.9 1.0 s 1 154,856 of 11.95 M no skin
first form, 10 s a frame 2 14.6, 14.5 10.2, 10.3 s 8, 9 about 2,000 of 10.8 M skin
this 1 16.6 1.1 s 1 36,580 of 12.67 M skin
this, merged with main 014d52d 1 15.3 1.1 s 2 35,199 of 11.49 M skin
this, vkd3d-proton 3.2.0 with VICTORY_PIPELINE_WAIT_MS=0 1 15.8 1.05 s 1 103,527 of 11.86 M skin
  • Single cold runs differ by up to about 30% in frames/s, so the gaps are the result, not the rate. On a warm start no compute dispatch waited at all.
  • What it gives up against the first form: nine pipelines that are dispatched in at most three frames, in the bursts of the first world frames, never ran with this (the same nine as with the wait off; none were lost with the 10 s form). What their output is for I do not know. And the kept worker narrows the race for the head map, it does not close it: the map was made 5 to 191 ms after its dispatch in these runs, inside the 500 ms, but two earlier variants (a budget shared across frames; 500 ms without the kept worker) each lost the skin once and were dropped.
  • On under Wine only by default; VICTORY_COMPUTE_WAIT=1 turns it on anywhere, =0 off. The cause is not Wine-specific, so the gate is a caution, not a finding: Windows is simply untested. It waits where #73 / #125 cap waits; it is limited to compute dispatches and bounded, but tell me if you would rather have it shaped differently.

3. (Taken out) the single-latch stopgap

The branch first carried a change that emitted every loop with one latch under Wine, because with vkd3d-proton 3.2.0 six of the title's compute pipelines are never made (17829ac71aab4e8d, 32ed072b9f845048, afeea48bbb9913ad, 559d9f0184e15fe3, a1b20bc47e3c9597, e8c962358d862e3f: 6 of 6 hang when built alone) and every frame then spends the whole pipeline-wait budget: 285 ms a frame against 55.

It is reverted in this branch (the last two commits). That is a dxil-spirv bug already fixed upstream (694cc67, 3bc8276): with vkd3d-proton 71cae09 all six are made without it, which is what the people testing here run. And on by default under Wine it changed the shader cache key for every Wine user, so a first start re-translated and re-made everything for no gain there. On vkd3d-proton 3.2.0, VICTORY_PIPELINE_WAIT_MS=0 gives the same frame time; the doc says so.

4. VICTORY_KEYS in every build

So a launcher can press A on the start screen of a release build. Does nothing unless the variable is set.

5. docs/proton.md

Requirements, building with cargo xwin, the wineserver patch, the d3dcompiler_47 build that is needed, and the above, each claim scoped to the versions it was seen on.

Checks

cargo test -p victory-shader --lib: 210 pass. GPU unit tests for the touched modules under Proton: 32 pass. cargo clippy -D warnings (cross-compiled, toolchain 1.98.1): the same 3 warnings as main, none in a touched file. Two independent reviews of the wait's first form; confirmed findings fixed. For the reshaped wait: GPU unit tests under Proton, 30 pass on the branch and 35 on the branch merged with main 014d52d (two tests added, the two of the old bounds rewritten); clippy as CI runs it has nothing in make.rs; one more independent review found the locking sound and one low finding, confirmed and not fixed: a dispatch dropped after the frame's compute budget is spent can skip the once-per-pipeline log line (the fix sits beside lines main rewrote; it can follow once this is on main). No game data in any commit.

Not claimed

Faces (the table-slot kinds are #114; a typed-load change that fixed torn faces here on vkd3d-proton 3.2.0 is untested on master and will come separately if it survives that), anything about GPU faults, anything on Windows.

Done with an AI coding assistant (Claude Code), directed and tested by me; the numbers are from this machine's logs.

**@⁠Beqren** on GitHub · 2026-11-26 08:54 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/166) `Beqren:proton-fixes` → `main` · +612 −19 · 6 files · 9 commits · open Replaces #129, which I opened before auditing it properly; what is here is only what held up. Three changes, each usable on its own (the branch also holds a stopgap commit and its revert, see 3). The branch sits on `f249fe0` and merges into `main` (`014d52d`) without conflict; the merged tree was built, its GPU unit tests run and the wait run on it once (I cannot push a merge or rebase itself: my token may not push a branch that carries the later change to `ci.yml`). **Updated 2026-11-27:** the compute wait (section 2) is reshaped after UwUCammie measured 11 s stalls with its first form (in #386). It now holds a frame at most half a second. The same update removes this branch's one line in `Pending::make`, which had come to conflict with `main`. **Tested on one machine only:** CachyOS (kernel 7.3), Radeon RX 9070 16 GB, Mesa RADV 26.3.1, Proton Experimental 11.0-20261112 (its vkd3d-proton 3.2.0, build `2576c0b4`), view-tree wineserver, Series X profile, the `play.ps1` settings. Each piece was also run with vkd3d-proton master `71cae09` built from source. **Not tested on Windows, NVIDIA, Intel or other AMD cards.** ## 1. An empty pipeline library is asked for with a null blob **#151 (gomeaw) is the same fix for this tree, was opened before this, and has a Windows test, which mine does not: please take #151 for this.** I missed it when I opened this; I will drop this commit as soon as #151 is in (the other commits do not depend on it). What follows is only extra evidence that the fix works under Proton on RADV. From Marvisak/VIctory#347 (AugustoZFJ), also fxceless/victory-fork#885 (Filip722); credit is theirs. `CreatePipelineLibrary(&[])` passes a non-null pointer with length 0, which vkd3d-proton rejects (`d3d12_pipeline_library_init`: `if (!blob_length && blob) return E_INVALIDARG`), so under Proton there was never a library: "no host pipeline library: pipelines are not kept", every session cold. - A unit test fails on `main` under Proton and passes with the change. - First start: "no host pipeline library yet; starting an empty one"; the library and the early list are saved. Second start: "host pipeline library loaded bytes=348920", 1,950 pipelines started early, 1,974 loaded and 20 made, `(0 being made)` in every world frame. - Not gated: Microsoft's page only says an empty blob gives an empty library and does not mention a null pointer, so Windows behaviour is unverified by me (the two PRs above are where it comes from). ## 2. A compute dispatch waits for its own pipeline, within bounds A draw dropped for a missing pipeline costs one frame's picture; a compute dispatch the title issues once costs its output for the session. With a cold driver shader cache the head blend-shape map (`61e54e90adccaf6a`) was dropped and every head had no skin (eyes, teeth, hair only). - Reproduced with the wait off and cold caches on vkd3d-proton 3.2.0 **and** on `71cae09`; with warm caches the skin is there. So it is a cold-cache timing race, not a Wine fault, and probably the same thing as #75 on Windows and the checkpoint observation in #67. - Bounds: a frame's compute waits end 500 ms after the first began (wall clock, any number of threads); each pipeline gets one wait (once a dispatch has waited 100 ms for it in vain, its later dispatches wait as draws do, so a pipeline that is never made holds one frame once); compute pipelines are made newest first, the one a dispatch is waiting for next, and with four workers or more the last free worker takes only such a pipeline or a screen pass. Dispatches past a bound are dropped as today and logged once. - Why this shape: the first form allowed 10 s a frame, chosen only to stay under the title's ~30 s watchdog. On a cold start every frame that dispatched unmade pipelines was held again: 8 and 9 gaps of 1 to 10 s in the first 300 s here, and 30 gaps over 1 s (11.3 s longest) in UwUCammie's run on an RX 7900 XT in #386, which is what prompted this. Waiting longer does not make a compile faster: the head map compiles in 1 to 3 ms, and what delayed it was waiting for a free worker. - Measured here only (diagnostics builds, cold starts: empty driver, vkd3d-proton, pipeline and translation caches; the same checkpoint; the first 300 s after the first frame; vkd3d-proton `71cae09` unless said): | compute wait | runs | frames/s | longest gap | gaps over 1 s | compute dispatches missed | heads | |---|---|---|---|---|---|---| | off (`=0`) | 1 (+1 that crashed at 57 s) | 15.9 | 1.0 s | 1 | 154,856 of 11.95 M | no skin | | first form, 10 s a frame | 2 | 14.6, 14.5 | 10.2, 10.3 s | 8, 9 | about 2,000 of 10.8 M | skin | | this | 1 | 16.6 | 1.1 s | 1 | 36,580 of 12.67 M | skin | | this, merged with `main` `014d52d` | 1 | 15.3 | 1.1 s | 2 | 35,199 of 11.49 M | skin | | this, vkd3d-proton 3.2.0 with `VICTORY_PIPELINE_WAIT_MS=0` | 1 | 15.8 | 1.05 s | 1 | 103,527 of 11.86 M | skin | - Single cold runs differ by up to about 30% in frames/s, so the gaps are the result, not the rate. On a warm start no compute dispatch waited at all. - What it gives up against the first form: nine pipelines that are dispatched in at most three frames, in the bursts of the first world frames, never ran with this (the same nine as with the wait off; none were lost with the 10 s form). What their output is for I do not know. And the kept worker narrows the race for the head map, it does not close it: the map was made 5 to 191 ms after its dispatch in these runs, inside the 500 ms, but two earlier variants (a budget shared across frames; 500 ms without the kept worker) each lost the skin once and were dropped. - **On under Wine only** by default; `VICTORY_COMPUTE_WAIT=1` turns it on anywhere, `=0` off. The cause is not Wine-specific, so the gate is a caution, not a finding: Windows is simply untested. It waits where #73 / #125 cap waits; it is limited to compute dispatches and bounded, but tell me if you would rather have it shaped differently. ## 3. (Taken out) the single-latch stopgap The branch first carried a change that emitted every loop with one latch under Wine, because with vkd3d-proton 3.2.0 six of the title's compute pipelines are never made (`17829ac71aab4e8d`, `32ed072b9f845048`, `afeea48bbb9913ad`, `559d9f0184e15fe3`, `a1b20bc47e3c9597`, `e8c962358d862e3f`: 6 of 6 hang when built alone) and every frame then spends the whole pipeline-wait budget: 285 ms a frame against 55. It is reverted in this branch (the last two commits). That is a dxil-spirv bug already fixed upstream (`694cc67`, `3bc8276`): with vkd3d-proton `71cae09` all six are made without it, which is what the people testing here run. And on by default under Wine it changed the shader cache key for every Wine user, so a first start re-translated and re-made everything for no gain there. On vkd3d-proton 3.2.0, `VICTORY_PIPELINE_WAIT_MS=0` gives the same frame time; the doc says so. ## 4. `VICTORY_KEYS` in every build So a launcher can press A on the start screen of a release build. Does nothing unless the variable is set. ## 5. `docs/proton.md` Requirements, building with `cargo xwin`, the wineserver patch, the `d3dcompiler_47` build that is needed, and the above, each claim scoped to the versions it was seen on. ## Checks `cargo test -p victory-shader --lib`: 210 pass. GPU unit tests for the touched modules under Proton: 32 pass. `cargo clippy -D warnings` (cross-compiled, toolchain 1.98.1): the same 3 warnings as `main`, none in a touched file. Two independent reviews of the wait's first form; confirmed findings fixed. For the reshaped wait: GPU unit tests under Proton, 30 pass on the branch and 35 on the branch merged with `main` `014d52d` (two tests added, the two of the old bounds rewritten); clippy as CI runs it has nothing in `make.rs`; one more independent review found the locking sound and one low finding, confirmed and not fixed: a dispatch dropped after the frame's compute budget is spent can skip the once-per-pipeline log line (the fix sits beside lines `main` rewrote; it can follow once this is on `main`). No game data in any commit. ## Not claimed Faces (the table-slot kinds are #114; a typed-load change that fixed torn faces here on vkd3d-proton 3.2.0 is untested on master and will come separately if it survives that), anything about GPU faults, anything on Windows. Done with an AI coding assistant (Claude Code), directed and tested by me; the numbers are from this machine's logs.
`open` asked for an empty library with `CreatePipelineLibrary(&[])`. An
empty Rust slice has a non-null address, and vkd3d-proton returns
E_INVALIDARG for a non-null blob of length 0 (libs/vkd3d/cache.c,
d3d12_pipeline_library_init: `if (!blob_length && blob) return
E_INVALIDARG;`), so under Proton there was never a library: "no host
pipeline library: pipelines are not kept", no early list saved, every
session started cold. The empty library is now asked for with a null
pointer, through the vtable (the `windows` wrapper takes a slice, which
cannot be null). Loading a saved blob is unchanged. If the host refuses
even the empty library, the error is logged instead of dropped.

From Marvisak/VIctory#347 (AugustoZFJ), the original; also
fxceless/victory-fork#885 (Filip722).

Microsoft's page for ID3D12Device1::CreatePipelineLibrary says: "If the
input library blob is empty, then the initial content of the library is
empty." It does not say what the pointer may be. Not run on Windows: there
the only difference is a null pointer instead of a dangling one for
length 0.

Verified here (RX 9070, RADV 26.3.1, Proton Experimental 11.0-20261112
with vkd3d-proton 3.2.0): the unit test a_rejected_blob_gives_an_empty_library
fails under Proton before this change and passes after it. The title
started twice with fresh caches: the first start logged "no host pipeline
library yet; starting an empty one" and saved the library and the early
list ("pipelines are not kept" no longer appears); the second logged "host
pipeline library loaded bytes=347384", "title pipelines to start early
pipelines=1939", loaded 1964 pipelines from it and made 11-15, and every
world frame line showed "(0 being made)". Also seen with vkd3d-proton
71cae09 (master, built from source): the empty library is started.
A first use waits for its pipeline within 500 ms a frame shared by all
threads; past that a draw or dispatch is dropped. A dropped draw loses one
frame's picture; a dropped dispatch the title issues once loses its output
for the session. With a cold driver shader cache (a fresh
MESA_SHADER_CACHE_DIR) the head blend-shape map's pipeline
(61e54e90adccaf6a) was made 1 to 21 s after its one dispatch, behind
hundreds of graphics pipelines, and every head had no skin: a cap,
glowing eye crescents and teeth (on vkd3d-proton 3.2.0 and on master
71cae09 alike, and again on this base with VICTORY_COMPUTE_WAIT=0; with a
warm cache the heads had skin). That is a timing race, not something Wine
does: issue #75 reports heads without skin on Windows.

Now, a compute dispatch whose pipeline is not made yet waits for it
outside the frame's 500 ms budget, and its pipeline is queued before the
requested graphics pipelines (after the passes over the screen, and not
for their own workers), so the wait is for its own compile and not for
the queue.

The waits are bounded, in the direction of #73 / #125 (which bound every
wait per pipeline):
- per frame: a frame's compute waits end at most 10 s after its first one
  began, however many threads wait. Without this bound, a cold first
  world frame waited for 670 compute pipelines one after another, 33 s,
  and the title's own watchdog (about 30 s: a deliberate write to address
  0 from a thread that checks how long ago others last reported) ended
  the run; twice, the same address. The 10 s, the screen passes' 10 s and
  the ordinary 500 ms together stay under it. Dispatches past the bound
  are dropped as before, and logged once per pipeline;
- per pipeline: a dispatch waits only while its pipeline is queued or has
  been in a worker's hands for under 10 s. One that is never made holds
  one frame once, then waits within the ordinary budget, as before.
Only compute dispatches; graphics draws and passes over the screen are
unchanged.

On by default under Wine only (`VICTORY_COMPUTE_WAIT`: unset, on under
Wine; `0` never; `1` on any host). The cause is not Wine-specific; the
gate is there because this has not been run on Windows. `on_wine` is
added to the GPU crate (`wine.rs`; the same probe as victory-hle's
xmem::on_wine).

Verified here (RX 9070, RADV 26.3.1, Proton Experimental 11.0-20261112),
title starts with a cold driver cache (fresh Mesa, vkd3d-proton and
pipeline caches; translations made beforehand), heads judged in captures
at frames 1024 and 2048:
- this code: vkd3d-proton 71cae09 once, 3.2.0 once with the single latch
  off and VICTORY_PIPELINE_WAIT_MS=0 (the six never made: one 10 s frame,
  then 54-60 ms frames, five logged as given up): skin, no crash; the
  head map made 3 and 9 ms after its dispatch;
- earlier forms of the same bounds (10 s of waits per pipeline instead of
  10 s in a worker's hands; one run with the frame's waits summed instead
  of a deadline): 71cae09 once, 3.2.0 three times: skin, no
  crash, the head map made 5 to 15 ms after its dispatch, the first world
  frame's compute waits ended 10 s after they began;
- VICTORY_COMPUTE_WAIT=0 on 3.2.0: no skin (the head map made 1.8 s after
  its dispatch).
Unit tests: the queue order, the bounds, and a pipeline that is never
made stops waiting long. Untested on Windows and on other cards.
With the vkd3d-proton in Proton Experimental 11.0-20261112 (3.2.0, build
2576c0b4, dxil-spirv 114e664) six of the title's compute programs are
translated and never get a host pipeline: 17829ac71aab4e8d,
32ed072b9f845048, 559d9f0184e15fe3, a1b20bc47e3c9597, afeea48bbb9913ad,
e8c962358d862e3f. Every world frame then shows "(6 being made)" and
spends its whole 500 ms pipeline wait budget on them (about 285 ms a
frame instead of 55).

Cause, inferred from dxil-spirv's source (no debugger stack): a pre-pass
that runs before the structurizer mishandles a loop with two back edges
(a `continue`) and recurses. DXC writes every loop with one latch.
dxil-spirv fixed it upstream on 2026-11-24/25: 694cc67 ("Only run fixup
passes after structurizer has run") and 3bc8276, in vkd3d-proton 71cae09.
With that vkd3d-proton built from source, all six are made without this
change.

So this is a stopgap: `Module::one_latch` gives every loop one latch (the
blocks that branched back branch to a new block that joins what each
brought and branches back alone; the program does the same). Remove it
once Proton ships a vkd3d-proton with those commits. Without it,
`VICTORY_PIPELINE_WAIT_MS=0` gives the same frame time (54-60 ms here,
after one 10 s frame at the world's start in which compute dispatches
wait for the six once); if you would rather not carry this, that is the
alternative.

Active only under Wine (`VICTORY_ONE_LATCH`: unset, on under Wine only;
`0` never; `1` on any host). The shader cache key gains bytes only when
it is on, so a host without it (Windows by default) keeps its key and its
translations. The shader crate has its own copy of the Wine probe, since
it cannot depend on the GPU crate.

Verified here (RX 9070, RADV 26.3.1, Proton Experimental 11.0-20261112),
tools/pipes.sh (translate one program, make its host pipeline) on the six,
on this tree:
- vkd3d-proton 2576c0b4 (Proton's 3.2.0), VICTORY_ONE_LATCH=0: 6 of 6 hung;
- vkd3d-proton 2576c0b4, on: 6 of 6 made;
- vkd3d-proton 71cae09 (built from source), on: 6 of 6 made (and 6 of 6
  without it, in an earlier run on the previous base).
Unit test `loops_get_one_latch`. Untested on Windows and on other cards.
The scripted key presses were compiled only into diagnostics builds, so an
automated run of a release build sat at the start screen. They now work in
every build.

Inert: nothing happens unless VICTORY_KEYS is set.

Verified here: a release build under Proton (off-screen) got past the start
screen by itself with VICTORY_KEYS set. Untested on Windows and on other cards.
Written from the owner's Proton tree's docs/proton.md, corrected after an
audit and scoped to what this branch contains: every result names the
vkd3d-proton it was seen with (3.2.0 in Proton Experimental
11.0-20261112, or master 71cae09 built from source); the six compute
pipelines are a dxil-spirv bug fixed upstream (694cc67, 3bc8276) and the
single latch is a stopgap until Proton ships it; the cause given for it is
inferred from source; the pipeline library's null blob; the compute wait's
cause is not Wine-specific and its bounds; `VICTORY_KEYS`. Fixes that are
not in this branch (faces, GPU faults, read-back) are left out. Text only.
Measured on one machine (CachyOS, RX 9070, RADV 26.3.1).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 08:59:21 +00:00
github-bot changed title from Proton/vkd3d-proton: keep the pipeline library (null blob), bounded wait for once-only compute dispatches (heads without skin), a single-latch stopgap to Proton/vkd3d-proton: bounded wait for once-only compute dispatches (heads without skin); the pipeline library with a null blob (same as #151) 2026-11-26 11:22:23 +00:00
It was only for the dxil-spirv of vkd3d-proton 3.2.0, which is fixed upstream
(694cc67, 3bc8276; in vkd3d-proton 71cae09, where all six pipelines are made
without it). Left on by default under Wine it changed the shader cache key for
every Wine user, so a first start re-translated and re-made everything, also
where it is not needed. On vkd3d-proton 3.2.0 use VICTORY_PIPELINE_WAIT_MS=0
(docs/proton.md), or a newer vkd3d-proton.
Author
Owner

@⁠ArturoWolff on GitHub · 2026-11-26 09:16 UTC · original

Independent source-bound check of the revised compute deadline, plus the shared native-cache fix. The change from #129 to #166 matters: the earlier per-call allowance did not establish a bound on aggregate compute waits. I exercised the new policy without risking another GPU-heavy retail launch on our 8 GB RTX 4060 / 16 GB host.

1. Revised scheduler (#166's second commit)

Receiver: avatarmanz/VIctory-7900XTX main at 722c0e1ce1e80bd045ba63ecb88c440041233fea. Selected Beqren's f63017aaf390a391d04a1ce61e10aa584a2f35f5, direct parent 912d6f29dceb72daa1e25fe1585881931ba7730d, from PR head df317809ed5333f28bef86b994f43caa53ffa715. The receiver's scheduler differs from that parent only by three timeline lines. After reproducing the missing admissions on the receiver, I composed the exact selected change while keeping those timeline boundaries; GPL-3.0-or-later declarations and license file agree. No other PR commits were applied.

This is the actual Rust pipeline/make.rs, compiled separately for the two arms as a small native Linux CPU fixture (Rust 1.98.1). The frame clock, host construction/publication inputs, library/timing sink and Wine selection are test stand-ins. The production queue, worker claim, condition-variable wait and deadline logic are not stand-ins. The only portability edits in the copied module are the Windows priority call's target guard, a test-only notification just before condition waits, and the fixture module. Fresh processes for each test, separate build targets; no game files or GPU devices exposed. The graphics budget is deliberately 80 ms for these tests; the compute budget remains the actual 10 s.

Controlled case Receiver Selected #166 change
Once-only caller after ordinary graphics budget spent 0/1 admitted 1/1
Two concurrent once-only callers 0/2 2/2
Two callers with terminal host refusal 0/2 0/2
Claim order screen, graphics, promoted compute, early screen, promoted compute, graphics, early
Ordinary graphics budget after being spent / next frame 0 extra waits / 1 0 / 1
Focused invocations 8 pass, 3 intended assertion failures 19 pass, 0 failures

Each pending synthetic job is held until all distinct recording callers have entered a condition wait or returned, then published exactly once. This includes legitimate refusal and opt-out controls. Setting VICTORY_COMPUTE_WAIT=0 restores both the old admission result and old queue order.

Actual production time limits: I started one pending compute caller and, ~5 s later in the same frame, a second pending compute caller whose own worker had just begun. Both returned pending at the same frame deadline. A third new compute job on that expired frame did not receive another wait; the next frame admitted that job after its worker published. Both earlier jobs remained usable after late publication.

RESULT shared_deadline first_ms=9999 staggered_ms=4999 last_return_ms=10000 expired_ms=0 next_frame_admitted=1 late_ready=2 builds=3
RESULT worker_age age_ms=10000 remaining_ms=3000 fallback_ms=80 additional_waits=0 late_ready=1 builds=1

In the second case the worker already had the job for 7 s before the first dispatch waited. The remaining long wait was 3 s, not a new 10 s, and the next frame used the ordinary 80 ms budget. These are measured synthetic-host controls, not a hard scheduling/watchdog guarantee or measured title frame times. Both guarded runs retired without OOM. The two builds have the same unused-Windows-priority-variable warning from the adapter. The production Windows/Wine build of this receiving adaptation has not yet been exercised.

2. Shared native library correction — separate actual driver test

This is also new evidence for the null-blob hunk here and in #151, on a different receiver: fxceless/victory-fork@46bf5351707b1697c04e5d871c30973ebaa3e973 with the earlier scheduler/phase diagnostics from our #144 follow-up. The sole production difference in that A/B was Filip722's #885 exact empty-library hunk at 664a251e3394ad67692369eaa71916e5766fb20e, from AugustoZFJ's Marvisak/VIctory#347 (197c7acf). It preserved nonempty-blob handling and rejected-file rename. Actual cross-built Windows test execution under GE-Proton 11-14, vkd3d-proton cae8353ed7959c4+, llvmpipe Mesa 26.3.1. The ordinary FL12_0 device initialization failed, and an FL11_0 test device lacked SM6.6. Therefore both narrowed A/B builds use a test-only FL11_0 minimum, authored validated SM6.0 compute code and fixture root signature; neither is a production shader-translator/readiness-gate qualification.

Case Made / loaded Native library saved / mapped bytes Fenced readback Exit
Before, cold 1 / 0 0 / 0 [41, 48, 158, 59] 101
After, cold 1 / 0 248 / 0 [41, 48, 158, 59] 0
After, fresh warm process 0 / 1 0 / 248 [41, 48, 158, 59] 0
After, warm, no dispatch 0 / 1 0 / 248 [41, 4951, 9320, 59] 0
After, warm, trace off 0 / 1 0 / 248 [41, 48, 158, 59] 0

Every process uses the same initial private prefix and identical shader/key; the warm arms carry only the resulting native library. Its hash remains unchanged. All five readbacks match the independent whole-buffer oracle, including two untouched sentinels. The before case executes correctly but fails the actual cache-save assertion. The phase trace shows the real cold driver load miss/create/store/serialization and the warm hit without recreate; all spans pair, and trace-off emits none. Thus native library persistence is independently justified, not a proxy for correct command execution. This complements our earlier RTX 4060 hardware and native-library-only retail comparison.

The selected compute policy's admissions and bounds now have separate actual-source CPU evidence, and the cache fix has an actual software-driver execution witness. Neither establishes correct faces, complete lighting or gameplay on NVIDIA. The next qualification should retain the merged timeline boundaries and exercise the combined real Windows-target scheduler, then a small checked driver dispatch on the intended hardware before another heavy retail trial. No title data, screenshots, executable assets or cache files attached.

AI assistance: Hermes Agent, working on behalf of ArturoWolff. (GPT 6.2 Sol High).

**@⁠ArturoWolff** on GitHub · 2026-11-26 09:16 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/166#issuecomment-7187714538) **Independent source-bound check of the revised compute deadline, plus the shared native-cache fix.** The change from #129 to #166 matters: the earlier per-call allowance did not establish a bound on aggregate compute waits. I exercised the new policy without risking another GPU-heavy retail launch on our 8 GB RTX 4060 / 16 GB host. ### 1. Revised scheduler (#166's second commit) Receiver: `avatarmanz/VIctory-7900XTX` main at `722c0e1ce1e80bd045ba63ecb88c440041233fea`. Selected Beqren's `f63017aaf390a391d04a1ce61e10aa584a2f35f5`, direct parent `912d6f29dceb72daa1e25fe1585881931ba7730d`, from PR head `df317809ed5333f28bef86b994f43caa53ffa715`. The receiver's scheduler differs from that parent only by three timeline lines. After reproducing the missing admissions on the receiver, I composed the exact selected change while keeping those timeline boundaries; GPL-3.0-or-later declarations and license file agree. No other PR commits were applied. This is the **actual Rust `pipeline/make.rs`**, compiled separately for the two arms as a small native Linux CPU fixture (Rust 1.98.1). The frame clock, host construction/publication inputs, library/timing sink and Wine selection are test stand-ins. The production queue, worker claim, condition-variable wait and deadline logic are not stand-ins. The only portability edits in the copied module are the Windows priority call's target guard, a test-only notification just before condition waits, and the fixture module. Fresh processes for each test, separate build targets; no game files or GPU devices exposed. The graphics budget is deliberately 80 ms for these tests; the compute budget remains the actual 10 s. | Controlled case | Receiver | Selected #166 change | | --- | ---: | ---: | | Once-only caller after ordinary graphics budget spent | 0/1 admitted | 1/1 | | Two concurrent once-only callers | 0/2 | 2/2 | | Two callers with terminal host refusal | 0/2 | 0/2 | | Claim order | screen, graphics, promoted compute, early | screen, promoted compute, graphics, early | | Ordinary graphics budget after being spent / next frame | 0 extra waits / 1 | 0 / 1 | | Focused invocations | 8 pass, 3 intended assertion failures | 19 pass, 0 failures | Each pending synthetic job is held until all distinct recording callers have entered a condition wait or returned, then published exactly once. This includes legitimate refusal and opt-out controls. Setting `VICTORY_COMPUTE_WAIT=0` restores both the old admission result and old queue order. **Actual production time limits:** I started one pending compute caller and, ~5 s later in the same frame, a second pending compute caller whose own worker had just begun. Both returned pending at the same frame deadline. A third new compute job on that expired frame did not receive another wait; the next frame admitted that job after its worker published. Both earlier jobs remained usable after late publication. ```text RESULT shared_deadline first_ms=9999 staggered_ms=4999 last_return_ms=10000 expired_ms=0 next_frame_admitted=1 late_ready=2 builds=3 RESULT worker_age age_ms=10000 remaining_ms=3000 fallback_ms=80 additional_waits=0 late_ready=1 builds=1 ``` In the second case the worker already had the job for 7 s before the first dispatch waited. The remaining long wait was 3 s, not a new 10 s, and the next frame used the ordinary 80 ms budget. These are measured synthetic-host controls, not a hard scheduling/watchdog guarantee or measured title frame times. Both guarded runs retired without OOM. The two builds have the same unused-Windows-priority-variable warning from the adapter. The production Windows/Wine build of this receiving adaptation has not yet been exercised. ### 2. Shared native library correction — separate actual driver test This is also new evidence for the null-blob hunk here and in #151, on a different receiver: `fxceless/victory-fork@46bf5351707b1697c04e5d871c30973ebaa3e973` with the earlier scheduler/phase diagnostics from [our #144 follow-up](https://git.gtahub.st/github/avatarmanz--VIctory-7900XTX/pulls/144). The sole production difference in that A/B was [Filip722's #885](https://github.com/fxceless/victory-fork/pull/885) exact empty-library hunk at `664a251e3394ad67692369eaa71916e5766fb20e`, from AugustoZFJ's Marvisak/VIctory#347 (`197c7acf`). It preserved nonempty-blob handling and rejected-file rename. Actual cross-built Windows test execution under GE-Proton 11-14, vkd3d-proton `cae8353ed7959c4+`, llvmpipe Mesa 26.3.1. The ordinary FL12_0 device initialization failed, and an FL11_0 test device lacked SM6.6. Therefore both narrowed A/B builds use a test-only FL11_0 minimum, authored validated SM6.0 compute code and fixture root signature; neither is a production shader-translator/readiness-gate qualification. | Case | Made / loaded | Native library saved / mapped bytes | Fenced readback | Exit | | --- | ---: | ---: | --- | ---: | | Before, cold | 1 / 0 | 0 / 0 | [41, 48, 158, 59] | 101 | | After, cold | 1 / 0 | 248 / 0 | [41, 48, 158, 59] | 0 | | After, fresh warm process | 0 / 1 | 0 / 248 | [41, 48, 158, 59] | 0 | | After, warm, no dispatch | 0 / 1 | 0 / 248 | [41, 4951, 9320, 59] | 0 | | After, warm, trace off | 0 / 1 | 0 / 248 | [41, 48, 158, 59] | 0 | Every process uses the same initial private prefix and identical shader/key; the warm arms carry only the resulting native library. Its hash remains unchanged. All five readbacks match the independent whole-buffer oracle, including two untouched sentinels. The before case executes correctly but fails the actual cache-save assertion. The phase trace shows the real cold driver load miss/create/store/serialization and the warm hit without recreate; all spans pair, and trace-off emits none. Thus native library persistence is independently justified, not a proxy for correct command execution. This complements our earlier [RTX 4060 hardware and native-library-only retail comparison](https://github.com/fxceless/victory-fork/pull/885#issuecomment-7182444748). The selected compute policy's admissions and bounds now have separate actual-source CPU evidence, and the cache fix has an actual software-driver execution witness. Neither establishes correct faces, complete lighting or gameplay on NVIDIA. The next qualification should retain the merged timeline boundaries and exercise the combined real Windows-target scheduler, then a small checked driver dispatch on the intended hardware before another heavy retail trial. No title data, screenshots, executable assets or cache files attached. AI assistance: Hermes Agent, working on behalf of ArturoWolff. (GPT 6.2 Sol High).
Author
Owner

@⁠Beqren on GitHub · 2026-11-26 09:31 UTC · original · edited 2026-11-26 14:14 UTC

Thank you, both for the check and for the correction on #111 that made me go back over the first version. The staggered case (a second caller 5 s into the frame returning at the same deadline) and the worker-age case are exactly the two things the unbounded version got wrong, so it is good to see them exercised on the real make.rs by someone else.

Two notes:

  • #151 already has the null-blob fix for this tree, opened before this pull request and with a Windows WARP test. I missed it. I have put that at the top of section 1 above: #151 should be the one that goes in, and I will drop my first commit when it does. The Proton runs here (second start loads 1,974 pipelines and makes 20) are just one more data point for it, on RADV.
  • On what your fixture cannot show and mine did only on one machine: with real cold caches on an RX 9070 the first world frame hit the 10 s bound once and then ran at 54-62 ms, heads had skin, and the title's own watchdog (about 30 s) did not fire, on vkd3d-proton 3.2.0 and on 71cae09. I have no Windows or NVIDIA run of it, which is why it is off outside Wine unless VICTORY_COMPUTE_WAIT=1.

If the maintainer would rather have the wait shaped along #125's lines (a cumulative cap per pipeline across frames), I am glad to rework it on top of that.

Done with an AI coding assistant (Claude Code), directed and tested by me.

**@⁠Beqren** on GitHub · 2026-11-26 09:31 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/166#issuecomment-7188103529) · edited 2026-11-26 14:14 UTC Thank you, both for the check and for the correction on #111 that made me go back over the first version. The staggered case (a second caller 5 s into the frame returning at the same deadline) and the worker-age case are exactly the two things the unbounded version got wrong, so it is good to see them exercised on the real `make.rs` by someone else. Two notes: - **#151 already has the null-blob fix for this tree**, opened before this pull request and with a Windows WARP test. I missed it. I have put that at the top of section 1 above: #151 should be the one that goes in, and I will drop my first commit when it does. The Proton runs here (second start loads 1,974 pipelines and makes 20) are just one more data point for it, on RADV. - On what your fixture cannot show and mine did only on one machine: with real cold caches on an RX 9070 the first world frame hit the 10 s bound once and then ran at 54-62 ms, heads had skin, and the title's own watchdog (about 30 s) did not fire, on vkd3d-proton 3.2.0 and on `71cae09`. I have no Windows or NVIDIA run of it, which is why it is off outside Wine unless `VICTORY_COMPUTE_WAIT=1`. If the maintainer would rather have the wait shaped along #125's lines (a cumulative cap per pipeline across frames), I am glad to rework it on top of that. Done with an AI coding assistant (Claude Code), directed and tested by me.
Author
Owner

@⁠ArturoWolff on GitHub · 2026-11-26 09:55 UTC · original

Thanks for the reply and for correcting the provenance of #151. Agreed: the native-library evidence applies to gomeaw's earlier #151 (and the #885 / AugustoZFJ #347 source family). I kept it out of this next experiment, along with the one-latch workaround, so the scheduler result does not depend on either change.

Follow-up: the selected bounded wait also passes in an actual Windows-target build under Wine, now on main 9576c45f1d551be0cfde154da027707658ce031e (the newer light-settling revision). Its pipeline/make.rs is byte-identical to the receiver in our previous CPU comparison. I reproduced the three behavioral failures on this receiver, then applied the exact previously tested adaptation of f63017aaf390a391d04a1ce61e10aa584a2f35f5, keeping main's timeline boundaries. Only that production scheduler change and its Wine policy module are different between the arms.

Both actual victory-gpu crates were built with Rust 1.98.1 / LLVM MinGW, x86_64-pc-windows-gnullvm, diagnostics profile and feature, separate target directories, and tested in clean copied prefixes under Wine 11.22 (Staging). The full non-test diagnostic victory.exe also builds on the candidate. All three Cargo build commands succeeded without compiler warnings. No actual native Windows host, GPU nodes, title files, or network were available to the test processes.

The extra test fixture holds real worker jobs at their host-construction boundary, then deliberately returns None. The actual queue, Pending::make publication, pipeline::host_pipeline lookup, frame state, platform selection, condition waits and diagnostic wait counter execute. A test-only wait observation ensures distinct callers arrive before releasing the worker; none of these tests treats a refused host pipeline as a usable D3D12 object. The 80 ms ordinary wait is a test setting; the compute allowance remains the production 10 s.

Case Receiver Selected change
Once-only caller after ordinary budget spent, observes terminal publication 0/1 1/1
Two concurrent callers, observe terminal publication 0/2 2/2
Actual usable host pipeline in those cases 0 0 (intentional refusal)
Queue order screen, graphics, promoted compute, early screen, promoted compute, graphics, early
Extra ordinary wait on spent frame / next frame wait 0 / 80 ms 0 / 80 ms
Focused test invocations 7 pass, 3 expected failures 20 pass, 0 failures

Actual native runtime output:

NATIVE_RESULT deadline first_ms=10000 second_ms=5000 last_ms=10000 expired_ms=0 next_frame_terminal=1 host_ready=0 retired=1
NATIVE_RESULT age worker_ms=10000 remaining_ms=3000 fallback_ms=80 extra_wait_us=0 terminal_refusal=1 retired=1

With VICTORY_COMPUTE_WAIT unset, the real Wine policy is on (the native ntdll export is independently verified). =1 admits both waiting callers; =0 restores zero wait and the old priority order. New workers after the first frame's deadline do not receive another long wait; the next frame can wait, and the refusal is visible only after the worker publishes. No duplicate claims or retained pending jobs in these controls.

One infrastructure detail worth retaining: two direct wine fixture.exe attempts printed a passing Rust threaded-test summary but the host process returned -9 (SIGKILL). Neither was an OOM or a behavioral failure of the new scheduler; both were rejected by our runner. A fresh-prefix repeat of the exact same baseline EXE through Wine cmd.exe reported the Windows child's real exit code and propagated it: native pass = 0 and each of the three intended assertion failures = 101, matching the outer process. Both arms then completed using that same exit-witness route. The source and test binary were not rebuilt to make this anomaly disappear. Its precise direct-launch cause remains unestablished.

So the actual Windows compilation, native Wine policy and bounded wait behavior are now qualified. This still does not establish that an actual GPU executes a once-only dispatch successfully or restores the skin on our RTX 4060. Your RX 9070 cold-cache result is separate positive retail evidence. I'll retain this exact candidate for a small actual-driver checked execution test before evaluating a heavier game run. Thank you for keeping the changes separately reviewable.

AI assistance: Hermes Agent, working on behalf of ArturoWolff. (GPT 6.2 Sol High).

**@⁠ArturoWolff** on GitHub · 2026-11-26 09:55 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/166#issuecomment-7188652337) Thanks for the reply and for correcting the provenance of #151. Agreed: the native-library evidence applies to gomeaw's earlier #151 (and the #885 / AugustoZFJ #347 source family). I kept it out of this next experiment, along with the one-latch workaround, so the scheduler result does not depend on either change. **Follow-up: the selected bounded wait also passes in an actual Windows-target build under Wine**, now on main `9576c45f1d551be0cfde154da027707658ce031e` (the newer light-settling revision). Its `pipeline/make.rs` is byte-identical to the receiver in [our previous CPU comparison](https://git.gtahub.st/github/avatarmanz--VIctory-7900XTX/pulls/166). I reproduced the three behavioral failures on this receiver, then applied the exact previously tested adaptation of `f63017aaf390a391d04a1ce61e10aa584a2f35f5`, keeping main's timeline boundaries. Only that production scheduler change and its Wine policy module are different between the arms. Both actual `victory-gpu` crates were built with Rust 1.98.1 / LLVM MinGW, `x86_64-pc-windows-gnullvm`, diagnostics profile and feature, separate target directories, and tested in clean copied prefixes under Wine 11.22 (Staging). The full non-test diagnostic `victory.exe` also builds on the candidate. All three Cargo build commands succeeded without compiler warnings. No actual native Windows host, GPU nodes, title files, or network were available to the test processes. The extra test fixture holds **real worker jobs at their host-construction boundary**, then deliberately returns `None`. The actual queue, `Pending::make` publication, `pipeline::host_pipeline` lookup, frame state, platform selection, condition waits and diagnostic wait counter execute. A test-only wait observation ensures distinct callers arrive before releasing the worker; none of these tests treats a refused host pipeline as a usable D3D12 object. The 80 ms ordinary wait is a test setting; the compute allowance remains the production 10 s. | Case | Receiver | Selected change | |---|---:|---:| | Once-only caller after ordinary budget spent, observes terminal publication | 0/1 | 1/1 | | Two concurrent callers, observe terminal publication | 0/2 | 2/2 | | Actual usable host pipeline in those cases | 0 | 0 (intentional refusal) | | Queue order | screen, graphics, promoted compute, early | screen, promoted compute, graphics, early | | Extra ordinary wait on spent frame / next frame wait | 0 / 80 ms | 0 / 80 ms | | Focused test invocations | 7 pass, 3 expected failures | 20 pass, 0 failures | Actual native runtime output: ```text NATIVE_RESULT deadline first_ms=10000 second_ms=5000 last_ms=10000 expired_ms=0 next_frame_terminal=1 host_ready=0 retired=1 NATIVE_RESULT age worker_ms=10000 remaining_ms=3000 fallback_ms=80 extra_wait_us=0 terminal_refusal=1 retired=1 ``` With `VICTORY_COMPUTE_WAIT` unset, the real Wine policy is on (the native ntdll export is independently verified). `=1` admits both waiting callers; `=0` restores zero wait and the old priority order. New workers after the first frame's deadline do not receive another long wait; the next frame can wait, and the refusal is visible only after the worker publishes. No duplicate claims or retained pending jobs in these controls. One infrastructure detail worth retaining: two direct `wine fixture.exe` attempts printed a passing Rust threaded-test summary but the host process returned **-9 (SIGKILL)**. Neither was an OOM or a behavioral failure of the new scheduler; both were rejected by our runner. A fresh-prefix repeat of the exact same baseline EXE through Wine `cmd.exe` reported the Windows child's real exit code and propagated it: native pass = 0 and each of the three intended assertion failures = 101, matching the outer process. Both arms then completed using that same exit-witness route. The source and test binary were not rebuilt to make this anomaly disappear. Its precise direct-launch cause remains unestablished. So the actual Windows compilation, native Wine policy and bounded wait behavior are now qualified. This still does **not** establish that an actual GPU executes a once-only dispatch successfully or restores the skin on our RTX 4060. Your RX 9070 cold-cache result is separate positive retail evidence. I'll retain this exact candidate for a small actual-driver checked execution test before evaluating a heavier game run. Thank you for keeping the changes separately reviewable. AI assistance: Hermes Agent, working on behalf of ArturoWolff. (GPT 6.2 Sol High).
Author
Owner

@⁠YaBulochka on GitHub · 2026-11-26 09:59 UTC · original

On Wine/RADV this branch looked like a regression in the opening cutscene, and I stopped it after two world frames rather than burn the session. Reporting early because the numbers are far apart, and because the opening is deterministic (same cutscene, same frame count), so it is not scene variance.

Environment: CachyOS 7.3.5, Ryzen 5 9600X, 30 GB, RX 7600 XT 8 GB, RADV Mesa 27.0.0, Wine 11.22, vkd3d-proton from master, retail 1.0.2.1, Series S, VICTORY_TEXTURE_BUDGET_MB=4608, VICTORY_CARD_BUFFERS_MB=1024, the launcher profile (RELAY=2, TEXTURE_NO_WAIT=1, JOIN_COPIES=1, CARD_STEPS=2, AMBIENT=0.8, PORT_DESCRIPTORS=1), plus a dxcompiler.dll fallback for D3DCompile (Wine's compiler refuses the clamp and the two-plane composer; without it there is no 3D and no 2D).

parent 902b5bd with this branch
world frames seen 23 2
average fps 3.91 0.40
median frame 286 ms 5,629 ms
best frame 138 ms 1,594 ms
90th percentile 469 ms 5,629 ms
textures per frame 24-34 MB 187-326 MB
draws ~3,417 3,131

The texture traffic jumps by ~10x on the same scene, which is where I would look first if this reproduces for you: one of the five commits changes when once-only compiles are waited for, and if a texture refresh ends up behind that wait every frame, the frame becomes the streaming again.

Two questions:

  1. Is the bounded wait meant to apply to refresh work, or only to pipeline creation? If it covers refreshes, this is probably expected and we should not use it on a card this small.
  2. If it should not, can you say which of the five commits to bisect? I can re-run each on the same cutscene here and send the same table per commit.

No game files or dumps; numbers only.

**@⁠YaBulochka** on GitHub · 2026-11-26 09:59 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/166#issuecomment-7188756653) On Wine/RADV this branch looked like a regression in the opening cutscene, and I stopped it after two world frames rather than burn the session. Reporting early because the numbers are far apart, and because the opening is deterministic (same cutscene, same frame count), so it is not scene variance. **Environment:** CachyOS 7.3.5, Ryzen 5 9600X, 30 GB, RX 7600 XT 8 GB, RADV Mesa 27.0.0, Wine 11.22, vkd3d-proton from master, retail 1.0.2.1, Series S, `VICTORY_TEXTURE_BUDGET_MB=4608`, `VICTORY_CARD_BUFFERS_MB=1024`, the launcher profile (`RELAY=2`, `TEXTURE_NO_WAIT=1`, `JOIN_COPIES=1`, `CARD_STEPS=2`, `AMBIENT=0.8`, `PORT_DESCRIPTORS=1`), plus a `dxcompiler.dll` fallback for `D3DCompile` (Wine's compiler refuses the clamp and the two-plane composer; without it there is no 3D and no 2D). | | parent `902b5bd` | with this branch | |---|---:|---:| | world frames seen | 23 | 2 | | average fps | 3.91 | 0.40 | | median frame | 286 ms | 5,629 ms | | best frame | 138 ms | 1,594 ms | | 90th percentile | 469 ms | 5,629 ms | | textures per frame | 24-34 MB | 187-326 MB | | draws | ~3,417 | 3,131 | The texture traffic jumps by ~10x on the same scene, which is where I would look first if this reproduces for you: one of the five commits changes when once-only compiles are waited for, and if a texture refresh ends up behind that wait every frame, the frame becomes the streaming again. Two questions: 1. Is the bounded wait meant to apply to refresh work, or only to pipeline creation? If it covers refreshes, this is probably expected and we should not use it on a card this small. 2. If it should not, can you say which of the five commits to bisect? I can re-run each on the same cutscene here and send the same table per commit. No game files or dumps; numbers only.
Author
Owner

@⁠bordersky on GitHub · 2026-11-26 10:23 UTC · original

Tested on Linux: RX 7900 XT 20 GB, Ryzen 9 5900X, Mesa RADV, GE-Proton10-34's Wine with the view-tree wineserver, vkd3d-proton master, Series X profile. Your bounded wait (f63017a) on top of main 9576c45, with #151 and other local changes; not the one-latch commit, as vkd3d-proton master makes the six pipelines.

The bound matters here. Before, I carried #129's unbounded wait (c0fdca0 + da4cee6). After every change to the translator (cold translation cache), resuming a checkpoint crashed during loading, about 40 s in, at the same place in the title's code: +0x23cf683, write to 0x0. That happened 3 of 3 times from a cold cache, and never with a warm one. The workaround was one warm-up run with VICTORY_COMPUTE_WAIT=0, faces missing, before every test. That fits your watchdog explanation.

With this PR's bounded wait, from the same checkpoint and cold caches, loading went through on the first try. One dispatch hit the bound and was dropped:

a compute dispatch was dropped: its pipeline is not made and this frame's compute waits took 10 s shaders=00e6aef268b1ef81

The heads had their skin. Since then, five more starts from that checkpoint, warm, have loaded with the skin there.

On the typed-load change you mention under "Not claimed": I ported your 1711cd1c2 onto this tree. A first port without your runtime check of the slot's word (VIEW_INTEGER | 2*count) also read raw through views whose element was wider, or of a float format, and one texture in the first room came out wrong. With the check back, and #114 giving table views their word, the faces no longer tear while characters talk. The observation is the player's, in the prologue. I have not isolated #114 from the raw loads.

**@⁠bordersky** on GitHub · 2026-11-26 10:23 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/166#issuecomment-7189305191) Tested on Linux: RX 7900 XT 20 GB, Ryzen 9 5900X, Mesa RADV, GE-Proton10-34's Wine with the view-tree wineserver, vkd3d-proton master, Series X profile. Your bounded wait (`f63017a`) on top of main `9576c45`, with #151 and other local changes; not the one-latch commit, as vkd3d-proton master makes the six pipelines. **The bound matters here.** Before, I carried #129's unbounded wait (`c0fdca0` + `da4cee6`). After every change to the translator (cold translation cache), resuming a checkpoint crashed during loading, about 40 s in, at the same place in the title's code: `+0x23cf683`, write to 0x0. That happened 3 of 3 times from a cold cache, and never with a warm one. The workaround was one warm-up run with `VICTORY_COMPUTE_WAIT=0`, faces missing, before every test. That fits your watchdog explanation. With this PR's bounded wait, from the same checkpoint and cold caches, loading went through on the first try. One dispatch hit the bound and was dropped: ``` a compute dispatch was dropped: its pipeline is not made and this frame's compute waits took 10 s shaders=00e6aef268b1ef81 ``` The heads had their skin. Since then, five more starts from that checkpoint, warm, have loaded with the skin there. On the typed-load change you mention under "Not claimed": I ported your `1711cd1c2` onto this tree. A first port without your runtime check of the slot's word (`VIEW_INTEGER | 2*count`) also read raw through views whose element was wider, or of a float format, and one texture in the first room came out wrong. With the check back, and #114 giving table views their word, the faces no longer tear while characters talk. The observation is the player's, in the prologue. I have not isolated #114 from the raw loads.
Author
Owner

@⁠UwUCammie on GitHub · 2026-11-26 10:30 UTC · original

I tried the bounded compute-wait commit (f63017aa) on a second machine: RX 7900 XT, RADV 26.3.1, Wine 11.22 with the tree-index wineserver, vkd3d-proton 3.1, Series X. I applied it to linux-amd-best at 830dc191, keeping that branch’s compiler recovery.

Two controls on the original renderer, one with the heap worker and one without, showed eyes and teeth with the diner characters’ skin missing. Adding the compute wait brought back the server’s face and Lucia’s face and neck in the water-order exchange. A second patched launch with the worker on and the 256 KiB / 4 GiB card-buffer settings showed them again. All started from fresh copies of the same saved data and the same initial runtime and vkd3d caches.

The small head-map pipeline identified above actually finished within 6 ms of first bind in both broken controls on my machine. The corrected picture corroborates the change, but I can’t attribute it to that particular pipeline here. The bounds were exercised in the patched run, and all nine pipeline worker tests passed. Port to the Linux branch

**@⁠UwUCammie** on GitHub · 2026-11-26 10:30 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/166#issuecomment-7189465951) I tried the bounded compute-wait commit (`f63017aa`) on a second machine: RX 7900 XT, RADV 26.3.1, Wine 11.22 with the tree-index wineserver, vkd3d-proton 3.1, Series X. I applied it to `linux-amd-best` at `830dc191`, keeping that branch’s compiler recovery. Two controls on the original renderer, one with the heap worker and one without, showed eyes and teeth with the diner characters’ skin missing. Adding the compute wait brought back the server’s face and Lucia’s face and neck in the water-order exchange. A second patched launch with the worker on and the 256 KiB / 4 GiB card-buffer settings showed them again. All started from fresh copies of the same saved data and the same initial runtime and vkd3d caches. The small head-map pipeline identified above actually finished within 6 ms of first bind in both broken controls on my machine. The corrected picture corroborates the change, but I can’t attribute it to that particular pipeline here. The bounds were exercised in the patched run, and all nine pipeline worker tests passed. [Port to the Linux branch](https://github.com/jtrudeau1530/VIctory-7900XTX/pull/2)
Author
Owner

@⁠Beqren on GitHub · 2026-11-26 10:33 UTC · original · edited 2026-11-26 14:14 UTC

Thank you all for testing this; that is far more than I could do on one machine.

@⁠YaBulochka: to your two questions.

  1. The bounded wait applies only to a compute dispatch whose own pipeline is not made yet. It does not touch refreshes or texture work. But while a recording thread waits, the frame is held, so anything counted per frame grows with the frame: 187-326 MB over a 5.6 s frame is 33-58 MB a second, against 24-34 MB over 286 ms, which is 84-119 MB a second. So the texture traffic did not go up; the frames got long.
  2. I think the long frames were the single-latch commit, not the wait, and I have taken that commit out (below). Under Wine it was on by default and it changes the shader cache key, so the first start with this branch re-translated every shader and re-made every pipeline from nothing, on top of a cold driver cache for the new SPIR-V. On a cold start the first world frame can also legitimately take up to 10 s here (that is the bound being hit once; on my card: one 10 s frame, then 54-62 ms). Two world frames is inside that window. If you have the patience for one more try: the branch as it is now (latch out), or the old one with VICTORY_ONE_LATCH=0, let it run past the first ten seconds of the world, and a second start should be normal. If it is still slow with VICTORY_COMPUTE_WAIT=0, then it is not this pull request at all and the base differs (my branch sits on f249fe0; I do not have your 902b5bd).

Change to the branch: the single-latch stopgap is reverted (two new commits; nothing rewritten). You are all on vkd3d-proton master, where the six pipelines are made without it; it only ever helped vkd3d-proton 3.2.0, and it made every Wine user pay a full re-translation. VICTORY_PIPELINE_WAIT_MS=0 does the same job there and the doc says so. It also clears the conflict with main: the branch merges cleanly with 0dec5dc again and the merged result builds.

@⁠bordersky: thank you for the 3-of-3 cold-cache crash at +0x23cf683 with the unbounded version and the clean first try with the bound; that is the confirmation I could not get from one machine. And for the typed-load port: your finding that it needs the run-time check of the slot's word, or it reads raw through wider or float views, is exactly why I left it out until it is tested properly. If you isolate #114 from it, I would like to know whether the raw loads are still needed on vkd3d-proton master.

@⁠UwUCammie: noted that the head-map pipeline was ready within 6 ms in your broken controls. So on your machine the pass that is dropped is not that one, or not only that one, and my description names the wrong culprit for your case. The log line a compute dispatch was dropped (and, in a diagnostics build, the drops by pipeline) would say which. I will not claim the blend-map pipeline as the general cause.

@⁠ArturoWolff: thank you for the Windows-target run under Wine; that covers a build I had not exercised.

Done with an AI coding assistant (Claude Code), directed and tested by me.

**@⁠Beqren** on GitHub · 2026-11-26 10:33 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/166#issuecomment-7189514926) · edited 2026-11-26 14:14 UTC Thank you all for testing this; that is far more than I could do on one machine. @⁠YaBulochka: to your two questions. 1. The bounded wait applies **only** to a compute dispatch whose own pipeline is not made yet. It does not touch refreshes or texture work. But while a recording thread waits, the frame is held, so anything counted per frame grows with the frame: 187-326 MB over a 5.6 s frame is 33-58 MB a second, against 24-34 MB over 286 ms, which is 84-119 MB a second. So the texture traffic did not go up; the frames got long. 2. I think the long frames were the **single-latch commit**, not the wait, and I have taken that commit out (below). Under Wine it was on by default and it changes the shader cache key, so the first start with this branch re-translated every shader and re-made every pipeline from nothing, on top of a cold driver cache for the new SPIR-V. On a cold start the first world frame can also legitimately take up to 10 s here (that is the bound being hit once; on my card: one 10 s frame, then 54-62 ms). Two world frames is inside that window. If you have the patience for one more try: the branch as it is now (latch out), or the old one with `VICTORY_ONE_LATCH=0`, let it run past the first ten seconds of the world, and a second start should be normal. If it is still slow with `VICTORY_COMPUTE_WAIT=0`, then it is not this pull request at all and the base differs (my branch sits on `f249fe0`; I do not have your `902b5bd`). **Change to the branch:** the single-latch stopgap is reverted (two new commits; nothing rewritten). You are all on vkd3d-proton master, where the six pipelines are made without it; it only ever helped vkd3d-proton 3.2.0, and it made every Wine user pay a full re-translation. `VICTORY_PIPELINE_WAIT_MS=0` does the same job there and the doc says so. It also clears the conflict with `main`: the branch merges cleanly with `0dec5dc` again and the merged result builds. @⁠bordersky: thank you for the 3-of-3 cold-cache crash at `+0x23cf683` with the unbounded version and the clean first try with the bound; that is the confirmation I could not get from one machine. And for the typed-load port: your finding that it needs the run-time check of the slot's word, or it reads raw through wider or float views, is exactly why I left it out until it is tested properly. If you isolate #114 from it, I would like to know whether the raw loads are still needed on vkd3d-proton master. @⁠UwUCammie: noted that the head-map pipeline was ready within 6 ms in your broken controls. So on your machine the pass that is dropped is not that one, or not only that one, and my description names the wrong culprit for your case. The log line `a compute dispatch was dropped` (and, in a diagnostics build, the drops by pipeline) would say which. I will not claim the blend-map pipeline as the general cause. @⁠ArturoWolff: thank you for the Windows-target run under Wine; that covers a build I had not exercised. Done with an AI coding assistant (Claude Code), directed and tested by me.
Author
Owner

@⁠ArturoWolff on GitHub · 2026-11-26 10:52 UTC · original

Physical NVIDIA/Proton follow-up: a once-only compute dispatch now produces the data its consumer reads. The latest reports make it especially important to separate missed dispatches from translation failures and to avoid identifying one retail shader as the universal culprit.

Receiver: avatarmanz/VIctory-7900XTX@9576c45f1d551be0cfde154da027707658ce031e. Same selected Beqren scheduler commit f63017aaf390a391d04a1ce61e10aa584a2f35f5 and adaptation as the earlier native Wine tests. I checked the change up to the updated PR head c61b25cc3fbc7ca594d1658f16481410b6eef163: the scheduler and Wine-policy files have not changed since the previous PR head. The one-latch change is not in either tested arm.

Environment: RTX 4060 desktop, 8 GB (8,188 MiB reported), 16 GB system RAM; Linux, NVIDIA 620.73.04, GE-Proton 11-14's Wine 11.0 Staging, vkd3d-proton build 71cae091b06571e. Actual Windows target x86_64-pc-windows-gnullvm, Rust 1.98.1/LLVM MinGW, diagnostics profile and feature. Independent Cargo targets; all three builds succeeded without compiler warnings. Fresh game-free Wine prefixes with matching graphics DLLs and empty private lower-layer cache directories; no title files, game execution, or network in the test processes.

Fixture: the actual Pending::make worker is held at construction until a real caller enters the condition wait or returns without recording. A separate controlled graphics job spends the ordinary frame budget first (VICTORY_PIPELINE_WAIT_MS=80, shared budget on, two workers). Unlike the earlier deliberate-refusal test, both compute jobs now make actual host PSOs with authored HLSL compiled to validated SM6.6 DXIL and the production root signature. The two State::dispatch calls each get a single attempt; the consumer is already ready. A test-only one-slot raw UAV holds [41,4951,9320,59]. The producer writes word 1 = word 0 + 7; the consumer writes word 2 = word 1 XOR 165, after an explicit UAV barrier. The host list is submitted directly to the real device queue. We require fence completion, no device removal, and independent whole-buffer readback including the two untouched sentinels. No console translation, retail submission scheduling or title memory/descriptor mirroring is claimed by this authored test.

Fresh process Producer / consumer recorded Actual pipeline wait Readback Test exit
Receiver, no change 0 / 1 0 us [41,4951,5106,59] 101 (intended failure)
Selected #166, default Wine policy 1 / 1 4,131 us [41,48,149,59] 0
Same candidate, VICTORY_COMPUTE_WAIT=0 0 / 1 0 us [41,4951,5106,59] 0 (negative control)

The receiver's producer is reported as still being made and drops exactly once. In all three cases its worker subsequently publishes a usable host PSO and retires; there is no retry of the producer. The successful consumer therefore sees different actual GPU data depending on admission of the original dispatch. The same candidate binary with the opt-out restores the receiver's behavior; the unrelated late-ready event alone would have been an insufficient success criterion. Each wait measurement is a single controlled admission, not a compilation benchmark or a retail frame-time result.

Independent #151 cache control, same scheduler and fixture. Both original arms on this receiving main got no host pipeline library: pipelines are not kept, made two PSOs, and saved zero bytes, despite successfully creating/using the PSOs. After applying just the earlier #151 production correction (e97ab400899fc60dcbfbc11015bf15e38841b25a, AugustoZFJ, adapted here by gomeaw; also Marvisak#347 / fxceless#885), all source files other than pipeline/library.rs were byte-identical to the scheduler candidate.

Cache trial Made / native loaded Saved / mapped bytes Fenced result
Candidate + #151, cold 2 / 0 440 / 0 [41,48,149,59]
Same binary, fresh prefix, copy native library only 0 / 2 0 / 440 [41,48,149,59]

Both passed, with identical 440-byte library hashes before/after warm execution. The scheduler fix does not depend on the library fix, and the native library hit does not stand in for execution. This is additional NVIDIA evidence for taking #151 separately, as you recommended.

Five actual GPU readbacks total, four passing invocations and one specific intentional receiver failure. Both the immediate Windows child exit and outer Wine exit match each intended result. All three guarded arms retired without new matching kernel GPU faults or OOM kills; minimum available host memory was about 7,169 MiB over the trials, with peak sampled whole-card usage 1,343 MiB. Builds and hardware tests ran serially. These small fixtures do not establish safety of the much heavier retail workload.

Conclusion: this demonstrates the physical producer-consumer correctness mechanism on NVIDIA/Proton, as distinct from the previously qualified bounded wait and the RX 9070/7900 retail reports. It does not identify which missed title dispatch supplied the missing skin, prove console shader correctness, resolve the 8 GB retail memory issue, or establish a lighting/FPS improvement. Given the latest head's removal of the latch workaround, there is no reason to reintroduce that extra cache invalidation into this comparison. The next useful comparison is a guarded low-memory retail path with readiness/drop evidence and matched initial caches, rather than assuming a faster first two frames or the head-map hash alone proves repaired faces.

AI assistance: Hermes Agent, working on behalf of ArturoWolff. (GPT 6.2 Sol High).

**@⁠ArturoWolff** on GitHub · 2026-11-26 10:52 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/166#issuecomment-7189956437) **Physical NVIDIA/Proton follow-up: a once-only compute dispatch now produces the data its consumer reads.** The latest reports make it especially important to separate missed dispatches from translation failures and to avoid identifying one retail shader as the universal culprit. Receiver: `avatarmanz/VIctory-7900XTX@9576c45f1d551be0cfde154da027707658ce031e`. Same selected Beqren scheduler commit `f63017aaf390a391d04a1ce61e10aa584a2f35f5` and adaptation as the earlier [native Wine tests](https://git.gtahub.st/github/avatarmanz--VIctory-7900XTX/pulls/166). I checked the change up to the updated PR head `c61b25cc3fbc7ca594d1658f16481410b6eef163`: the scheduler and Wine-policy files have not changed since the previous PR head. The one-latch change is not in either tested arm. **Environment:** RTX 4060 desktop, 8 GB (8,188 MiB reported), 16 GB system RAM; Linux, NVIDIA 620.73.04, GE-Proton 11-14's Wine 11.0 Staging, vkd3d-proton build `71cae091b06571e`. Actual Windows target `x86_64-pc-windows-gnullvm`, Rust 1.98.1/LLVM MinGW, diagnostics profile and feature. Independent Cargo targets; all three builds succeeded without compiler warnings. Fresh game-free Wine prefixes with matching graphics DLLs and empty private lower-layer cache directories; no title files, game execution, or network in the test processes. **Fixture:** the actual `Pending::make` worker is held at construction until a real caller enters the condition wait or returns without recording. A separate controlled graphics job spends the ordinary frame budget first (`VICTORY_PIPELINE_WAIT_MS=80`, shared budget on, two workers). Unlike the earlier deliberate-refusal test, both compute jobs now make actual host PSOs with authored HLSL compiled to validated SM6.6 DXIL and the production root signature. The two `State::dispatch` calls each get a single attempt; the consumer is already ready. A test-only one-slot raw UAV holds `[41,4951,9320,59]`. The producer writes word 1 = word 0 + 7; the consumer writes word 2 = word 1 XOR 165, after an explicit UAV barrier. The host list is submitted directly to the real device queue. We require fence completion, no device removal, and independent whole-buffer readback including the two untouched sentinels. No console translation, retail submission scheduling or title memory/descriptor mirroring is claimed by this authored test. | Fresh process | Producer / consumer recorded | Actual pipeline wait | Readback | Test exit | |---|---:|---:|---|---:| | Receiver, no change | 0 / 1 | 0 us | `[41,4951,5106,59]` | 101 (intended failure) | | Selected #166, default Wine policy | 1 / 1 | 4,131 us | `[41,48,149,59]` | 0 | | Same candidate, `VICTORY_COMPUTE_WAIT=0` | 0 / 1 | 0 us | `[41,4951,5106,59]` | 0 (negative control) | The receiver's producer is reported as still being made and drops exactly once. In all three cases its worker subsequently publishes a usable host PSO and retires; there is **no retry of the producer**. The successful consumer therefore sees different actual GPU data depending on admission of the original dispatch. The same candidate binary with the opt-out restores the receiver's behavior; the unrelated late-ready event alone would have been an insufficient success criterion. Each wait measurement is a single controlled admission, not a compilation benchmark or a retail frame-time result. **Independent #151 cache control, same scheduler and fixture.** Both original arms on this receiving main got `no host pipeline library: pipelines are not kept`, made two PSOs, and saved zero bytes, despite successfully creating/using the PSOs. After applying just the earlier [#151](https://git.gtahub.st/github/avatarmanz--VIctory-7900XTX/pulls/151) production correction (`e97ab400899fc60dcbfbc11015bf15e38841b25a`, AugustoZFJ, adapted here by gomeaw; also Marvisak#347 / fxceless#885), all source files other than `pipeline/library.rs` were byte-identical to the scheduler candidate. | Cache trial | Made / native loaded | Saved / mapped bytes | Fenced result | |---|---:|---:|---| | Candidate + #151, cold | 2 / 0 | 440 / 0 | `[41,48,149,59]` | | Same binary, fresh prefix, copy native library only | 0 / 2 | 0 / 440 | `[41,48,149,59]` | Both passed, with identical 440-byte library hashes before/after warm execution. The scheduler fix does not depend on the library fix, and the native library hit does not stand in for execution. This is additional NVIDIA evidence for taking #151 separately, as you recommended. Five actual GPU readbacks total, four passing invocations and one specific intentional receiver failure. Both the immediate Windows child exit and outer Wine exit match each intended result. All three guarded arms retired without new matching kernel GPU faults or OOM kills; minimum available host memory was about 7,169 MiB over the trials, with peak sampled whole-card usage 1,343 MiB. Builds and hardware tests ran serially. These small fixtures do not establish safety of the much heavier retail workload. **Conclusion:** this demonstrates the physical producer-consumer correctness mechanism on NVIDIA/Proton, as distinct from the previously qualified bounded wait and the RX 9070/7900 retail reports. It does not identify which missed title dispatch supplied the missing skin, prove console shader correctness, resolve the 8 GB retail memory issue, or establish a lighting/FPS improvement. Given the latest head's removal of the latch workaround, there is no reason to reintroduce that extra cache invalidation into this comparison. The next useful comparison is a guarded low-memory retail path with readiness/drop evidence and matched initial caches, rather than assuming a faster first two frames or the head-map hash alone proves repaired faces. AI assistance: Hermes Agent, working on behalf of ArturoWolff. (GPT 6.2 Sol High).
Author
Owner

@⁠Beqren on GitHub · 2026-11-26 22:41 UTC · original

This now conflicts with main, in one place: Pending::make in crates/victory-gpu/src/pipeline/make.rs. Main rewrote that function's body; this branch had only added one line above the old body.

The resolution is to keep main's body and keep that one line above it:

fn make(&self) {
    self.making_since.get_or_init(Instant::now);
    // main's body, unchanged

With that, main (014d52d) merged into this branch builds here (cargo xwin build --release --locked -p victory). I have not run the merged build in the title yet, so I am not claiming more than that it compiles.

I am away over the weekend and will push the update, with a run of the merged build, when I am back. If it is easier to resolve at merge time, that one line is all this branch needs in that function.

Done with an AI coding assistant (Claude Code), directed and tested by me.

**@⁠Beqren** on GitHub · 2026-11-26 22:41 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/166#issuecomment-7204896016) This now conflicts with main, in one place: `Pending::make` in `crates/victory-gpu/src/pipeline/make.rs`. Main rewrote that function's body; this branch had only added one line above the old body. The resolution is to keep main's body and keep that one line above it: ```rust fn make(&self) { self.making_since.get_or_init(Instant::now); // main's body, unchanged ``` With that, main (014d52d) merged into this branch builds here (`cargo xwin build --release --locked -p victory`). I have not run the merged build in the title yet, so I am not claiming more than that it compiles. I am away over the weekend and will push the update, with a run of the merged build, when I am back. If it is easier to resolve at merge time, that one line is all this branch needs in that function. Done with an AI coding assistant (Claude Code), directed and tested by me.
The compute wait gave every frame 10 s from its first compute wait, and
every pipeline 10 s from when a worker began it. On a cold start each frame
that dispatched pipelines not made yet was held again: in the first 300 s
here, 8 and 9 gaps between frames of 1 to 10 s (runs b1-cur and b2-cur:
frames 701, 703 and 705 took 9 to 10 s each), and 30 gaps over 1 s with an
11.3 s longest in a tester's run on an RX 7900 XT (issue #386, against 3 and
2.2 s with the wait off). Waiting does not make compiles faster: what a
dispatch the title issues once needs is its own pipeline made next.

Now:
- a frame's compute waits end 500 ms after its first one began, however
  many threads wait;
- a pipeline has one wait: once a dispatch has waited 100 ms for it in
  vain, its later dispatches wait as draws do. A pipeline that is never
  made (a compile that never returns; one left unmade because the
  driver's compiler crashed on it) holds one frame once, with no clock
  started in `Pending::make`;
- compute pipelines are made newest first, and one a dispatch waits for
  goes before them: first in, first out, a short wait would be spent on
  the hundreds dropped before it, and a pipeline dispatched once would sit
  behind those dispatched every frame;
- the last free worker (of four or more, not counting the screen passes')
  takes only a pipeline a dispatch waits for, or a pass over the screen.
  The head map (61e54e90adccaf6a) compiles in 1 to 3 ms, but without this
  its dispatch waited 280, 289, 444 and 1,132 ms for a worker to come free
  (runs n5-new, n3-new, n4-new, m1-merged), and the last, past the 500 ms,
  left the heads without skin. A worker stuck in a compile counts as busy,
  so the next one is kept.

Tried and left: one allowance shared over frames (1 s, refilled at a
fifth of the time). The bursts of new pipelines had spent it when the
head map came, and that was made 14 s after its dispatch (run n2-new).

What is unchanged: on under Wine only (`VICTORY_COMPUTE_WAIT`: `0` never,
`1` on any host); with it off nothing here runs, the queue included; draws
and passes over the screen wait as before.

Verified here (RX 9070, RADV 26.3.1, Proton Experimental 11.0-20261112
with the view-tree wineserver, diagnostics builds), cold starts with empty
driver, vkd3d-proton, pipeline and translation caches, the first 300 s:
on vkd3d-proton 71cae09, once on this tree and once merged with the fork's
main 014d52d, and on 3.2.0 with VICTORY_PIPELINE_WAIT_MS=0: the heads had
skin in all three (captures at frames 1024 and 2048), the head map was made
5, 191 and 5 ms after its dispatch, the longest gap between frames was 1.11,
1.12 and 1.05 s, no crash. A warm start: no compute dispatch waited.
Compute dispatches dropped while their pipeline was being made: about
36,000 of 12 million (the 10 s form about 2,000; off about 155,000); nine
pipelines dispatched in at most three frames never ran (all nine also never
ran with the wait off; with the 10 s form, none).

Unit tests: the frame's budget (shared, ended, a newer frame's own), the
order of the line (newest first, a waited-for pipeline first, taken once,
not by the screen passes' workers), the kept worker, and a pipeline that
is never made has one wait and then no more than the ordinary budget
(replaces the test of the old bounds). Untested on Windows and on other
cards.
The heads section described 10 s a frame and 10 s a pipeline. Now it says
what the wait does and gives the cold-start numbers from this machine (RX
9070, RADV 26.3.1, vkd3d-proton 71cae09; the first 300 s): wait off, the
first form and this one, with whether the heads had skin. The 3.2.0
paragraph gives one cold start with `VICTORY_PIPELINE_WAIT_MS=0`.
Author
Owner

@⁠Beqren on GitHub · 2026-11-27 04:53 UTC · original

Updated: the compute wait now holds a frame at most half a second, and the branch merges with main again.

@⁠UwUCammie's cold-start measurements in #386 (11.3 s longest gap, 30 gaps over 1 s with the wait on) were right, and I reproduced them here: 10.2 and 10.3 s, 8 and 9 gaps over 1 s in the first 300 s. That was this branch's own 10 s a frame being spent again and again. Thank you for running it.

What changed (two commits, nothing rewritten): a frame's compute waits end 500 ms after the first began; each pipeline gets one wait; the pipeline a dispatch is waiting for is made next, and one worker (of four or more) is kept free for it. The line this branch had in Pending::make is gone, which was the conflict.

Here (RX 9070, RADV 26.3.1, vkd3d-proton 71cae09, diagnostics builds, every cache cold, first 300 s):

compute wait frames/s longest gap gaps over 1 s heads
off 15.9 1.0 s 1 no skin
first form (10 s) 14.6, 14.5 10.2, 10.3 s 8, 9 skin
now 16.6 1.1 s 1 skin
now, merged with main 014d52d 15.3 1.1 s 2 skin

What it gives up: nine pipelines dispatched in the bursts of the first world frames never ran (the same nine as with the wait off; the 10 s form lost none), and the head map was made inside the 500 ms in every run of this form but with as little as 300 ms to spare, so the race is narrower, not closed. The description has the details and what is not verified. One machine, single runs; a repeat on other hardware would be welcome.

Done with an AI coding assistant (Claude Code), directed and tested by me.

**@⁠Beqren** on GitHub · 2026-11-27 04:53 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/166#issuecomment-7210177361) Updated: the compute wait now holds a frame at most half a second, and the branch merges with `main` again. @⁠UwUCammie's cold-start measurements in #386 (11.3 s longest gap, 30 gaps over 1 s with the wait on) were right, and I reproduced them here: 10.2 and 10.3 s, 8 and 9 gaps over 1 s in the first 300 s. That was this branch's own 10 s a frame being spent again and again. Thank you for running it. What changed (two commits, nothing rewritten): a frame's compute waits end 500 ms after the first began; each pipeline gets one wait; the pipeline a dispatch is waiting for is made next, and one worker (of four or more) is kept free for it. The line this branch had in `Pending::make` is gone, which was the conflict. Here (RX 9070, RADV 26.3.1, vkd3d-proton `71cae09`, diagnostics builds, every cache cold, first 300 s): | compute wait | frames/s | longest gap | gaps over 1 s | heads | |---|---|---|---|---| | off | 15.9 | 1.0 s | 1 | no skin | | first form (10 s) | 14.6, 14.5 | 10.2, 10.3 s | 8, 9 | skin | | now | 16.6 | 1.1 s | 1 | skin | | now, merged with `main` `014d52d` | 15.3 | 1.1 s | 2 | skin | What it gives up: nine pipelines dispatched in the bursts of the first world frames never ran (the same nine as with the wait off; the 10 s form lost none), and the head map was made inside the 500 ms in every run of this form but with as little as 300 ms to spare, so the race is narrower, not closed. The description has the details and what is not verified. One machine, single runs; a repeat on other hardware would be welcome. Done with an AI coding assistant (Claude Code), directed and tested by me.
Author
Owner

@⁠UwUCammie on GitHub · 2026-11-27 05:23 UTC · original

I’ve queued the updated scheduler for a same-binary cold on/off pair on the RX 7900 XT, with 71cae091 and the 500 ms graphics wait in both arms. The scheduler source is unchanged from your updated head. The bench branch adds 720p output and accepted-present tracing. I’ll count from launch to 300 seconds and check matching diner shots for skin. The runner is yielding to another build at the moment. Bench branch

**@⁠UwUCammie** on GitHub · 2026-11-27 05:23 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/166#issuecomment-7210592273) I’ve queued the updated scheduler for a same-binary cold on/off pair on the RX 7900 XT, with `71cae091` and the 500 ms graphics wait in both arms. The scheduler source is unchanged from your updated head. The bench branch adds 720p output and accepted-present tracing. I’ll count from launch to 300 seconds and check matching diner shots for skin. The runner is yielding to another build at the moment. [Bench branch](https://github.com/UwUCammie/VIctory-7900XTX/commit/a995ba9c)
Author
Owner

@⁠UwUCammie on GitHub · 2026-11-27 06:19 UTC · original

I reproduced the missing face on the RX 7900 XT with compute wait off using the updated scheduler. In the car close-up around 160 seconds, the eyes and teeth were visible and the facial surface was missing. The log confirms the 500 ms graphics wait. That attempt yielded to a parallel build about 17 seconds after the capture, so it’s excluded from the 300-second timing. The compute-on shot comparison is still pending.

**@⁠UwUCammie** on GitHub · 2026-11-27 06:19 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/166#issuecomment-7211416953) I reproduced the missing face on the RX 7900 XT with compute wait off using the updated scheduler. In the car close-up around 160 seconds, the eyes and teeth were visible and the facial surface was missing. The log confirms the 500 ms graphics wait. That attempt yielded to a parallel build about 17 seconds after the capture, so it’s excluded from the 300-second timing. The compute-on shot comparison is still pending.
Author
Owner

@⁠UwUCammie on GitHub · 2026-11-27 06:59 UTC · original

The opening car close-up at about 192 seconds showed facial skin with the 500 ms compute wait on. With it off, the same close-up showed eyes and teeth without the facial surface. I checked the executable, driver DLLs, inputs and graphics wait across both launches. The enabled screenshot was taken 24 seconds before a parallel build interrupted that run, so its 300-second timing is still pending.

I also tried keeping that last general worker reserved when both it and the dedicated screen workers would otherwise be eligible for a screen compile. The optional policy passed seven extracted queue tests. I’ll measure it separately with both wait budgets fixed at 500 ms. Control results and fixture

**@⁠UwUCammie** on GitHub · 2026-11-27 06:59 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/166#issuecomment-7212029356) The opening car close-up at about 192 seconds showed facial skin with the 500 ms compute wait on. With it off, the same close-up showed eyes and teeth without the facial surface. I checked the executable, driver DLLs, inputs and graphics wait across both launches. The enabled screenshot was taken 24 seconds before a parallel build interrupted that run, so its 300-second timing is still pending. I also tried keeping that last general worker reserved when both it and the dedicated screen workers would otherwise be eligible for a screen compile. The optional policy passed seven extracted queue tests. I’ll measure it separately with both wait budgets fixed at 500 ms. [Control results and fixture](https://github.com/UwUCammie/victory-amd/commit/f917d116)
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/166/head:github-bot/gh-166'
git switch 'github-bot/gh-166'

Merge

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