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

Open
LofisMusk wants to merge 2 commits from upstream-pr/449 into main
LofisMusk commented 2026-11-27 09:55:32 +00:00 (Migrated from github.com)

Imported from avatarmanz/VIctory-7900XTX. Originally posted by LofisMusk on 2026-11-27T09:55:32Z.


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

<!-- greyfinch-sync:avatarmanz/VIctory-7900XTX:issue:5524646506 --> Imported from [avatarmanz/VIctory-7900XTX](https://github.com/avatarmanz/VIctory-7900XTX/pull/449). Originally posted by [LofisMusk](https://github.com/LofisMusk) on 2026-11-27T09:55:32Z. --- 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
UwUCammie commented 2026-11-27 10:03:05 +00:00 (Migrated from github.com)

Imported from avatarmanz/VIctory-7900XTX. Originally posted by UwUCammie on 2026-11-27T10:03:05Z.


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

<!-- greyfinch-sync:avatarmanz/VIctory-7900XTX:comment:7215414627 --> Imported from [avatarmanz/VIctory-7900XTX](https://github.com/avatarmanz/VIctory-7900XTX/pull/449#issuecomment-7215414627). Originally posted by [UwUCammie](https://github.com/UwUCammie) on 2026-11-27T10:03:05Z. --- 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)
borntofrag34 commented 2026-11-27 10:08:19 +00:00 (Migrated from github.com)

Imported from avatarmanz/VIctory-7900XTX. Originally posted by borntofrag34 on 2026-11-27T10:08:19Z.


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

<!-- greyfinch-sync:avatarmanz/VIctory-7900XTX:comment:7215519917 --> Imported from [avatarmanz/VIctory-7900XTX](https://github.com/avatarmanz/VIctory-7900XTX/pull/449#issuecomment-7215519917). Originally posted by [borntofrag34](https://github.com/borntofrag34) on 2026-11-27T10:08:19Z. --- 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)
UwUCammie commented 2026-11-27 10:12:34 +00:00 (Migrated from github.com)

Imported from avatarmanz/VIctory-7900XTX. Originally posted by UwUCammie on 2026-11-27T10:12:34Z.


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

<!-- greyfinch-sync:avatarmanz/VIctory-7900XTX:comment:7215606431 --> Imported from [avatarmanz/VIctory-7900XTX](https://github.com/avatarmanz/VIctory-7900XTX/pull/449#issuecomment-7215606431). Originally posted by [UwUCammie](https://github.com/UwUCammie) on 2026-11-27T10:12:34Z. --- 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)
UwUCammie commented 2026-11-27 12:54:50 +00:00 (Migrated from github.com)

Imported from avatarmanz/VIctory-7900XTX. Originally posted by UwUCammie on 2026-11-27T12:54:50Z.


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

<!-- greyfinch-sync:avatarmanz/VIctory-7900XTX:comment:7218827849 --> Imported from [avatarmanz/VIctory-7900XTX](https://github.com/avatarmanz/VIctory-7900XTX/pull/449#issuecomment-7218827849). Originally posted by [UwUCammie](https://github.com/UwUCammie) on 2026-11-27T12:54:50Z. --- 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)
UwUCammie commented 2026-11-27 13:49:58 +00:00 (Migrated from github.com)

Imported from avatarmanz/VIctory-7900XTX. Originally posted by UwUCammie on 2026-11-27T13:49:58Z.


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

<!-- greyfinch-sync:avatarmanz/VIctory-7900XTX:comment:7219999187 --> Imported from [avatarmanz/VIctory-7900XTX](https://github.com/avatarmanz/VIctory-7900XTX/pull/449#issuecomment-7219999187). Originally posted by [UwUCammie](https://github.com/UwUCammie) on 2026-11-27T13:49:58Z. --- 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)
UwUCammie commented 2026-11-27 14:02:34 +00:00 (Migrated from github.com)

Imported from avatarmanz/VIctory-7900XTX. Originally posted by UwUCammie on 2026-11-27T14:02:34Z.


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.

<!-- greyfinch-sync:avatarmanz/VIctory-7900XTX:comment:7220259448 --> Imported from [avatarmanz/VIctory-7900XTX](https://github.com/avatarmanz/VIctory-7900XTX/pull/449#issuecomment-7220259448). Originally posted by [UwUCammie](https://github.com/UwUCammie) on 2026-11-27T14:02:34Z. --- 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 cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/449:upstream-pr/449'
git switch 'upstream-pr/449'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/449'
git switch 'upstream-pr/449'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/449'
git switch 'upstream-pr/449'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/449'
git switch 'main'
git merge --squash 'upstream-pr/449'
git switch 'main'
git merge --ff-only 'upstream-pr/449'
git switch 'main'
git merge 'upstream-pr/449'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
avatarmanz/VIctory-7900XTX!449
No description provided.