Port face-relocation Wave32 per-wave meetings from cool_fox #378

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

@⁠liuhVIP on GitHub · 2026-11-27 21:42 UTC · original
liuhVIP:codex/port-face-relocation-wave32 → main · +905 −32 · 17 files · 2 commits · open

What this does

Ports the face-relocation Wave32 work from DoubleGhosty/cool_fox into the current NVIDIA fork, adapted to latest main (df2daaf, including PR #58).

The source changes are from:

  • c36f9f4 — lower the face-relocation compute to Wave32 by meeting each console wave on its own.
  • ca7e21a — publish each meet from a single lane, use a volatile wait, and add diagnostics.

The original code is GPL-3.0-or-later and remains under this repository's GPL-3.0-or-later licence.

Why

CS_DefragHeap_ComputeRelocations uses a 128-thread group holding two 64-thread console waves. Its divergent LDS region previously required group-wide synchronization even when only one console wave reached it. That made the default launcher skip the face-relocation compute for performance, which left the face mesh missing while eyes, teeth and hair still rendered.

This change gives each 32-lane host wave its own meet pair:

  • one lane publishes a generation counter;
  • the other half reads it with a volatile LDS load;
  • consecutive reads in one block reuse the same meet;
  • writes still meet so aliasing LDS writes keep their order;
  • a group barrier is still used when every thread reaches the block.

A diagnostic SLOT_MEET UAV records meetings and wait iterations, and VICTORY_DEFRAG=0 provides an off switch for A/B testing.

Integration with current NVIDIA main

The port preserves the fork's existing multi-console-wave pair meetings. The new path is selected only for the known 128-thread face-relocation program, so other shaders keep their current lowering.

Also included:

  • FaceMeshFix launcher option;
  • PLAY_FACES_FIX.cmd [mode 1-6];
  • the F1 label corrected from “decal defrag” to “face relocation”;
  • VICTORY_DEFRAG=0 for comparison runs.

Validation

Merged and tested on top of origin/main at df2daaf.

  • cargo check --workspace — passed.
  • cargo test -p victory-shader --lib — 289 passed, 0 failed, 4 ignored.
  • cargo test -p victory-gpu --lib descriptor — 61 passed, 0 failed, 1 ignored.
  • cargo build --release --locked -p victory — passed.
  • Full shader warm-up: 2957 used pipelines made, 0 failures.
  • Launcher smoke-tested on Windows 11, Ryzen 7 9800X3D, RTX 5090 D 32 GB, GTA VI Xbox build 1.0.2.1.

The GPU timing difference against the old group-barrier path still needs independent measurement on other RTX cards. The PR focuses on correctness and removing the previous need to skip the compute.

**@⁠liuhVIP** on GitHub · 2026-11-27 21:42 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/378) `liuhVIP:codex/port-face-relocation-wave32` → `main` · +905 −32 · 17 files · 2 commits · open ## What this does Ports the face-relocation Wave32 work from `DoubleGhosty/cool_fox` into the current NVIDIA fork, adapted to latest `main` (`df2daaf`, including PR #58). The source changes are from: - `c36f9f4` — lower the face-relocation compute to Wave32 by meeting each console wave on its own. - `ca7e21a` — publish each meet from a single lane, use a volatile wait, and add diagnostics. The original code is GPL-3.0-or-later and remains under this repository's GPL-3.0-or-later licence. ## Why `CS_DefragHeap_ComputeRelocations` uses a 128-thread group holding two 64-thread console waves. Its divergent LDS region previously required group-wide synchronization even when only one console wave reached it. That made the default launcher skip the face-relocation compute for performance, which left the face mesh missing while eyes, teeth and hair still rendered. This change gives each 32-lane host wave its own meet pair: - one lane publishes a generation counter; - the other half reads it with a volatile LDS load; - consecutive reads in one block reuse the same meet; - writes still meet so aliasing LDS writes keep their order; - a group barrier is still used when every thread reaches the block. A diagnostic `SLOT_MEET` UAV records meetings and wait iterations, and `VICTORY_DEFRAG=0` provides an off switch for A/B testing. ## Integration with current NVIDIA main The port preserves the fork's existing multi-console-wave pair meetings. The new path is selected only for the known 128-thread face-relocation program, so other shaders keep their current lowering. Also included: - `FaceMeshFix` launcher option; - `PLAY_FACES_FIX.cmd [mode 1-6]`; - the F1 label corrected from “decal defrag” to “face relocation”; - `VICTORY_DEFRAG=0` for comparison runs. ## Validation Merged and tested on top of `origin/main` at `df2daaf`. - `cargo check --workspace` — passed. - `cargo test -p victory-shader --lib` — 289 passed, 0 failed, 4 ignored. - `cargo test -p victory-gpu --lib descriptor` — 61 passed, 0 failed, 1 ignored. - `cargo build --release --locked -p victory` — passed. - Full shader warm-up: 2957 used pipelines made, 0 failures. - Launcher smoke-tested on Windows 11, Ryzen 7 9800X3D, RTX 5090 D 32 GB, GTA VI Xbox build 1.0.2.1. The GPU timing difference against the old group-barrier path still needs independent measurement on other RTX cards. The PR focuses on correctness and removing the previous need to skip the compute.
Bring the cool_fox face-relocation lowering into the NVIDIA branch, including per-wave LDS meetings, single-lane publication, volatile waits, and diagnostic counters. Preserve the fork's existing multi-wave meeting and DLSS launch paths.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 21:46:51 +00:00
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/host/menu.rs
  • crates/victory-shader/src/emit/lower.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/378/head:github-bot/gh-378'
git switch 'github-bot/gh-378'

Merge

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