feat(diagnostics): load matching paired Wave32 shaders #4

Manually merged
github merged 1 commit from github-bot/gh-4 into main 2026-11-26 15:34:30 +00:00 AGit
Owner

@⁠jeremygold02 on GitHub · 2026-11-26 15:20 UTC · original
jeremygold02:codex/paired-wave32 → main · +43 −1 · 2 files · 1 commits · merged 2026-11-26 15:33 UTC

Summary

Add opt-in loading of compatible paired Wave32 compute shader bytecode from a local directory in diagnostics builds. This lets NVIDIA testers exercise a paired translator's output on selected shaders while keeping VIctory's normal translation and binding metadata as the reference.

How it works

  • VICTORY_PAIRED_SHADER_DIR enables the lookup on the supported 32-lane host configuration with a 1,000,000-slot view heap. Entries are named <16-digit-shader-hash>.vsh, using the hash of the original shader container.
  • The normal translation runs or is read from the usual cache first. The importer reads the older VSH1 entry format, compares its binding metadata with the normal translation, and substitutes only the compute DXIL payload when they match and the payload has a DXBC container signature.
  • An unset option, unsupported host configuration, missing entry, or rejected entry uses the normal shader. Accepted entries are logged at info level. Incompatible entries produce a warning. The normal translation cache continues to store the original translation.
  • The diff contains the loader and documentation. The paired entries are supplied locally by the tester.

How to try it

Build the diagnostics executable and pass the local shader directory through the launcher:

cargo build --locked --profile diag -p victory --features diagnostics
.\scripts\play-nvidia.ps1 -Exe 'C:\path\to\title.exe' -NoSmoothMotion -Adapter '5070' -More @{
    VICTORY_PAIRED_SHADER_DIR = 'C:\path\to\paired'
}

The launcher defaults to Series S. Set $env:RUST_LOG = 'warn,victory_gpu::shader_cache=info' before launching to see individual accepted entries.

Validation

  • cargo build --locked --profile diag -p victory --features diagnostics and cargo check --locked --release -p victory passed on Windows.
  • On the PR build, victory translate --warm accepted all seven matching local entries. With the option unset, the file missing, the bindings incompatible, or the VSH1 entry malformed, the reference shader was still available through the normal path.
  • git diff --check passed.

Hardware and runtime setup. NVIDIA GeForce RTX 5070 (12 GB VRAM), NVIDIA driver 621.01, Intel Core Ultra 7 265K, 32 GB system RAM, Windows 11 Home (build 26200), Series S preset at 540p internal resolution.

The local checkpoint with the same loader code accepted four matching entries during Series S startup and rendered in-engine prologue frames. A prior warm-cache session reached roughly 8–10 FPS in parts of the prologue. A later run under memory pressure spent much of the observation window below 1 FPS and loaded a different scene. These observations verify that the paired payload path was exercised. An FPS or rendering-quality comparison still needs paired-on and paired-off runs in the same scene under comparable memory conditions.

**@⁠jeremygold02** on GitHub · 2026-11-26 15:20 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4) `jeremygold02:codex/paired-wave32` → `main` · +43 −1 · 2 files · 1 commits · merged 2026-11-26 15:33 UTC ## Summary Add opt-in loading of compatible paired Wave32 compute shader bytecode from a local directory in diagnostics builds. This lets NVIDIA testers exercise a paired translator's output on selected shaders while keeping VIctory's normal translation and binding metadata as the reference. ## How it works - `VICTORY_PAIRED_SHADER_DIR` enables the lookup on the supported 32-lane host configuration with a 1,000,000-slot view heap. Entries are named `<16-digit-shader-hash>.vsh`, using the hash of the original shader container. - The normal translation runs or is read from the usual cache first. The importer reads the older VSH1 entry format, compares its binding metadata with the normal translation, and substitutes only the compute DXIL payload when they match and the payload has a DXBC container signature. - An unset option, unsupported host configuration, missing entry, or rejected entry uses the normal shader. Accepted entries are logged at info level. Incompatible entries produce a warning. The normal translation cache continues to store the original translation. - The diff contains the loader and documentation. The paired entries are supplied locally by the tester. ## How to try it Build the diagnostics executable and pass the local shader directory through the launcher: ```powershell cargo build --locked --profile diag -p victory --features diagnostics .\scripts\play-nvidia.ps1 -Exe 'C:\path\to\title.exe' -NoSmoothMotion -Adapter '5070' -More @{ VICTORY_PAIRED_SHADER_DIR = 'C:\path\to\paired' } ``` The launcher defaults to Series S. Set `$env:RUST_LOG = 'warn,victory_gpu::shader_cache=info'` before launching to see individual accepted entries. ## Validation - `cargo build --locked --profile diag -p victory --features diagnostics` and `cargo check --locked --release -p victory` passed on Windows. - On the PR build, `victory translate --warm` accepted all seven matching local entries. With the option unset, the file missing, the bindings incompatible, or the VSH1 entry malformed, the reference shader was still available through the normal path. - `git diff --check` passed. **Hardware and runtime setup.** NVIDIA GeForce RTX 5070 (12 GB VRAM), NVIDIA driver 621.01, Intel Core Ultra 7 265K, 32 GB system RAM, Windows 11 Home (build 26200), Series S preset at 540p internal resolution. The local checkpoint with the same loader code accepted four matching entries during Series S startup and rendered in-engine prologue frames. A prior warm-cache session reached roughly 8–10 FPS in parts of the prologue. A later run under memory pressure spent much of the observation window below 1 FPS and loaded a different scene. These observations verify that the paired payload path was exercised. An FPS or rendering-quality comparison still needs paired-on and paired-off runs in the same scene under comparable memory conditions.
Allow local paired compute bytecode on the supported Wave32 host when the normal translation confirms that the shader bindings match. Keep the normal translator and cache as the fallback.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 15:22:11 +00:00
github manually merged commit 0ef2b99370 into main 2026-11-26 15:34:30 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.