Faces Shader #25

Closed
github-bot wants to merge 4 commits from gh-pr/25/head into gh-pr/25/base
Owner

@⁠Davidjc13 on GitHub · 2026-11-26 17:58 UTC · original
Davidjc13:experimental/wave32 → main · +1016 −41 · 14 files · 4 commits · closed without merging

Commit: 9c70815

CS_DefragHeap_ComputeRelocations (02384a60fda6f2d0, 128 threads) lowers to wave 32. Each console wave meets its two halves in shared memory. One lane publishes, the other waits on a volatile load. On an RTX 5060 Ti the shader translates, validates, creates its pipeline, and runs. Closing the window writes a counter line. VICTORY_DEFRAG=0 drops only this compute, so the same scene can be timed with it off.

This branch also contains the six 64-thread computes already lowered on main. 6b82bc7d22016cb5 (CS_CollectTriangles_Meshlets, 1024 threads) still does not translate. The view-heap cap and 8 GB texture pressure are unchanged.

Build

Windows x64, MSVC C++ build tools, a Windows SDK, and an NVIDIA GPU with shader model 6.6 and mesh shaders. Rust is pinned by rust-toolchain.toml (1.98.1). rustup installs it on the first build.

git clone -b experimental/wave32 https://github.com/Davidjc13/cool_fox.git
cd cool_fox
git checkout 9c70815
cargo build --release --locked -p victory

The binary is target\release\victory.exe. Play-VIctory.cmd uses it when victory-3d-rtx-pareto-residency.exe is not sitting next to the script. Do not run target\diag\victory.exe.

Launch

Point VICTORY_GAME_DIR at your own dump, the folder that contains game_scarlett_master.exe. Use a new shader cache so an older f4b48ad cache is not reused. Leave VICTORY_WAVE_PAIR, VICTORY_WAVE_WIDE, and VICTORY_HOST_WAVE unset. Do not set VICTORY_WAVE_PAIR=1.

$env:VICTORY_GAME_DIR = 'D:\path\to\your\dump'
$env:VICTORY_CACHE_DIR = "$env:LOCALAPPDATA\VIctory\cache-wave32"
$env:VICTORY_LOG = 'info'
Remove-Item Env:VICTORY_DEFRAG, Env:VICTORY_WAVE_PAIR, Env:VICTORY_WAVE_WIDE, Env:VICTORY_HOST_WAVE -ErrorAction SilentlyContinue
.\Play-VIctory.cmd pareto-residency *> $env:TEMP\victory-faces.txt

That is Series S, the pareto-residency switches inside the script. Reach the same scene you used before, with both characters on screen, and stay there until the fps line settles (a few samples around the same draw count). Close the window with the title bar. Ending the process from Task Manager skips the counter dump.

What success looks like in the log

shader translated ... hash=02384a60fda6f2d0
host pipeline shaders=[compute 02384a60fda6f2d0]
first bind ... hash=02384a60fda6f2d0 after that translation. A bind that follows does not translate is the dropped pipeline, not a success.
Faces move on both characters. A stippled static face means the compute did not run.
No DEVICE_HUNG, no 0x887A.
On close, one line:

CS_DefragHeap_ComputeRelocations counters ... sites=97 lds_reads=11 lds_writes=6 ... iterations_per_meeting="1.00" wait_atomics=0

6b82bc7d22016cb5 still logs does not translate. That is expected.

Same scene with the compute off

$env:VICTORY_DEFRAG = '0'
.\Play-VIctory.cmd pareto-residency *> $env:TEMP\victory-faces-off.txt

02384a60fda6f2d0 logs does not translate, and the counter line is all zeros. Compare on the GPU in the fps lines at a similar draws/frame. On the 5060 Ti, off was about 3–18 ms of GPU and 16–18 fps once the world was up (~5200 draws, 56–65 ms/frame). On was about 23–40 ms of GPU and 13–15 fps (about 70 ms/frame). The extra GPU time is this dispatch. Your 5070 numbers will differ. Please paste both.

Please send back

GPU, driver, RAM, and the commit (git rev-parse --short HEAD should be 9c70815).
Two fps lines from each run, once the draw count has settled: the whole N fps, … on the GPU … draws/frame line.
The counter line from the run with defrag left on.
Whether both faces animate, and whether the log contains DEVICE_HUNG or 0x887A.
**@⁠Davidjc13** on GitHub · 2026-11-26 17:58 UTC · [original](https://github.com/DoubleGhosty/cool_fox/pull/25) `Davidjc13:experimental/wave32` → `main` · +1016 −41 · 14 files · 4 commits · closed without merging Commit: 9c70815 CS_DefragHeap_ComputeRelocations (02384a60fda6f2d0, 128 threads) lowers to wave 32. Each console wave meets its two halves in shared memory. One lane publishes, the other waits on a volatile load. On an RTX 5060 Ti the shader translates, validates, creates its pipeline, and runs. Closing the window writes a counter line. VICTORY_DEFRAG=0 drops only this compute, so the same scene can be timed with it off. This branch also contains the six 64-thread computes already lowered on main. 6b82bc7d22016cb5 (CS_CollectTriangles_Meshlets, 1024 threads) still does not translate. The view-heap cap and 8 GB texture pressure are unchanged. Build Windows x64, MSVC C++ build tools, a Windows SDK, and an NVIDIA GPU with shader model 6.6 and mesh shaders. Rust is pinned by rust-toolchain.toml (1.98.1). rustup installs it on the first build. git clone -b experimental/wave32 https://github.com/Davidjc13/cool_fox.git cd cool_fox git checkout 9c70815 cargo build --release --locked -p victory The binary is target\release\victory.exe. Play-VIctory.cmd uses it when victory-3d-rtx-pareto-residency.exe is not sitting next to the script. Do not run target\diag\victory.exe. Launch Point VICTORY_GAME_DIR at your own dump, the folder that contains game_scarlett_master.exe. Use a new shader cache so an older f4b48ad cache is not reused. Leave VICTORY_WAVE_PAIR, VICTORY_WAVE_WIDE, and VICTORY_HOST_WAVE unset. Do not set VICTORY_WAVE_PAIR=1. $env:VICTORY_GAME_DIR = 'D:\path\to\your\dump' $env:VICTORY_CACHE_DIR = "$env:LOCALAPPDATA\VIctory\cache-wave32" $env:VICTORY_LOG = 'info' Remove-Item Env:VICTORY_DEFRAG, Env:VICTORY_WAVE_PAIR, Env:VICTORY_WAVE_WIDE, Env:VICTORY_HOST_WAVE -ErrorAction SilentlyContinue .\Play-VIctory.cmd pareto-residency *> $env:TEMP\victory-faces.txt That is Series S, the pareto-residency switches inside the script. Reach the same scene you used before, with both characters on screen, and stay there until the fps line settles (a few samples around the same draw count). Close the window with the title bar. Ending the process from Task Manager skips the counter dump. What success looks like in the log shader translated ... hash=02384a60fda6f2d0 host pipeline shaders=[compute 02384a60fda6f2d0] first bind ... hash=02384a60fda6f2d0 after that translation. A bind that follows does not translate is the dropped pipeline, not a success. Faces move on both characters. A stippled static face means the compute did not run. No DEVICE_HUNG, no 0x887A. On close, one line: CS_DefragHeap_ComputeRelocations counters ... sites=97 lds_reads=11 lds_writes=6 ... iterations_per_meeting="1.00" wait_atomics=0 6b82bc7d22016cb5 still logs does not translate. That is expected. Same scene with the compute off $env:VICTORY_DEFRAG = '0' .\Play-VIctory.cmd pareto-residency *> $env:TEMP\victory-faces-off.txt 02384a60fda6f2d0 logs does not translate, and the counter line is all zeros. Compare on the GPU in the fps lines at a similar draws/frame. On the 5060 Ti, off was about 3–18 ms of GPU and 16–18 fps once the world was up (~5200 draws, 56–65 ms/frame). On was about 23–40 ms of GPU and 13–15 fps (about 70 ms/frame). The extra GPU time is this dispatch. Your 5070 numbers will differ. Please paste both. Please send back GPU, driver, RAM, and the commit (git rev-parse --short HEAD should be 9c70815). Two fps lines from each run, once the draw count has settled: the whole N fps, … on the GPU … draws/frame line. The counter line from the run with defrag left on. Whether both faces animate, and whether the log contains DEVICE_HUNG or 0x887A.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 06:07:03 +00:00
github-bot closed this pull request 2026-11-27 06:07:03 +00:00
Author
Owner

@⁠Davidjc13 on GitHub · 2026-11-26 18:01 UTC · original

Tested on:
CPU: Ryzen 5 9600X
GPU: Nvidia RTX 5060 Ti 16GB VRAM
RAM: 64GB DDR5 CL30 (4x16GB)

Gameplay was around 18FPS but drops to 5-8FPS

@⁠DoubleGhosty Can you test on your PC?

It would help to know about perfomance and also am doing A/B testing on defrag.

**@⁠Davidjc13** on GitHub · 2026-11-26 18:01 UTC · [original](https://github.com/DoubleGhosty/cool_fox/pull/25#issuecomment-7199964117) Tested on: CPU: Ryzen 5 9600X GPU: Nvidia RTX 5060 Ti 16GB VRAM RAM: 64GB DDR5 CL30 (4x16GB) Gameplay was around 18FPS but drops to 5-8FPS @⁠DoubleGhosty Can you test on your PC? It would help to know about perfomance and also am doing A/B testing on defrag.
Author
Owner

@⁠rafaconvaitis on GitHub · 2026-11-26 19:10 UTC · original

RTX 4070 12 GB, Windows 11, Series S, driver 32.0.16.1664. I tested a narrow opt-in port of your face shader on Cool Fox c3e5c375 as part of an integrated renderer build.

Offline Wave32 validation of 02384a60fda6f2d0 with the portable gate disabled produced zero DXIL outputs and zero PSOs. Enabled, it produced one DXIL shader, passed validation and created one D3D12 pipeline. Instrumentation reported 97 meeting sites, 11 LDS reads and six LDS writes.

The game loaded the boat checkpoint, logged the new host pipeline, and continued rendering after 8,588 dispatch submissions of this shader. Both characters were detailed in the boat cutscene. One earlier frame still showed a low-detail player mesh. There was no device-removal event in this first 14-minute observation.

At Follow the plane, the integrated build logged 14.80 median FPS, 16.20 ms GPU and 3,709 draws per frame over one minute. The earlier local build without the face pipeline was at 14.90 FPS, 1.50 ms GPU and 3,571 draws in the same area with missing effects. The integrated build also changed texture residency, buffer windows and legacy shader math. The frame-time difference cannot be attributed to the face kernel from this pair.

**@⁠rafaconvaitis** on GitHub · 2026-11-26 19:10 UTC · [original](https://github.com/DoubleGhosty/cool_fox/pull/25#issuecomment-7201273799) RTX 4070 12 GB, Windows 11, Series S, driver `32.0.16.1664`. I tested a narrow opt-in port of your face shader on Cool Fox `c3e5c375` as part of an integrated renderer build. Offline Wave32 validation of `02384a60fda6f2d0` with the portable gate disabled produced zero DXIL outputs and zero PSOs. Enabled, it produced one DXIL shader, passed validation and created one D3D12 pipeline. Instrumentation reported 97 meeting sites, 11 LDS reads and six LDS writes. The game loaded the boat checkpoint, logged the new host pipeline, and continued rendering after **8,588 dispatch submissions** of this shader. Both characters were detailed in the boat cutscene. One earlier frame still showed a low-detail player mesh. There was no device-removal event in this first 14-minute observation. At **Follow the plane**, the integrated build logged 14.80 median FPS, 16.20 ms GPU and 3,709 draws per frame over one minute. The earlier local build without the face pipeline was at 14.90 FPS, 1.50 ms GPU and 3,571 draws in the same area with missing effects. The integrated build also changed texture residency, buffer windows and legacy shader math. The frame-time difference cannot be attributed to the face kernel from this pair.
Author
Owner

@⁠DoubleGhosty on GitHub · 2026-11-26 22:52 UTC · original

All 4 commits from this PR (bab1267, 3f53be9, 54cb6ac, 9c70815) have been cherry-picked and integrated onto main (commits ebf9299d..72944b1f) with conflicts resolved and verified against workspace clippy (-D warnings) and all 297 victory-shader tests. Closing this PR as merged via cherry-pick. Thanks @⁠Davidjc13!

**@⁠DoubleGhosty** on GitHub · 2026-11-26 22:52 UTC · [original](https://github.com/DoubleGhosty/cool_fox/pull/25#issuecomment-7205061027) All 4 commits from this PR (bab1267, 3f53be9, 54cb6ac, 9c70815) have been cherry-picked and integrated onto main (commits ebf9299d..72944b1f) with conflicts resolved and verified against workspace clippy (-D warnings) and all 297 victory-shader tests. Closing this PR as merged via cherry-pick. Thanks @⁠Davidjc13!

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.