Repository navigation
fix(gpu): prioritize all ped head, facial graph, skinning, and bake pipelines - #21
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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):
crates/victory-gpu/src/pipeline/make.rs):scene_input()previously only matched 6 hardcoded hashes (covering 3 of 8ped_standard_head_csshaders, 1 of 16ped_skinning_csshaders, and 0 of 65compute_graph_opsfacial deformation shaders). On a cold or partial pipeline cache, hundreds of world pipelines exhaust the shared 500 mswait_budget(), causing the remaining blendshape mapping, stretch, neural facial graph, and skinning compute producers to be dropped on their first frames.BakeDecorationsdetection (crates/victory-gpu/src/pipeline.rs,host.rs,make.rs):is_bake_shaderpreviously matched only 1 of 32MSNC_VS_BakeDecorationsmesh shader permutations by hash, andBakeDecorationsmesh pipelines did not receivescreenworker /screen_budgetpriority on first use.Changes
Shader::container_hasandShader::is_bakeincrates/victory-gpu/src/pipeline.rsand usedShader::is_bakeincrates/victory-gpu/src/pipeline/host.rs.scene_input()incrates/victory-gpu/src/pipeline/make.rsto match all ped head blendshape/stretch, ped skinning, and facial compute-graph compute shaders by embedded shader name, and gaveBakeDecorationsmesh pipelinesscreenpriority on first use.crates/victory-gpu/src/pipeline/make.rscoveringscene_input,screenpriority, andis_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 deprecatedonly for pre-existingAtomic*::fetch_updatecalls underrustc 1.100.0)cargo test --workspace --locked(all tests passed, including newpipeline::make::tests)cargo run -p xtask -- policy(asset policy: 259 files ok)