Faces on a first start: prepare the head blend-shape pipeline before its first dispatch #970

Closed
github-bot wants to merge 1 commit from gh-pr/970/head into gh-pr/970/base
Owner

@⁠urielbeaupre on GitHub · 2026-11-28 10:19 UTC · original
urielbeaupre:fix/head-map-wait → main · +297 −26 · 4 files · 1 commits · closed without merging

Fixes the missing faces on a first start: female heads show only eyes and teeth until the next start (#100, #354). This is a port of TaynanGT/Vice-Tay#372.

Cause

The game builds each head's blend-shape map once, at its first dispatch, with the compute program 61e54e90adccaf6a. If that program's pipeline is still compiling at that moment, the dispatch is dropped, the map is never built, and the head's skin stays missing for the rest of the session. On the next start the pipeline is in the library, so the face appears. That matches "it should be fixed on your second load" in #100.

From the log on an RTX 4070 Ti, Series S, first start on 63b902f:

09:50:48.538  first bind   ... hash=61e54e90adccaf6a
09:50:48.811  host pipeline shaders=[compute 61e54e90adccaf6a]

The pipeline existed 0.27 s after its first dispatch. Lucia's face was missing for the whole session (eyes and teeth only, male faces fine). On the second start it was drawn.

Change

  • A pipeline that is exactly the single compute program 61e54e90adccaf6a is queued when it is created, and goes to the front of the screen queue.
  • Its first dispatch, direct or indirect, may wait up to 2 s for it. A worker refusal wakes the caller; after a timeout, later dispatches only poll.
  • VICTORY_HEAD_MAP_WAIT=0 turns all of this off.
  • draw.rs and pipeline.rs are Vice-Tay's hunks unchanged. pipeline/make.rs is ported by hand to this fork's queue: the fork's LEFT_OUT, VICTORY_LEAVE_OUT and slow-queue handling are kept.
  • Vice-Tay #365 (slow-worker scheduling) is not ported. A requested pipeline never enters the slow queue, and a new test checks that the head map goes before slow early work.
  • README.md has one line about the switch.

Verified

First start with an empty pipeline library (translated shaders kept), same PC and settings:

10:15:44.750  host pipeline shaders=[compute 61e54e90adccaf6a]
10:16:41.777  head blend-shape map pipeline at dispatch ... already_ready=true host_pipeline=true

The pipeline was ready 57 s before its first dispatch, and Lucia's face was drawn from her first shot. The NVIDIA driver's own shader cache was not cleared, so this was not a fully cold install.

  • cargo test -p victory-gpu --lib: 459 passed, 0 failed. This includes the five head-map tests from Vice-Tay, adapted, and two new ones.
  • cargo build --release -p victory and the diagnostics build both build.
  • Clippy reports no new warnings.

Not covered

  • #938 (the face programs exempt from VICTORY_LDS_BOUNDS) is a different cause of the same picture. On this PC the faces are drawn with the bounds on, but it may still matter on other cards.
  • With VICTORY_SCREEN_WAIT_MS=0 (no screen-only workers) and few workers, the head map could still miss its 2 s window.
  • If another game version changes the program's hash, the change does nothing.

Credit: TaynanGT/Vice-Tay#372, which builds on avatarmanz/VIctory-7900XTX#166.

🤖 Generated with Claude Code

**@⁠urielbeaupre** on GitHub · 2026-11-28 10:19 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/970) `urielbeaupre:fix/head-map-wait` → `main` · +297 −26 · 4 files · 1 commits · closed without merging Fixes the missing faces on a **first start**: female heads show only eyes and teeth until the next start (#100, #354). This is a port of TaynanGT/Vice-Tay#372. ## Cause The game builds each head's blend-shape map **once, at its first dispatch**, with the compute program `61e54e90adccaf6a`. If that program's pipeline is still compiling at that moment, the dispatch is dropped, the map is never built, and the head's skin stays missing for the rest of the session. On the next start the pipeline is in the library, so the face appears. That matches "it should be fixed on your second load" in #100. From the log on an RTX 4070 Ti, Series S, first start on `63b902f`: ``` 09:50:48.538 first bind ... hash=61e54e90adccaf6a 09:50:48.811 host pipeline shaders=[compute 61e54e90adccaf6a] ``` The pipeline existed **0.27 s after** its first dispatch. Lucia's face was missing for the whole session (eyes and teeth only, male faces fine). On the second start it was drawn. ## Change - A pipeline that is exactly the single compute program `61e54e90adccaf6a` is queued when it is created, and goes to the front of the screen queue. - Its first dispatch, direct or indirect, may wait up to **2 s** for it. A worker refusal wakes the caller; after a timeout, later dispatches only poll. - `VICTORY_HEAD_MAP_WAIT=0` turns all of this off. - `draw.rs` and `pipeline.rs` are Vice-Tay's hunks unchanged. `pipeline/make.rs` is ported by hand to this fork's queue: the fork's `LEFT_OUT`, `VICTORY_LEAVE_OUT` and slow-queue handling are kept. - Vice-Tay #365 (slow-worker scheduling) is not ported. A requested pipeline never enters the slow queue, and a new test checks that the head map goes before slow early work. - `README.md` has one line about the switch. ## Verified First start with an **empty pipeline library** (translated shaders kept), same PC and settings: ``` 10:15:44.750 host pipeline shaders=[compute 61e54e90adccaf6a] 10:16:41.777 head blend-shape map pipeline at dispatch ... already_ready=true host_pipeline=true ``` The pipeline was ready **57 s before** its first dispatch, and Lucia's face was drawn from her first shot. The NVIDIA driver's own shader cache was not cleared, so this was not a fully cold install. - `cargo test -p victory-gpu --lib`: 459 passed, 0 failed. This includes the five head-map tests from Vice-Tay, adapted, and two new ones. - `cargo build --release -p victory` and the diagnostics build both build. - Clippy reports no new warnings. ## Not covered - #938 (the face programs exempt from `VICTORY_LDS_BOUNDS`) is a different cause of the same picture. On this PC the faces are drawn with the bounds on, but it may still matter on other cards. - With `VICTORY_SCREEN_WAIT_MS=0` (no screen-only workers) and few workers, the head map could still miss its 2 s window. - If another game version changes the program's hash, the change does nothing. Credit: TaynanGT/Vice-Tay#372, which builds on avatarmanz/VIctory-7900XTX#166. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The compute shader 61e54e90adccaf6a builds the head blend-shape map once,
at its first dispatch. When its pipeline was still being made, that
dispatch was dropped and female player faces showed only eyes and teeth
(this fork's log: the first bind 0.27 s before its host pipeline existed).

The pipeline is now queued at its creation, at the front of the screen
queue (next for any worker), and its first dispatch, direct or indirect,
waits up to 2 s for it. A refusal by the worker wakes the caller; after a
timeout, later dispatches only look. With no workers it is refused rather
than compiled on the title's thread. VICTORY_HEAD_MAP_WAIT=0: the ordinary
order and frame budget. The first dispatch is logged in either mode.

Port of TaynanGT/Vice-Tay #372 (prior work: avatarmanz/VIctory-7900XTX
#166), adapted to this fork's queue: no skip-hash constructor here, so
the policy constructor takes only the switch; the left-out counter and
slow-queue claims are kept as they are.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 14:30:57 +00:00
github-bot closed this pull request 2026-11-28 14:30:57 +00:00
Author
Owner

@⁠cxy0072019-sketch on GitHub · 2026-11-28 11:02 UTC · original

Confirmed on an RTX 5070 Ti (621.24), Windows 11 build 28000, Series S profile, and 1920×1080 output with DLSS and frame generation off. I used the same b4b9c17 diagnostics executable and opening profile in both runs. Each started with empty emulator shader and pipeline caches, and both used VICTORY_PIPELINE_BOOK=0.

  • VICTORY_HEAD_MAP_WAIT=0 — already_ready=false host_pipeline=false at the first 61e54e90adccaf6a dispatch. The host pipeline was created 9.98 s later. Lucia was missing facial skin in the roadside close-up, with eyes and teeth visible.
  • VICTORY_HEAD_MAP_WAIT=1 — the host pipeline was ready 36.23 s before the first dispatch, which logged already_ready=true host_pipeline=true. Lucia's face rendered in the same close-up.

With the same pretranslated shader cache seeded into both runs and empty pipeline libraries, the face was visible with either setting. That control missed the first dispatch by only 43 ms.

**@⁠cxy0072019-sketch** on GitHub · 2026-11-28 11:02 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/970#issuecomment-7238287593) Confirmed on an RTX 5070 Ti (621.24), Windows 11 build 28000, Series S profile, and 1920×1080 output with DLSS and frame generation off. I used the same `b4b9c17` diagnostics executable and opening profile in both runs. Each started with empty emulator shader and pipeline caches, and both used `VICTORY_PIPELINE_BOOK=0`. - `VICTORY_HEAD_MAP_WAIT=0` — `already_ready=false host_pipeline=false` at the first `61e54e90adccaf6a` dispatch. The host pipeline was created 9.98 s later. Lucia was missing facial skin in the roadside close-up, with eyes and teeth visible. - `VICTORY_HEAD_MAP_WAIT=1` — the host pipeline was ready 36.23 s before the first dispatch, which logged `already_ready=true host_pipeline=true`. Lucia's face rendered in the same close-up. With the same pretranslated shader cache seeded into both runs and empty pipeline libraries, the face was visible with either setting. That control missed the first dispatch by only 43 ms.
Author
Owner

@⁠urielbeaupre on GitHub · 2026-11-28 11:04 UTC · original

Thanks for the A/B with empty caches on a 5070 Ti. 9.98 s late and no skin with the wait off, 36 s early and the face with it on: the same picture as here (0.27 s late / 57 s early on a 4070 Ti). The pretranslated control fits too: with translations already there, the pipeline only misses by tens of milliseconds, which is why the face often comes back on a second start (#100).

**@⁠urielbeaupre** on GitHub · 2026-11-28 11:04 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/970#issuecomment-7238312552) Thanks for the A/B with empty caches on a 5070 Ti. 9.98 s late and no skin with the wait off, 36 s early and the face with it on: the same picture as here (0.27 s late / 57 s early on a 4070 Ti). The pretranslated control fits too: with translations already there, the pipeline only misses by tens of milliseconds, which is why the face often comes back on a second start (#100).
Author
Owner

@⁠kibagami-nc on GitHub · 2026-11-28 11:21 UTC · original

#703 does this for the same program (61e54e90adccaf6a), from the same finding (TaynanGT/Vice-Tay#372). The two should not both land: either one is enough for it.

How #703 does it. The program joins the confirmed first-scene producers, scene_input in pipeline/make.rs:

  • its pipeline is started when the title creates it;
  • it goes first in the workers' queue;
  • its dispatch gets the screen passes' wait budget, VICTORY_SCREEN_WAIT_MS (10 s), instead of a separate 2 s wait.

Who tested it. dsh38 (RTX 4080 SUPER), Yoshi-233 (RTX 4070 Ti SUPER) and timorjay (RTX 5090 D) compared a cold cache without it and with it: with it, the pipeline was ready 30 to 90 s before its first bind and the faces were whole. JoeY54 (RTX 5090) had the faces in all three runs with it. Dukestar69 approved it.

What this one adds is the VICTORY_HEAD_MAP_WAIT=0 switch and the explicit 2 s wait on the first dispatch. cxy0072019-sketch's A/B with empty caches applies to both approaches in the same way.

Not the same cause, for whoever compares: #938 covers faces that stay broken with a warm cache. There, 25 other face programs are held to their LDS size by VICTORY_LDS_BOUNDS.

**@⁠kibagami-nc** on GitHub · 2026-11-28 11:21 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/970#issuecomment-7238502082) #703 does this for the same program (`61e54e90adccaf6a`), from the same finding (TaynanGT/Vice-Tay#372). The two should not both land: either one is enough for it. **How #703 does it.** The program joins the confirmed first-scene producers, `scene_input` in `pipeline/make.rs`: - its pipeline is started when the title creates it; - it goes first in the workers' queue; - its dispatch gets the screen passes' wait budget, `VICTORY_SCREEN_WAIT_MS` (10 s), instead of a separate 2 s wait. **Who tested it.** dsh38 (RTX 4080 SUPER), Yoshi-233 (RTX 4070 Ti SUPER) and timorjay (RTX 5090 D) compared a cold cache without it and with it: with it, the pipeline was ready 30 to 90 s before its first bind and the faces were whole. JoeY54 (RTX 5090) had the faces in all three runs with it. Dukestar69 approved it. **What this one adds** is the `VICTORY_HEAD_MAP_WAIT=0` switch and the explicit 2 s wait on the first dispatch. cxy0072019-sketch's A/B with empty caches applies to both approaches in the same way. Not the same cause, for whoever compares: #938 covers faces that stay broken with a warm cache. There, 25 other face programs are held to their LDS size by `VICTORY_LDS_BOUNDS`.
Author
Owner

@⁠urielbeaupre on GitHub · 2026-11-28 11:29 UTC · original

Thanks @⁠kibagami-nc, I hadn't seen #703. It does the same thing with much less code, and its 10 s screen-pass budget is a safer wait than our 2 s one. More people have tested it too. I'm closing this in favour of #703.

The results here should hold for #703 as well, since both start the pipeline when the title creates it and put it first in the queue:

  • RTX 4070 Ti: on a cold cache the pipeline was 0.27 s late and the face was missing; with the change it was ready 57 s early and the face rendered.
  • cxy0072019-sketch, RTX 5070 Ti: 9.98 s late and missing without it, 36 s early and rendered with it.

🤖 Generated with Claude Code

**@⁠urielbeaupre** on GitHub · 2026-11-28 11:29 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/970#issuecomment-7238587185) Thanks @⁠kibagami-nc, I hadn't seen #703. It does the same thing with much less code, and its 10 s screen-pass budget is a safer wait than our 2 s one. More people have tested it too. I'm closing this in favour of #703. The results here should hold for #703 as well, since both start the pipeline when the title creates it and put it first in the queue: - RTX 4070 Ti: on a cold cache the pipeline was 0.27 s late and the face was missing; with the change it was ready 57 s early and the face rendered. - cxy0072019-sketch, RTX 5070 Ti: 9.98 s late and missing without it, 36 s early and rendered with it. 🤖 Generated with [Claude Code](https://claude.com/claude-code)

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!970
No description provided.