Skip to content

fix(gpu): prioritize all ped head, facial graph, skinning, and bake pipelines - #21

Merged
HumanlyDev merged 1 commit into
mainfrom
fix/ped-face-loading-and-bake-priority
Nov 26, 2026
Merged

HumanlyDev merged 1 commit into
mainfrom
fix/ped-face-loading-and-bake-priority

Conversation

@HumanlyDev

Copy link
Copy Markdown
Owner

Fixes #19

Root Cause

From the screenshot in #19, the character's head/face mesh is missing on prison scene load while running at ~8 FPS (128.8 ms/frame, 6,016 draws/frame):

  1. Missing face/head on scene load (crates/victory-gpu/src/pipeline/make.rs):
    scene_input() previously only matched 6 hardcoded hashes (covering 3 of 8 ped_standard_head_cs shaders, 1 of 16 ped_skinning_cs shaders, and 0 of 65 compute_graph_ops facial deformation shaders). On a cold or partial pipeline cache, hundreds of world pipelines exhaust the shared 500 ms wait_budget(), causing the remaining blendshape mapping, stretch, neural facial graph, and skinning compute producers to be dropped on their first frames.
  2. Incomplete BakeDecorations detection (crates/victory-gpu/src/pipeline.rs, host.rs, make.rs):
    is_bake_shader previously matched only 1 of 32 MSNC_VS_BakeDecorations mesh shader permutations by hash, and BakeDecorations mesh pipelines did not receive screen worker / screen_budget priority on first use.

Changes

  • Added Shader::container_has and Shader::is_bake in crates/victory-gpu/src/pipeline.rs and used Shader::is_bake in crates/victory-gpu/src/pipeline/host.rs.
  • Expanded scene_input() in crates/victory-gpu/src/pipeline/make.rs to match all ped head blendshape/stretch, ped skinning, and facial compute-graph compute shaders by embedded shader name, and gave BakeDecorations mesh pipelines screen priority on first use.
  • Added unit tests in crates/victory-gpu/src/pipeline/make.rs covering scene_input, screen priority, and is_bake().

Performance Note

The 8 FPS / 128.8 ms/frame time reported in #19 was measured prior to #18 (batched descriptor copies/releases, bitset dynamic slots, and AVX2 shadow merge, now merged on main), with additional frame-time improvements pending in #15–#17.

Verification

  • cargo clippy --workspace --all-targets --locked -- -D warnings -A deprecated (0 errors; -A deprecated only for pre-existing Atomic*::fetch_update calls under rustc 1.100.0)
  • cargo test --workspace --locked (all tests passed, including new pipeline::make::tests)
  • cargo run -p xtask -- policy (asset policy: 259 files ok)

@HumanlyDev
HumanlyDev merged commit 41f990e into main Nov 26, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Graphics

1 participant