Linux/Wine: character skin baked at the title's loading rate (VICTORY_LOAD_FPS), fixes #400 #449

Open
github-bot wants to merge 2 commits from github-bot/gh-449 into main AGit
Owner

@⁠LofisMusk on GitHub · 2026-11-27 09:55 UTC · original
LofisMusk:load-fps → main · +280 −4 · 9 files · 2 commits · open

Fixes the missing head skin of #400 on Linux under Wine (RX 7900 XTX).

Cause: the title bakes its characters' skin while it loads. At 25+ frames a second every head came out without skin (20 runs of 20). With the title's own frame rate setting at 5, it was there (2 of 2). Slowing only our clock while the title stayed at 30 did not help, and neither did the title at 60.

Change: VICTORY_LOAD_FPS=<rate> runs the title at that rate while it loads. Loading counts as over after ten seconds without a bake draw. The title is then switched to its playing rate at runtime: the three patched reads, its frame time (+0x98f84ac) and its timers' shortest step (+0x6849844). Our clock keeps the playing interval, because the title asks for the loading rate's 66.7 ms again right after the switch.

Measured (release, play.ps1 set, VICTORY_LOAD_FPS=5):

  • Skin and tied hair on every character.
  • Loading takes 90-130 s.
  • 25-26 fps in the cell at 30.
  • With VICTORY_FRAME_INTERVAL_MS=16.667 as well: 33 fps in the lighter scene after loading.

Off by default. Builds on #386 (branch linux-wine).

Known remaining issue: lips look puffed on Lucia (facial rig). It's separate from this change; the SDWA sext fix (upstream #3124) changes none of this title's 25,790 shaders.

🤖 Generated with Claude Code

https://claude.ai/code/session_018VwqyDRnxhcvy1dojRs4Cr

**@⁠LofisMusk** on GitHub · 2026-11-27 09:55 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/449) `LofisMusk:load-fps` → `main` · +280 −4 · 9 files · 2 commits · open Fixes the missing head skin of #400 on Linux under Wine (RX 7900 XTX). **Cause:** the title bakes its characters' skin while it loads. At 25+ frames a second every head came out without skin (20 runs of 20). With the title's own frame rate setting at 5, it was there (2 of 2). Slowing only our clock while the title stayed at 30 did not help, and neither did the title at 60. **Change:** `VICTORY_LOAD_FPS=<rate>` runs the title at that rate while it loads. Loading counts as over after ten seconds without a bake draw. The title is then switched to its playing rate at runtime: the three patched reads, its frame time (+0x98f84ac) and its timers' shortest step (+0x6849844). Our clock keeps the playing interval, because the title asks for the loading rate's 66.7 ms again right after the switch. **Measured** (release, `play.ps1` set, `VICTORY_LOAD_FPS=5`): - Skin and tied hair on every character. - Loading takes 90-130 s. - 25-26 fps in the cell at 30. - With `VICTORY_FRAME_INTERVAL_MS=16.667` as well: 33 fps in the lighter scene after loading. Off by default. Builds on #386 (branch `linux-wine`). **Known remaining issue:** lips look puffed on Lucia (facial rig). It's separate from this change; the SDWA sext fix (upstream #3124) changes none of this title's 25,790 shaders. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_018VwqyDRnxhcvy1dojRs4Cr
The pipeline workers get a 64 MiB stack (reserved): under Wine the
DXIL to SPIR-V conversion inside the driver call can pass the default
2 MiB. VICTORY_LOG_THREADS=1 names the thread on each log line (how the
pipelines that kill a worker were found). VICTORY_KEYS also gives a
scripted run with no pad a host pad in slot 0 (diagnostics builds).

docs/linux-wine.md: what it takes on Linux (a wineserver with the view
tree, vkd3d-proton with dxil-spirv from 2026-11-25, a low
VICTORY_PIPELINE_WAIT_MS) and what was measured: 23.5-25.5 fps in
release on an RX 7900 XTX in the prison cell.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_018VwqyDRnxhcvy1dojRs4Cr
On Linux under Wine (RX 7900 XTX, RADV) every character had no head or
neck skin at 25-30 frames a second: eyes, teeth and hair only, 20 runs of
20 (#400). The title bakes its characters' skin while it loads; with its
own frame rate setting at 5 (VICTORY_FRAME_INTERVAL_MS=200) the skin was
there in 2 runs of 2; our clock slowed to 200 ms with the title kept at
30 (tried as VICTORY_LOAD_INTERVAL_MS) and the title at 60 did not bring
it back.

VICTORY_LOAD_FPS=<rate>: the loader gives the title that rate while it
loads, and its playing rate after (VICTORY_FRAME_INTERVAL_MS's, or 30).
The end of loading is ten seconds without a bake draw (victory-gpu's
frame gate, victory_core::LOADING_OVER); then the three patched reads
load the playing rate, and what the title made of the loading rate is
made again: its frame time (+0x98f84ac) and its timers' shortest step
(+0x6849844, only if it holds 1 / the loading rate). Our clock takes the
playing interval and keeps it (the title asks for the loading rate's
66.7 ms again right after: 15 frames a second until this).

Measured (release, play.ps1's set): with VICTORY_LOAD_FPS=5, skin and
tied hair on every character, loading about 90-130 s, then 25-26 fps in
the cell at 30; with VICTORY_FRAME_INTERVAL_MS=16.667 too, 33 fps in the
lighter scene after it. VICTORY_LOAD_INTERVAL_MS=<ms>[,<hold s>] stays
as a switch of its own (our clock alone while loading).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_018VwqyDRnxhcvy1dojRs4Cr
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 10:38:56 +00:00
Author
Owner

@⁠UwUCammie on GitHub · 2026-11-27 10:03 UTC · original · edited 2026-11-27 10:07 UTC

One edge case with the opt-in. VICTORY_LOAD_FPS=0 or off fails the loader's numeric check, but frame.rs still enables its loading gate because the variable exists. After the bake goes quiet it can switch the playing interval even though the loader never changed the title rate. The shared parser passed its Windows MSVC test under Wine, and the app's cargo check passed. Patch against load-fps

I reproduced the missing-driver-skin shot in another cold 720p Series X run. The first logged bake draw was at 24.50 s, the tracked facial-deformation pipeline returned at 76.44 s, and the driver was still missing skin at 160 s. That leaves open whether the pipeline was needed earlier. Do you know if it had already compiled when the first bake ran in your 25+ FPS runs without skin? Timing notes

**@⁠UwUCammie** on GitHub · 2026-11-27 10:03 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/449#issuecomment-7215414627) · edited 2026-11-27 10:07 UTC One edge case with the opt-in. `VICTORY_LOAD_FPS=0` or `off` fails the loader's numeric check, but `frame.rs` still enables its loading gate because the variable exists. After the bake goes quiet it can switch the playing interval even though the loader never changed the title rate. The shared parser passed its Windows MSVC test under Wine, and the app's cargo check passed. [Patch against load-fps](https://github.com/LofisMusk/VIctory-7900XTX/pull/1) I reproduced the missing-driver-skin shot in another cold 720p Series X run. The first logged bake draw was at 24.50 s, the tracked facial-deformation pipeline returned at 76.44 s, and the driver was still missing skin at 160 s. That leaves open whether the pipeline was needed earlier. Do you know if it had already compiled when the first bake ran in your 25+ FPS runs without skin? [Timing notes](https://github.com/UwUCammie/victory-amd/commit/59aed491)
Author
Owner

@⁠borntofrag34 on GitHub · 2026-11-27 10:08 UTC · original

On UwUCammie's question, in case it helps separate the two paths: here (RX 7900 GRE, RADV, Wine) the same symptom (eyes and teeth, no skin) came with the facial deformation's compute passes being dropped on their first use, not with the loading rate itself.

  • In the runs without skin, and in none of the runs with it, the face's programs (970c4fbb3b017c0e, 068c90badc86f1fd, e4a7e088c7780ce8, 36e010b53acffd77) were used for the first time and dropped, at the frame the man's face first shows (111-114 frames into the world). Their pipelines were still being made, and the frame's 500 ms wait was used up.
  • Captures of the same shot with and without skin, replayed: a table of 0x6878 bytes per character that the deformer reads stayed all 0xFFFFFFFF on the card. That pass fills it only once, so the deformer's output was one value for every vertex, and the meshlet cull then kept 10 groups of 105 instead of 94.
  • How soon after launch the world started decided it: world at 27 s, 4 of 4 runs without skin; 33 s, 22 of 45; 73 s, 1 of 13. A title held at 5 fps during loading (90-130 s, 200 ms a frame) would give those pipelines time to finish before their first dispatch, which fits your 2 of 2.

#440 makes a compute pass wait for its pipeline on a budget of its own (VICTORY_COMPUTE_WAIT_MS, now 500 ms under Wine) and puts its pipeline first in the queue. It also keeps the pipeline library under vkd3d-proton (VICTORY_LIBRARY_NULL), so later runs start them while loading. With a warm vkd3d-proton cache it went from 2 of 5 runs without skin to 17 of 17 with it. Cold it is not settled: UwUCammie still sees it now and then in the car.

A way to tell the two apart in your 25+ fps runs: #440 logs each first use that goes without its pipeline, with the program's hash. If the four above show up there in the runs without skin, it is the same cause.

On Lucia's lips: the same here. The faces don't animate, because the deformer's shared input reads zeros. With #114 they move, but wrongly on RADV (mouths wide open; notes on #114).

🤖 Generated with Claude Code

**@⁠borntofrag34** on GitHub · 2026-11-27 10:08 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/449#issuecomment-7215519917) On UwUCammie's question, in case it helps separate the two paths: here (RX 7900 GRE, RADV, Wine) the same symptom (eyes and teeth, no skin) came with the facial deformation's compute passes being dropped on their first use, not with the loading rate itself. - In the runs without skin, and in none of the runs with it, the face's programs (`970c4fbb3b017c0e`, `068c90badc86f1fd`, `e4a7e088c7780ce8`, `36e010b53acffd77`) were used for the first time and dropped, at the frame the man's face first shows (111-114 frames into the world). Their pipelines were still being made, and the frame's 500 ms wait was used up. - Captures of the same shot with and without skin, replayed: a table of 0x6878 bytes per character that the deformer reads stayed all `0xFFFFFFFF` on the card. That pass fills it only once, so the deformer's output was one value for every vertex, and the meshlet cull then kept 10 groups of 105 instead of 94. - How soon after launch the world started decided it: world at 27 s, 4 of 4 runs without skin; 33 s, 22 of 45; 73 s, 1 of 13. A title held at 5 fps during loading (90-130 s, 200 ms a frame) would give those pipelines time to finish before their first dispatch, which fits your 2 of 2. #440 makes a compute pass wait for its pipeline on a budget of its own (`VICTORY_COMPUTE_WAIT_MS`, now 500 ms under Wine) and puts its pipeline first in the queue. It also keeps the pipeline library under vkd3d-proton (`VICTORY_LIBRARY_NULL`), so later runs start them while loading. With a warm vkd3d-proton cache it went from 2 of 5 runs without skin to 17 of 17 with it. Cold it is not settled: UwUCammie still sees it now and then in the car. A way to tell the two apart in your 25+ fps runs: #440 logs each first use that goes without its pipeline, with the program's hash. If the four above show up there in the runs without skin, it is the same cause. On Lucia's lips: the same here. The faces don't animate, because the deformer's shared input reads zeros. With #114 they move, but wrongly on RADV (mouths wide open; notes on #114). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Author
Owner

@⁠UwUCammie on GitHub · 2026-11-27 10:12 UTC · original · edited 2026-11-27 10:48 UTC

I checked the four programs against the 2 s / 2.5 KiB run. The two that fit the cutoff had host pipelines by about 2.65 s. The 2,704-byte one still had waits ending without a result, and both faces showed skin in the car shot.

I’ve queued 3 KiB against 2.5 KiB on the same executable and 2 s wait. That covers the 2,704-byte program and would add 55 distinct first-bound compute shaders in each of the three traces I checked. The cold timing should show what that extra work costs. Trace notes and setup

The first 3 KiB run had that pipeline ready at 2.51 s, before its first recorded bind at 56.77 s. The 2.5 KiB run had it ready at 76.66 s after resultless waits. This was the same binary and cold setup, with only the cutoff changed. The 3 KiB run yielded to a parallel build at 59.61 s, before the car shot. Timing and test setup

A second 3 KiB run had the same pipeline ready at 3.14 s and showed the driver’s skin in the 160 s car close-up. The first 160 s had 2,868 accepts versus 2,855 at 2.5 KiB, with a higher P99 on the 3 KiB side. The second run yielded at 162.87 s. Repeat and timing

**@⁠UwUCammie** on GitHub · 2026-11-27 10:12 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/449#issuecomment-7215606431) · edited 2026-11-27 10:48 UTC I checked the four programs against the 2 s / 2.5 KiB run. The two that fit the cutoff had host pipelines by about 2.65 s. The 2,704-byte one still had waits ending without a result, and both faces showed skin in the car shot. I’ve queued 3 KiB against 2.5 KiB on the same executable and 2 s wait. That covers the 2,704-byte program and would add 55 distinct first-bound compute shaders in each of the three traces I checked. The cold timing should show what that extra work costs. [Trace notes and setup](https://github.com/UwUCammie/victory-amd/commit/459b70cf) The first 3 KiB run had that pipeline ready at 2.51 s, before its first recorded bind at 56.77 s. The 2.5 KiB run had it ready at 76.66 s after resultless waits. This was the same binary and cold setup, with only the cutoff changed. The 3 KiB run yielded to a parallel build at 59.61 s, before the car shot. [Timing and test setup](https://github.com/UwUCammie/victory-amd/commit/1fe6d181) A second 3 KiB run had the same pipeline ready at 3.14 s and showed the driver’s skin in the 160 s car close-up. The first 160 s had 2,868 accepts versus 2,855 at 2.5 KiB, with a higher P99 on the 3 KiB side. The second run yielded at 162.87 s. [Repeat and timing](https://github.com/UwUCammie/victory-amd/commit/ba43f95d)
Author
Owner

@⁠UwUCammie on GitHub · 2026-11-27 12:54 UTC · original

Five attempts now have a comparable first 150 seconds with the same Wine binary, driver, input, empty caches and 2 s compute wait. The 2.5 KiB runs presented 2,358, 2,521 and 2,683 frames. The 3 KiB runs presented 2,648 and 2,714.

The latest 3 KiB run had 597 ms P99, while the earlier one had 1,248 ms. The equivalent 2.5 KiB prefixes ranged from 768 to 1,374 ms. The latest run yielded at 152 seconds, before the car shot. The full cold comparison is still pending. Run details

**@⁠UwUCammie** on GitHub · 2026-11-27 12:54 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/449#issuecomment-7218827849) Five attempts now have a comparable first 150 seconds with the same Wine binary, driver, input, empty caches and 2 s compute wait. The 2.5 KiB runs presented 2,358, 2,521 and 2,683 frames. The 3 KiB runs presented 2,648 and 2,714. The latest 3 KiB run had 597 ms P99, while the earlier one had 1,248 ms. The equivalent 2.5 KiB prefixes ranged from 768 to 1,374 ms. The latest run yielded at 152 seconds, before the car shot. The full cold comparison is still pending. [Run details](https://github.com/UwUCammie/victory-amd/commit/1a1bdbd1)
Author
Owner

@⁠UwUCammie on GitHub · 2026-11-27 13:49 UTC · original

I reproduced the missing-face symptom on the new Wine face-rendering build at 720p on the RX 7900 XT. In the opening scene, one head was black with eyes and teeth visible. All four pipelines mentioned above had finished building at 65.9–66.2 s, before the capture at 71.5 s. The release log only reports compute waits over 100 ms, so this run leaves the outcome of the first dispatch open.

I ported the 3 KiB early-compute cutoff onto this build and queued it with the same 10 s compute wait as the control. The first run yielded to a competing build at 75.6 s. Capture notes and test setup

**@⁠UwUCammie** on GitHub · 2026-11-27 13:49 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/449#issuecomment-7219999187) I reproduced the missing-face symptom on the new Wine face-rendering build at 720p on the RX 7900 XT. In the opening scene, one head was black with eyes and teeth visible. All four pipelines mentioned above had finished building at 65.9–66.2 s, before the capture at 71.5 s. The release log only reports compute waits over 100 ms, so this run leaves the outcome of the first dispatch open. I ported the 3 KiB early-compute cutoff onto this build and queued it with the same 10 s compute wait as the control. The first run yielded to a competing build at 75.6 s. [Capture notes and test setup](https://github.com/UwUCammie/victory-amd/commit/7001e372)
Author
Owner

@⁠UwUCammie on GitHub · 2026-11-27 14:02 UTC · original

I retried the street dialogue with early creation enabled for compute pipelines up to 3 KiB. The skin was visible on the woman in the same shot on the RX 7900 XT (RADV 26.3.1, Wine 11.22). Both runs used the same raw typed load setting and 10s compute wait. Three of the four pipelines I tracked were ready by 2.55s, down from about 66s on the control.

Both runs stopped early because of another build, so this is one matched rendering check. The Wine patch is up at borntofrag34/VIctory-7900XTX#11. I have a first-dispatch trace queued to see which work actually gets recorded.

**@⁠UwUCammie** on GitHub · 2026-11-27 14:02 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/449#issuecomment-7220259448) I retried the street dialogue with early creation enabled for compute pipelines up to 3 KiB. The skin was visible on the woman in the same shot on the RX 7900 XT (RADV 26.3.1, Wine 11.22). Both runs used the same raw typed load setting and 10s compute wait. Three of the four pipelines I tracked were ready by 2.55s, down from about 66s on the control. Both runs stopped early because of another build, so this is one matched rendering check. The Wine patch is up at borntofrag34/VIctory-7900XTX#11. I have a first-dispatch trace queued to see which work actually gets recorded.
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/pipeline/make.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

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

Merge

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