Shaders: wave64 programs in a paired form on 32-lane GPUs, mesh programs over 32 KiB linked with their pixel program, and more (230 more programs pass) #854

Open
github-bot wants to merge 7 commits from github-bot/gh-854 into main AGit
Owner

@⁠PiloteCode on GitHub · 2026-11-25 10:47 UTC · original
PiloteCode:pr/shaders → main · +4658 −1355 · 28 files · 7 commits · open

Based on 9376fd6. 230 more of the title's shader programs translate, validate and get a pipeline on a GPU with 32-lane waves. 36 compute programs that ran in an approximate per-half form now compute what the console's 64 lanes compute.

Stage main (9376fd6), pass / fail This PR, pass / fail
Compute 2,695 / 39 2,729 / 5
Mesh 8,657 / 108 8,694 / 71
Pixel 11,947 / 120 12,067 / 0
Vertex 2,153 / 39 2,192 / 0
Geometry 0 / 195 0 / 195
All 25,452 / 501 25,682 / 271

victory translate --validate --pipelines --list over the title's whole shader pack, RTX 5090 (32-lane waves), VICTORY_HOST_MAX_WAVE=32. A program passes when it translates, validates, and its pipeline is created (with a stub for the other stage). What is left:

  • 71 mesh programs whose outputs pass 32 KiB when translated alone. Linked with their pixel program for a pipeline (see below), they validate.
  • The 195 geometry stages, which are the unused voxel ones.
  • Five shadow-mask trace programs (a descriptor read only as data).

What changes

Wave64 compute programs on 32-lane GPUs: a paired form (emit/mod.rs, emit/lower.rs, emit/wave.rs)

On a host with 32-lane waves (NVIDIA), some console wave64 compute programs still asked for WaveSize(64). The host refuses that, so their dispatches were dropped every frame. Others ran in the per-half forms, where each half-wave counts, ORs or elects over its own 32 lanes. That is approximate: a tile-wide result becomes two half-tile ones.

The paired form runs each console wave as one host wave of 32 threads, each thread two console lanes (n and n + 32):

  • Every per-lane branch is taken by the whole wave, with EXEC kept as each lane's guard.
  • What a lane does is lowered once for each of its two lanes, in the console's order, with a fence between LDS accesses.
  • Lane reads, permutes, lane masks and wave reductions take both halves through the host wave's own operations.
  • No barrier stands in a branch.

When the form is tried:

  • After every other form, for a program the host refuses or that does not translate. When it went in, this gave pipelines to 28 compute programs: screen-space tracing tiles, GPU particles, decal trails, triangle clipping, hair shadow masks, alpha resolve, three structure-builder programs and a cascade shadow program.
  • Before an approximate per-half form, for a program that such a form takes. 36 run in the paired form now, all validated and given a pipeline on the RTX 5090. They include shadow-mask tiles and traces, temporal resolves, irradiance-cache and fallback lighting, light clustering, scattering gathers, decal and fire resolves, the light atlas and a lens-flare scan.

Three other lens-flare scans are the allocation idiom with a multiply-add base (v_mad_u32_u24). idiom::wave_local now knows that idiom, so these three keep their per-half form, which is exact for them and cheaper. The paired form changes no program other than these.

Cost: a paired program is about 2.9 times the DXIL size of its per-half form, run at half the threads. It has not been timed in a run yet.

71 of the title's mesh programs (pedestrian, vehicle and prop transforms with fire, spatter, decal and transmission variants) declare 65 to 71 output components for 128 vertices. That is 33,280 to 36,352 bytes, past the 32 KiB that D3D12 allows. The validator refuses them; NVIDIA's driver builds them anyway. No pixel program reads them all: the one that reads most reads 55 components.

emit::link_mesh translates a mesh program and the pixel program drawn with it again, for their pipeline:

  • The mesh program declares and stores only the outputs the pixel program reads, plus its system values.
  • The pixel program leaves out the inputs it never reads. D3D12 refuses a pixel input that the mesh stage does not write, whether it is read or not.

The signatures stay whole while a program is lowered: what is left out goes at the end, and the ids of loads and stores count only what is kept. The result is None in three cases: the mesh program fits, the linked pair still does not fit, or a linked translation binds differently from its shared one. emit::mesh_fits tells a mesh program over the limit from its DXIL.

HostPipeline (pipeline/host.rs) makes a mesh pipeline whose mesh program does not fit from the linked pair:

  • The pair is made once (both programs translated again, in memory; the pipeline library keeps the pipeline).
  • It binds as the shared translations do, so the root signature and the bindings are unchanged.
  • Where a pair does not link, the pipeline is made as before.

victory translate with VICTORY_PAIRS links such pairs as the runtime does and validates both programs. It now keeps only the shaders that the pairs name; before, it kept every emitted shader. Offline, two sets of pairs link, validate and get a pipeline on the RTX 5090:

  • 710 pairs: each of the 71 programs with the ten signature-compatible pixel programs that read most of its outputs.
  • The three pairs drawn in game runs so far.

Smaller fixes

The program counts in this list were taken on our tree when each fix went in. The table above is the measure against main.

  • One interpolation mode per signature register (container.rs, mod.rs, rect.rs). A float that the console declared nointerpolation took the default linear mode when it shared a register with an integer or the front face, and the validator refused the two modes. 70 programs failed this way: 21 mesh, 13 vertex, 36 pixel. In a register whose modes differ, the elements whose mode is fixed now give it to the others.
  • Signature rows in the validator's order. The rows of one register now follow the element order, not the column order (72 vertex, mesh and pixel programs). A level-of-detail query of an array texture leaves the layer undefined.
  • An immediate sampler chosen by a uniform branch. The block where the two ways meet is copied for each way in (ir::split_joins). This fixes the terrain programs.
  • Pixel programs ordered by primitive (POPS). The program goes past the console's wait on src_pops_exiting_wave_id (ir::without_pops_wait), and its heap UAVs become rasterizer-ordered views. This fixes ten cut-out programs.
  • A 16-bit write over a first interpolation half. Where v_fma_mix* writes half of a register that holds a first interpolation half, the half it keeps reads as zero (eight deferred and decal programs).
  • Whole-wave sections that a jump splits are joined into one block (ir::whole_sections). Two reductions can share their end block, as in the water optical depth program.
  • 64-bit floats and their wave sums (float64.rs). Five water volumetrics programs count their lanes in doubles (a wave sum of 1.0 over dword pairs, then a conversion back to a float). Both dwords of a sum now come from one host wave operation, which also works in the paired form. v_add_f64, v_mul_f64 and v_cvt_f64_f32 are lowered too; they declare the Doubles feature, which is dropped again where the clean-up removes every double.
  • A subtraction on group-shared memory is a compare-exchange loop. NVIDIA's compiler refuses the whole pipeline (E_OUTOFMEMORY) for an LDS atomic add of the negation of a value that is not a constant, and for an LDS atomic subtract; DXC's own InterlockedAdd(g, -x) fails the same way. ds_sub and ds_add of 0 - x now go through the loop that the LDS float minimum and maximum already used. The weather particle update gets a pipeline.
  • A parked lane mask comes back whole when its lanes also hold single scalars (ir::with_shared_slots). Before, the mask came back as two s_mov_b32 that the structurisation could not see into. This fixes the voxelization program.
  • Loops of programs that test rays against tree nodes stop at 1,024 iterations. The limit was 4,096, the compute limit. With the title's structure builder off, a ray's walk into a tree of moving objects follows whatever memory holds. In timing runs of the opening of the gameplay, the shadow mask took 11.7 ms a frame before and 2.4 ms after. A ray stopped either way leaves the program as killed, as before.
  • File sizes. The allocation-idiom check (idiom.rs), descriptors read as data (descriptor_data.rs) and 64-bit floats (float64.rs) move out of lower.rs unchanged. This keeps lower.rs (501,927 bytes) under the asset policy's 512 KiB a file.

Where this replaces code already on main

Some of these features were also written on main in parallel, in another way. This PR keeps one implementation of each:

  • 64-bit floats (3bff182, 31714de). The wave sum replaces Red64F/ActiveF64, which summed each dword on its own. The IEEE v_cvt_f32_f64 on integers from main stays, along with main's operand reader, plus the hardware's double for inline constant 248. The unused flush-to-zero twin and its ignored test are left out. They can be put back if they are still wanted until the console's float mode is checked.
  • Descriptors read only for their size (unused_descriptor_kind, a26859f). The helper from main stays, with what each side handled. A buffer that has a used-resource entry now gets the title's view, structured where its elements are whole dwords, not a raw view. On the RTX 5090, a raw handle of a structured view of 9 records of 16 bytes answered 2 records. VICTORY_DESC_WHY stays.
  • First interpolation halves. interp no longer writes 0 for every first half (v_interp_p1_f32, v_interp_p1ll_f16). With that write, 59 pixel programs that already translated came out changed (a join carried the zeroes into the shading), and no program more translated. Here those 59 translate as they did before that write. The retry with first-half pairs (with_first_half_pairs) stays.
  • v_permlane16/v_permlanex16. The joined whole-wave sections are tried first for a program whose permutes no followed section holds. On the console those sections read every lane, and a lane outside the saved mask reads with the reduction's identity. Elsewhere main's lowering of the permutes stands.

Switches

  • VICTORY_WAVE_PAIRS=0: no paired form. Programs go back to the per-half forms, or are refused as before. The value joins the shader cache key, as every VICTORY_* switch the shader crate reads does.
  • VICTORY_MESH_LINK=0: oversized mesh pipelines are made from the shared translations, as before. This switch is read by the pipeline layer, not the translator, so it is not part of the cache key. Linked pairs are never cached on disk.
  • VICTORY_WAVE_WHY=1 (an existing switch): now also prints to stderr what the paired form gave for each program it was tried on.
  • VICTORY_SHADER_LOOP_LIMIT=<n>: as before, one limit for every loop, which overrides the 1,024 of ray-testing loops.

Documentation

  • README: four lines in the summary (the pack's numbers, the paired form, linked mesh pipelines, the smaller fixes), and VICTORY_MESH_LINK in the table of switches.
  • docs/fork-ray-tracing.md: all 52 builder programs translate, three of them in the paired form. Switched on, the builder still crashes the title about 80 s into the gameplay.

Tested

RTX 5090 (32 GB), Intel i9-14900KF, Windows 11. The branch was checked as it is, on 9376fd6:

  • cargo test -p victory-shader -p victory-gpu, on the card:
    • victory-shader: 242 passed, 2 ignored (a benchmark, and a test that main already ignores). The same list runs with --all-features.
    • victory-gpu: 144 passed, 3 ignored (benchmarks and measurements).
  • cargo test -p victory: passed.
  • cargo clippy --workspace --all-targets --locked -- -D warnings, and the same with --all-features: clean. The first commit fixes the three lints that make CI fail on 9376fd6 (draw.rs, indirect.rs, resource.rs). The GPU and runtime pull requests start with the same commit, so the three PRs merge in any order.
  • cargo build --release -p victory, cargo build --profile diag -p victory --features diagnostics and cargo xtask policy pass.

There are 27 new tests. Those of the paired form run on the card against what the console's 64 lanes give: paired lanes sharing LDS and lanes across halves, looping apart, permuting, ORing inside a lane branch, summing halves as the console's tree, a wave value used past a lane branch. The others cover the linked signatures (validated), the LDS subtraction loop (it was refused before, and is now atomic), the shared parking slots, the joined sections, the split joins, the POPS wait, the interpolation modes and row order, and the descriptor sizes on the card and on WARP.

In game runs of our tree, which also had the layer changes of the companion GPU PR:

  • With the paired form, no compute pipeline was refused in play. The rectangles of an older picture that showed in the opening cutscene were gone.
  • After the second round of fixes, no pipeline was refused and no shader failed to translate in the whole opening cutscene.

Overlaps with open pull requests

  • #25 (immediate samplers chosen by uniform control flow) and #699 (signature rows and one interpolation mode per row) touch some of the same programs in other ways. Whichever goes in first, the other's part of lower.rs or container.rs will need a look.
  • #823 (NVIDIA 32-lane waves) gives pipelines to some of the same refused compute programs.

Not tested

  • GPUs with 64-lane waves (AMD), where the paired form is never taken.
  • Intel GPUs, the Series S profile, and Linux/Proton.
  • The frame-time cost of the paired programs.
**@⁠PiloteCode** on GitHub · 2026-11-25 10:47 UTC · [original](https://github.com/fxceless/victory-fork/pull/854) `PiloteCode:pr/shaders` → `main` · +4658 −1355 · 28 files · 7 commits · open Based on `9376fd6`. 230 more of the title's shader programs translate, validate and get a pipeline on a GPU with 32-lane waves. 36 compute programs that ran in an approximate per-half form now compute what the console's 64 lanes compute. | Stage | `main` (9376fd6), pass / fail | This PR, pass / fail | |---|---|---| | Compute | 2,695 / 39 | 2,729 / 5 | | Mesh | 8,657 / 108 | 8,694 / 71 | | Pixel | 11,947 / 120 | 12,067 / 0 | | Vertex | 2,153 / 39 | 2,192 / 0 | | Geometry | 0 / 195 | 0 / 195 | | **All** | **25,452 / 501** | **25,682 / 271** | `victory translate --validate --pipelines --list` over the title's whole shader pack, RTX 5090 (32-lane waves), `VICTORY_HOST_MAX_WAVE=32`. A program passes when it translates, validates, and its pipeline is created (with a stub for the other stage). What is left: - 71 mesh programs whose outputs pass 32 KiB when translated alone. Linked with their pixel program for a pipeline (see below), they validate. - The 195 geometry stages, which are the unused voxel ones. - Five shadow-mask trace programs (a descriptor read only as data). ## What changes ### Wave64 compute programs on 32-lane GPUs: a paired form (`emit/mod.rs`, `emit/lower.rs`, `emit/wave.rs`) On a host with 32-lane waves (NVIDIA), some console wave64 compute programs still asked for `WaveSize(64)`. The host refuses that, so their dispatches were dropped every frame. Others ran in the per-half forms, where each half-wave counts, ORs or elects over its own 32 lanes. That is approximate: a tile-wide result becomes two half-tile ones. The paired form runs each console wave as one host wave of 32 threads, each thread two console lanes (n and n + 32): - Every per-lane branch is taken by the whole wave, with EXEC kept as each lane's guard. - What a lane does is lowered once for each of its two lanes, in the console's order, with a fence between LDS accesses. - Lane reads, permutes, lane masks and wave reductions take both halves through the host wave's own operations. - No barrier stands in a branch. When the form is tried: - After every other form, for a program the host refuses or that does not translate. When it went in, this gave pipelines to 28 compute programs: screen-space tracing tiles, GPU particles, decal trails, triangle clipping, hair shadow masks, alpha resolve, three structure-builder programs and a cascade shadow program. - Before an approximate per-half form, for a program that such a form takes. 36 run in the paired form now, all validated and given a pipeline on the RTX 5090. They include shadow-mask tiles and traces, temporal resolves, irradiance-cache and fallback lighting, light clustering, scattering gathers, decal and fire resolves, the light atlas and a lens-flare scan. Three other lens-flare scans are the allocation idiom with a multiply-add base (`v_mad_u32_u24`). `idiom::wave_local` now knows that idiom, so these three keep their per-half form, which is exact for them and cheaper. The paired form changes no program other than these. Cost: a paired program is about 2.9 times the DXIL size of its per-half form, run at half the threads. It has not been timed in a run yet. ### Mesh programs over D3D12's 32 KiB: linked with their pixel program (`emit/link.rs`, `pipeline/host.rs`, `apps/victory/src/translate.rs`) 71 of the title's mesh programs (pedestrian, vehicle and prop transforms with fire, spatter, decal and transmission variants) declare 65 to 71 output components for 128 vertices. That is 33,280 to 36,352 bytes, past the 32 KiB that D3D12 allows. The validator refuses them; NVIDIA's driver builds them anyway. No pixel program reads them all: the one that reads most reads 55 components. `emit::link_mesh` translates a mesh program and the pixel program drawn with it again, for their pipeline: - The mesh program declares and stores only the outputs the pixel program reads, plus its system values. - The pixel program leaves out the inputs it never reads. D3D12 refuses a pixel input that the mesh stage does not write, whether it is read or not. The signatures stay whole while a program is lowered: what is left out goes at the end, and the ids of loads and stores count only what is kept. The result is `None` in three cases: the mesh program fits, the linked pair still does not fit, or a linked translation binds differently from its shared one. `emit::mesh_fits` tells a mesh program over the limit from its DXIL. `HostPipeline` (`pipeline/host.rs`) makes a mesh pipeline whose mesh program does not fit from the linked pair: - The pair is made once (both programs translated again, in memory; the pipeline library keeps the pipeline). - It binds as the shared translations do, so the root signature and the bindings are unchanged. - Where a pair does not link, the pipeline is made as before. `victory translate` with `VICTORY_PAIRS` links such pairs as the runtime does and validates both programs. It now keeps only the shaders that the pairs name; before, it kept every emitted shader. Offline, two sets of pairs link, validate and get a pipeline on the RTX 5090: - 710 pairs: each of the 71 programs with the ten signature-compatible pixel programs that read most of its outputs. - The three pairs drawn in game runs so far. ### Smaller fixes The program counts in this list were taken on our tree when each fix went in. The table above is the measure against `main`. - **One interpolation mode per signature register** (`container.rs`, `mod.rs`, `rect.rs`). A float that the console declared `nointerpolation` took the default linear mode when it shared a register with an integer or the front face, and the validator refused the two modes. 70 programs failed this way: 21 mesh, 13 vertex, 36 pixel. In a register whose modes differ, the elements whose mode is fixed now give it to the others. - **Signature rows in the validator's order.** The rows of one register now follow the element order, not the column order (72 vertex, mesh and pixel programs). A level-of-detail query of an array texture leaves the layer undefined. - **An immediate sampler chosen by a uniform branch.** The block where the two ways meet is copied for each way in (`ir::split_joins`). This fixes the terrain programs. - **Pixel programs ordered by primitive (POPS).** The program goes past the console's wait on `src_pops_exiting_wave_id` (`ir::without_pops_wait`), and its heap UAVs become rasterizer-ordered views. This fixes ten cut-out programs. - **A 16-bit write over a first interpolation half.** Where `v_fma_mix*` writes half of a register that holds a first interpolation half, the half it keeps reads as zero (eight deferred and decal programs). - **Whole-wave sections that a jump splits are joined into one block** (`ir::whole_sections`). Two reductions can share their end block, as in the water optical depth program. - **64-bit floats and their wave sums** (`float64.rs`). Five water volumetrics programs count their lanes in doubles (a wave sum of 1.0 over dword pairs, then a conversion back to a float). Both dwords of a sum now come from one host wave operation, which also works in the paired form. `v_add_f64`, `v_mul_f64` and `v_cvt_f64_f32` are lowered too; they declare the Doubles feature, which is dropped again where the clean-up removes every double. - **A subtraction on group-shared memory is a compare-exchange loop.** NVIDIA's compiler refuses the whole pipeline (E_OUTOFMEMORY) for an LDS atomic add of the negation of a value that is not a constant, and for an LDS atomic subtract; DXC's own `InterlockedAdd(g, -x)` fails the same way. `ds_sub` and `ds_add` of `0 - x` now go through the loop that the LDS float minimum and maximum already used. The weather particle update gets a pipeline. - **A parked lane mask comes back whole when its lanes also hold single scalars** (`ir::with_shared_slots`). Before, the mask came back as two `s_mov_b32` that the structurisation could not see into. This fixes the voxelization program. - **Loops of programs that test rays against tree nodes stop at 1,024 iterations.** The limit was 4,096, the compute limit. With the title's structure builder off, a ray's walk into a tree of moving objects follows whatever memory holds. In timing runs of the opening of the gameplay, the shadow mask took 11.7 ms a frame before and 2.4 ms after. A ray stopped either way leaves the program as killed, as before. - **File sizes.** The allocation-idiom check (`idiom.rs`), descriptors read as data (`descriptor_data.rs`) and 64-bit floats (`float64.rs`) move out of `lower.rs` unchanged. This keeps `lower.rs` (501,927 bytes) under the asset policy's 512 KiB a file. ### Where this replaces code already on `main` Some of these features were also written on `main` in parallel, in another way. This PR keeps one implementation of each: - **64-bit floats** (3bff182, 31714de). The wave sum replaces `Red64F`/`ActiveF64`, which summed each dword on its own. The IEEE `v_cvt_f32_f64` on integers from `main` stays, along with `main`'s operand reader, plus the hardware's double for inline constant 248. The unused flush-to-zero twin and its ignored test are left out. They can be put back if they are still wanted until the console's float mode is checked. - **Descriptors read only for their size** (`unused_descriptor_kind`, a26859f). The helper from `main` stays, with what each side handled. A buffer that has a used-resource entry now gets the title's view, structured where its elements are whole dwords, not a raw view. On the RTX 5090, a raw handle of a structured view of 9 records of 16 bytes answered 2 records. `VICTORY_DESC_WHY` stays. - **First interpolation halves.** `interp` no longer writes 0 for every first half (`v_interp_p1_f32`, `v_interp_p1ll_f16`). With that write, 59 pixel programs that already translated came out changed (a join carried the zeroes into the shading), and no program more translated. Here those 59 translate as they did before that write. The retry with first-half pairs (`with_first_half_pairs`) stays. - **`v_permlane16`/`v_permlanex16`.** The joined whole-wave sections are tried first for a program whose permutes no followed section holds. On the console those sections read every lane, and a lane outside the saved mask reads with the reduction's identity. Elsewhere `main`'s lowering of the permutes stands. ## Switches - `VICTORY_WAVE_PAIRS=0`: no paired form. Programs go back to the per-half forms, or are refused as before. The value joins the shader cache key, as every `VICTORY_*` switch the shader crate reads does. - `VICTORY_MESH_LINK=0`: oversized mesh pipelines are made from the shared translations, as before. This switch is read by the pipeline layer, not the translator, so it is not part of the cache key. Linked pairs are never cached on disk. - `VICTORY_WAVE_WHY=1` (an existing switch): now also prints to stderr what the paired form gave for each program it was tried on. - `VICTORY_SHADER_LOOP_LIMIT=<n>`: as before, one limit for every loop, which overrides the 1,024 of ray-testing loops. ## Documentation - README: four lines in the summary (the pack's numbers, the paired form, linked mesh pipelines, the smaller fixes), and `VICTORY_MESH_LINK` in the table of switches. - `docs/fork-ray-tracing.md`: all 52 builder programs translate, three of them in the paired form. Switched on, the builder still crashes the title about 80 s into the gameplay. ## Tested RTX 5090 (32 GB), Intel i9-14900KF, Windows 11. The branch was checked as it is, on `9376fd6`: - `cargo test -p victory-shader -p victory-gpu`, on the card: - `victory-shader`: 242 passed, 2 ignored (a benchmark, and a test that `main` already ignores). The same list runs with `--all-features`. - `victory-gpu`: 144 passed, 3 ignored (benchmarks and measurements). - `cargo test -p victory`: passed. - `cargo clippy --workspace --all-targets --locked -- -D warnings`, and the same with `--all-features`: clean. The first commit fixes the three lints that make CI fail on `9376fd6` (`draw.rs`, `indirect.rs`, `resource.rs`). The GPU and runtime pull requests start with the same commit, so the three PRs merge in any order. - `cargo build --release -p victory`, `cargo build --profile diag -p victory --features diagnostics` and `cargo xtask policy` pass. There are 27 new tests. Those of the paired form run on the card against what the console's 64 lanes give: paired lanes sharing LDS and lanes across halves, looping apart, permuting, ORing inside a lane branch, summing halves as the console's tree, a wave value used past a lane branch. The others cover the linked signatures (validated), the LDS subtraction loop (it was refused before, and is now atomic), the shared parking slots, the joined sections, the split joins, the POPS wait, the interpolation modes and row order, and the descriptor sizes on the card and on WARP. In game runs of our tree, which also had the layer changes of the companion GPU PR: - With the paired form, no compute pipeline was refused in play. The rectangles of an older picture that showed in the opening cutscene were gone. - After the second round of fixes, no pipeline was refused and no shader failed to translate in the whole opening cutscene. ## Overlaps with open pull requests - #25 (immediate samplers chosen by uniform control flow) and #699 (signature rows and one interpolation mode per row) touch some of the same programs in other ways. Whichever goes in first, the other's part of `lower.rs` or `container.rs` will need a look. - #823 (NVIDIA 32-lane waves) gives pipelines to some of the same refused compute programs. ## Not tested - GPUs with 64-lane waves (AMD), where the paired form is never taken. - Intel GPUs, the Series S profile, and Linux/Proton. - The frame-time cost of the paired programs.
`cargo clippy --workspace --all-targets -- -D warnings` (CI) fails on 9376fd6
with this toolchain: unnecessary_sort_by in draw.rs, the bench's
depth_written in indirect.rs never read, and placed_filler_twins unused
without the diagnostics feature. No code changes.
Over the title's shader pack (`victory translate --validate --pipelines`
on an RTX 5090, 32-lane waves), 25,682 of 25,953 programs translate,
validate and get a pipeline, against 25,452 on 9376fd6 (compute 2,729
against 2,695, mesh 8,694 against 8,657, pixel 12,067 against 11,947,
vertex 2,192 against 2,153). Of the 271 left, 195 are the unused voxel
geometry stages and 71 the mesh programs below, valid once linked.

- Wave64 compute programs on 32-lane hosts in a paired form: each console
  wave runs as one host wave, each thread two of its lanes (n and n + 32);
  every per-lane branch is taken by the whole wave with EXEC as each
  lane's guard, and lane reads, permutes, lane masks and reductions take
  both halves through the host wave's own operations. Tried after every
  other form for a program the host refuses (it asks for 64-lane waves)
  or that does not translate: 28 programs (screen-space tracing tiles,
  particles, decal trails, hair shadow masks, alpha resolve, three
  structure-builder programs, a cascade shadow program). Tried before the
  per-half forms that are approximate: 36 programs in which each half-wave
  counted, ORed or elected over its own 32 lanes now run as on the
  console. VICTORY_WAVE_PAIRS=0 turns it off. The allocation idiom also
  takes a base with a multiply-add (three lens-flare scans keep their
  per-half form, which is exact for them).
- Mesh programs whose outputs pass D3D12's 32 KiB as translated alone (71:
  pedestrian, vehicle and prop transforms, 65 to 71 components for 128
  vertices; NVIDIA builds them, the validator refuses them) are
  translated again with the pixel program of the pipeline
  (emit::link_mesh): the mesh program writes only what the pixel program
  reads, which declares only the inputs it reads. pipeline/host.rs makes
  such a pipeline from the linked pair (once per pair, same root signature
  and bindings; VICTORY_MESH_LINK=0 turns it off). `victory translate`
  with VICTORY_PAIRS links and validates pairs as the runtime does: 710
  pairs (each of the 71 with the ten pixel programs that read most of its
  outputs) link, validate and get a pipeline.
- One interpolation mode per signature register (70 programs: a float the
  console declared nointerpolation beside an integer or the front face);
  signature rows in the validator's order (72 programs); a level-of-detail
  query of an array texture leaves the layer undefined.
- An immediate sampler chosen by a uniform branch: the block is copied for
  each way in (ir::split_joins; the terrain programs).
- Pixel programs ordered by primitive (POPS) go past the console's wait and
  use rasterizer-ordered views (ten cut-out programs).
- A 16-bit write over a first interpolation half reads that half as zero
  (eight deferred and decal programs). The write of zero over every first
  half (v_interp_p1_f32, v_interp_p1ll_f16) is left out: with it, 59 pixel
  programs that translated came out changed and none more translated; the
  retry with first-half pairs stays.
- Whole-wave sections that a jump splits are joined into one block (the
  water optical depth program), tried first for a program whose permutes
  no followed section holds; elsewhere the v_permlane16/x16 lowering
  stands.
- 64-bit floats and their wave sums (five water volumetrics programs),
  one implementation of the two that existed (float64.rs): both dwords of
  a sum from one host wave operation (in place of Red64F/ActiveF64, which
  summed each dword on its own), v_add_f64, v_mul_f64, v_cvt_f64_f32, and
  the IEEE v_cvt_f32_f64 on integers. Its unused flush-to-zero twin and
  ignored test are left out.
- Descriptors read only for their size, one implementation of the two
  (descriptor_data.rs): a buffer with a used-resource entry gets the
  title's view, structured where its elements are whole dwords (a raw
  handle of such a view answered 2 records where it holds 9 on the RTX
  5090); VICTORY_DESC_WHY stays.
- A subtraction on group-shared memory (ds_sub, or ds_add of 0 - x) is a
  compare-exchange loop: NVIDIA's compiler refuses the pipeline otherwise
  (E_OUTOFMEMORY; DXC's own InterlockedAdd(g, -x) too). The weather
  particle update gets a pipeline.
- A lane mask parked in two VGPR lanes that also hold single scalars comes
  back as the mask (ir::with_shared_slots; the voxelization program).
- Loops of programs that test rays against tree nodes stop at 1,024
  iterations (the compute limit is 4,096): with the title's builder off, a
  walk follows whatever memory holds. Shadow mask 11.7 -> 2.4 ms a frame
  in timing runs of the opening of the gameplay.

The allocation-idiom check (idiom.rs), descriptors read as data
(descriptor_data.rs) and 64-bit floats (float64.rs) are modules of their
own, so that lower.rs stays under the asset policy's 512 KiB a file.

Tests: each new form is run on the card against what the console's 64
lanes give; the linked signatures, the LDS subtraction loop, the shared
slots, the joined sections and the descriptor sizes have tests of their
own.
The whole pack on an RTX 5090 (32-lane waves): 25,682 of 25,953 programs
translate, validate and get a pipeline, against 25,452 at 9376fd6. All 52
structure-builder programs translate (three in the paired form); switched
on in game runs, the builder crashed the title about 80 s into the
gameplay, so it stays off.
No conflict. Upstream's loads of four dwords a call (VICTORY_SHADER_OPT
bit 64, not in the default) merge into emit/lower.rs, emit/mod.rs and
emit/bitcode/opt.rs beside this branch's forms; lower.rs is 504,469
bytes of the policy's 524,288. The rest of upstream's commits is in
files this branch does not change, but for README.md (additions side by
side) and three lint lines in draw.rs, indirect.rs and resource.rs.
`cargo clippy --workspace --all-targets --locked -- -D warnings` fails on
085ee7c4 with the pinned toolchain (1.98.1), after the two fixes before
this one too: map_entry in fpsbox.rs, collapsible_if in
pipeline/library.rs, manual_is_multiple_of in queue.rs and shadow.rs, and
with --all-features in draw.rs and watch.rs (twice). No change of
behaviour.
The test lowered the program for 64-lane waves only and returned when the
device refused the pipeline, so on a GPU of 32-lane waves it passed with
nothing run on the card (review of #854). It now asks the device how wide its
waves are (D3D12_OPTIONS1) before choosing the form: the console's own 64
lanes where they fit, the paired form on waves of 32, nothing on narrower
waves (the software adapter's 4). The pipeline and the dispatch are then made
on that same device, and a refusal fails the test.

On an RTX 5090 (32-lane waves) the paired form gives the console's tree bit
for bit with 64, 63, 40, 33, 32, 17, 5 and 1 lanes left.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:52:35 +00:00
Author
Owner

@⁠alexodee on GitHub · 2026-11-25 12:21 UTC · original

First run of this on an 8 GB Ampere card: no refused and no untranslated program is left in the scenes I reached, and nothing was lost in four launches.

Setup: RTX 3070 Ti Laptop 8 GB (32-lane waves, driver 596.36), i7-12700H, 15.7 GB RAM, Windows 11 build 26300, diagnostics build, Series X profile, VICTORY_RELAY=0 VICTORY_LATE_WAIT=3 VICTORY_SHADER_LOOP_LIMIT=16384, structure builder off. Tree: f85101b + this PR (0751197, merged without a conflict in non-test code) + #276 #52 #51 #610 #640, the constant buffer clamp of #799 (descriptor/host.rs only) and the xmem.rs commit of #823. #823's and #799's shader parts are not in.

without it (9376fd6, same other PRs, no #823/#799) #823 + #799 on 9376fd6 this PR
translate --warm all (25,889 found): do not translate not run 253 200
programs refused in the run (prologue, first playable room) 7 0 0
programs not translated in the run 2 1 0
frame, median of the lines with over 3,000 draws 524 ms 470 ms 412 ms
of it on the GPU 153 ms 208 ms 181 ms
lines 49 48 50

The frame times are not an A/B: the base of the last column is newer (f85101b), the first column has other memory settings (VICTORY_CARD_BUFFERS_MB=512 VICTORY_TEXTURE_BUDGET_MB=3200, the other two 1024 and 2200), and it is one launch per column. I did not time the paired form on its own. The GPU figure says it was not slower here than #823 + #799.

Longer run: one launch of 16 minutes with the character walking and the camera turning through the first room, a dialogue, and the pause menu: 129 lines, 434 ms a frame, 0 refused, 0 untranslated, no error line, no device removal. The linked mesh path ran ("mesh outputs over 32 KiB: the pair is linked for its pipeline", several pairs).

Picture: stepped edges of screen tiles on the shoulders and hair were there in each earlier launch I kept without these programs, and in none of the four with this PR (they were also gone with #823 + #799). A band of blocks at the bottom of the screen is still there in some launches. It stays at the same place on the screen while the camera turns, so I take it for the dispatches past 65,535 groups (#834, not in this tree), not for this PR. What is seen through the wired window glass is noisy in all of these runs.

Not tested: VICTORY_WAVE_PAIRS=0 and VICTORY_MESH_LINK=0 on the same tree, the builder on, anything after the first room.

AI-assisted (Claude Code). No game data.

**@⁠alexodee** on GitHub · 2026-11-25 12:21 UTC · [original](https://github.com/fxceless/victory-fork/pull/854#issuecomment-7162263510) First run of this on an 8 GB Ampere card: no refused and no untranslated program is left in the scenes I reached, and nothing was lost in four launches. **Setup:** RTX 3070 Ti Laptop 8 GB (32-lane waves, driver 596.36), i7-12700H, 15.7 GB RAM, Windows 11 build 26300, diagnostics build, Series X profile, `VICTORY_RELAY=0 VICTORY_LATE_WAIT=3 VICTORY_SHADER_LOOP_LIMIT=16384`, structure builder off. Tree: `f85101b` + this PR (`0751197`, merged without a conflict in non-test code) + #276 #52 #51 #610 #640, the constant buffer clamp of #799 (`descriptor/host.rs` only) and the `xmem.rs` commit of #823. #823's and #799's shader parts are not in. | | without it (`9376fd6`, same other PRs, no #823/#799) | #823 + #799 on `9376fd6` | this PR | |---|---:|---:|---:| | `translate --warm all` (25,889 found): do not translate | not run | 253 | 200 | | programs refused in the run (prologue, first playable room) | 7 | 0 | 0 | | programs not translated in the run | 2 | 1 | 0 | | frame, median of the lines with over 3,000 draws | 524 ms | 470 ms | 412 ms | | of it on the GPU | 153 ms | 208 ms | 181 ms | | lines | 49 | 48 | 50 | The frame times are not an A/B: the base of the last column is newer (`f85101b`), the first column has other memory settings (`VICTORY_CARD_BUFFERS_MB=512 VICTORY_TEXTURE_BUDGET_MB=3200`, the other two 1024 and 2200), and it is one launch per column. I did not time the paired form on its own. The GPU figure says it was not slower here than #823 + #799. **Longer run:** one launch of 16 minutes with the character walking and the camera turning through the first room, a dialogue, and the pause menu: 129 lines, 434 ms a frame, 0 refused, 0 untranslated, no error line, no device removal. The linked mesh path ran ("mesh outputs over 32 KiB: the pair is linked for its pipeline", several pairs). **Picture:** stepped edges of screen tiles on the shoulders and hair were there in each earlier launch I kept without these programs, and in none of the four with this PR (they were also gone with #823 + #799). A band of blocks at the bottom of the screen is still there in some launches. It stays at the same place on the screen while the camera turns, so I take it for the dispatches past 65,535 groups (#834, not in this tree), not for this PR. What is seen through the wired window glass is noisy in all of these runs. Not tested: `VICTORY_WAVE_PAIRS=0` and `VICTORY_MESH_LINK=0` on the same tree, the builder on, anything after the first room. AI-assisted (Claude Code). No game data.
Author
Owner

@⁠SkillIssueXO on GitHub · 2026-11-25 12:24 UTC · original

I tested the #854 code on an RTX 5070 Ti in a local f85101b diagnostics build with the group-X split. In the builder-off prison-window replay, the same 149-present slice was 4.74 FPS (207.82 ms median, 235.48 ms p95) with #854 versus 5.70 FPS (173.99 ms median, 194.89 ms p95) in my control. Both used Series X, copy queues with 96 MiB upload landing capacity, indirect windows, and VICTORY_FILL_WAIT=1. One run per arm. The paired build showed a brighter character halo and more distortion through the glass.

For #646 interoperability, I used the original console workgroup dimensions and a separate active predicate for each console lane a paired host thread represents. A synthetic fixture ran on the RTX 5070 Ti in both Wave32 forms and matched the store, EXEC popcount, and reduction results for limits 1, 45, 109, and unlimited across two 64-thread groups. With that integration and the builder requested, all 53 pipelines loaded and the builder started. About six seconds later the run ended at the 3 GiB free-commit guard. Its last sample was 2.26 GiB free and 28.14 GiB private memory. The numbered-copy pool also hit its 1,023 limit. Builder rendering remains unverified.

AI-assisted testing and analysis. Asset-free measurements only.

**@⁠SkillIssueXO** on GitHub · 2026-11-25 12:24 UTC · [original](https://github.com/fxceless/victory-fork/pull/854#issuecomment-7162330053) I tested the #854 code on an RTX 5070 Ti in a local `f85101b` diagnostics build with the group-X split. In the builder-off prison-window replay, the same 149-present slice was 4.74 FPS (207.82 ms median, 235.48 ms p95) with #854 versus 5.70 FPS (173.99 ms median, 194.89 ms p95) in my control. Both used Series X, copy queues with 96 MiB upload landing capacity, indirect windows, and `VICTORY_FILL_WAIT=1`. One run per arm. The paired build showed a brighter character halo and more distortion through the glass. For #646 interoperability, I used the original console workgroup dimensions and a separate active predicate for each console lane a paired host thread represents. A synthetic fixture ran on the RTX 5070 Ti in both Wave32 forms and matched the store, EXEC popcount, and reduction results for limits 1, 45, 109, and unlimited across two 64-thread groups. With that integration and the builder requested, all 53 pipelines loaded and the builder started. About six seconds later the run ended at the 3 GiB free-commit guard. Its last sample was 2.26 GiB free and 28.14 GiB private memory. The numbered-copy pool also hit its 1,023 limit. Builder rendering remains unverified. AI-assisted testing and analysis. Asset-free measurements only.
Author
Owner

@⁠iGoldenNinja on GitHub · 2026-11-25 12:26 UTC · original

RTX 5080 16 GB, driver 617.14, Windows 11 Pro 25H2 build 26200.9974, Ryzen 9 5900X and 32 GB RAM. I tested the seven compute programs from the earlier PSO refusals on f85101b and on 0751197. The base and PR with VICTORY_WAVE_PAIRS=0 each validated all seven and created zero. The same PR with pairing enabled validated and created all seven, each with the Wave32 paired retry.

I then ran 0ec6631, combining this head with PR 834's split dispatch and the readback probe. In controllable prison, 2cc4c197ee29e291 built and bound, and there were zero logged compute PSO refusals. One mesh PSO still returned 0x80070057 for the integer blend pair from #51. The diffuse final gather accounted for every requested group in all 17 route readbacks. The broad lower band was absent, and the room was still dark with irregular character edges. The structure builder was off and accounted for a median 341 skipped dispatches per frame in the route logs.

The timed input route completed and ended deliberately with no logged device loss. The capture was short of a full 90-second displayed interval. The qualifying 75-second segment measured 2.79 displayed FPS and 793.80 ms P99. The window dimensions changed between captures, and there is no matched live timing comparison for pairing from this run. Test matrix and replay report. Testing and reporting assisted by OpenAI Codex.

**@⁠iGoldenNinja** on GitHub · 2026-11-25 12:26 UTC · [original](https://github.com/fxceless/victory-fork/pull/854#issuecomment-7162365516) RTX 5080 16 GB, driver 617.14, Windows 11 Pro 25H2 build 26200.9974, Ryzen 9 5900X and 32 GB RAM. I tested the seven compute programs from the earlier PSO refusals on `f85101b` and on `0751197`. The base and PR with `VICTORY_WAVE_PAIRS=0` each validated all seven and created zero. The same PR with pairing enabled validated and created all seven, each with the Wave32 paired retry. I then ran `0ec6631`, combining this head with PR 834's split dispatch and the readback probe. In controllable prison, `2cc4c197ee29e291` built and bound, and there were zero logged compute PSO refusals. One mesh PSO still returned `0x80070057` for the integer blend pair from #51. The diffuse final gather accounted for every requested group in all 17 route readbacks. The broad lower band was absent, and the room was still dark with irregular character edges. The structure builder was off and accounted for a median 341 skipped dispatches per frame in the route logs. The timed input route completed and ended deliberately with no logged device loss. The capture was short of a full 90-second displayed interval. The qualifying 75-second segment measured 2.79 displayed FPS and 793.80 ms P99. The window dimensions changed between captures, and there is no matched live timing comparison for pairing from this run. [Test matrix and replay report](https://github.com/iGoldenNinja/victory-fork/blob/9a662f22dd3b66189efeae5340256e3e79001fe1/docs/nvidia-pr854-5080.md). Testing and reporting assisted by OpenAI Codex.
Author
Owner

@⁠SantannaCarlos on GitHub · 2026-11-25 13:14 UTC · original

In the title on an RTX 4070 (32-lane waves): this PR's paired form brings the refused programs down to the mesh pipeline f5e50eb2108c425b with its pixel half, and costs about what #799 costs, most of it in one program.

Setup as in my #799 comment: diagnostics builds of 9376fd6 + #834, with this PR's head 0751197 merged (no conflict), own warmed shader cache, 9- to 10-minute runs from the same cell save, default mode, fresh process each; median of the last 25 frame lines.

Tree GPU ms/frame ms/frame Refused
9376fd6 + #834 (2 runs) 90 / 101 229 / 240 9
+ #799 140 293 4
+ this PR (2 runs) 145 / 144 298 / 282 2 (f5e50eb2108c425b and its pixel ce3f0432a08f1d35)
+ this PR, 369cbe906ea72764 skipped 109 267 2
  • The water volumetrics (5dc3b25986622949, 6f225b641c5b0708) run with this PR; #799 leaves them refused.
  • 369cbe906ea72764 (GpuParticleUpdate:CS_Visibility) costs about 35 ms of GPU time a frame here too, in the exact form. Without it, this PR sits 10 to 15 ms above the base, spread over the other programs it brings.
  • Picture, same window shot (+480 frames after the first world frame), shadows lifted to look for banding: no posterized gradients in the base, #799 or this PR on this card; the wall gradient is smooth in all three. The window gets much brighter with both PRs (the wired glass transmits; in the base the mesh is sharp against the yard). #799 adds a magenta edge along the shoulder that this PR does not have.
**@⁠SantannaCarlos** on GitHub · 2026-11-25 13:14 UTC · [original](https://github.com/fxceless/victory-fork/pull/854#issuecomment-7163494582) **In the title on an RTX 4070 (32-lane waves): this PR's paired form brings the refused programs down to the mesh pipeline `f5e50eb2108c425b` with its pixel half, and costs about what #799 costs, most of it in one program.** Setup as in my #799 comment: diagnostics builds of `9376fd6` + #834, with this PR's head `0751197` merged (no conflict), own warmed shader cache, 9- to 10-minute runs from the same cell save, default mode, fresh process each; median of the last 25 frame lines. | Tree | GPU ms/frame | ms/frame | Refused | |---|---:|---:|---| | `9376fd6` + #834 (2 runs) | 90 / 101 | 229 / 240 | 9 | | + #799 | 140 | 293 | 4 | | + this PR (2 runs) | 145 / 144 | 298 / 282 | 2 (`f5e50eb2108c425b` and its pixel `ce3f0432a08f1d35`) | | + this PR, `369cbe906ea72764` skipped | 109 | 267 | 2 | - The water volumetrics (`5dc3b25986622949`, `6f225b641c5b0708`) run with this PR; #799 leaves them refused. - `369cbe906ea72764` (`GpuParticleUpdate:CS_Visibility`) costs about 35 ms of GPU time a frame here too, in the exact form. Without it, this PR sits 10 to 15 ms above the base, spread over the other programs it brings. - Picture, same window shot (+480 frames after the first world frame), shadows lifted to look for banding: no posterized gradients in the base, #799 or this PR on this card; the wall gradient is smooth in all three. The window gets much brighter with both PRs (the wired glass transmits; in the base the mesh is sharp against the yard). #799 adds a magenta edge along the shoulder that this PR does not have.
Author
Owner

@⁠avt0m4t48 on GitHub · 2026-11-25 14:58 UTC · original

I checked two additional shapes on 0751197: a synthetic 8×4×2 group with one console wave and a 4×4×8 group with two. The test builds per-lane X/Y/Z and a flat index into a small UAV. Microsoft's DXIL validator accepted both paired-layout shaders.

The Windows runner reports a wave width of 4–4 on WARP. It rejected creation of the required 32-lane pipeline, so this is validator evidence only. The readback fixture can run unchanged on an adapter that supports the paired shader with VICTORY_WARP unset.

Validator and adapter capability run · Readback fixture

AI-assisted using Codex.

**@⁠avt0m4t48** on GitHub · 2026-11-25 14:58 UTC · [original](https://github.com/fxceless/victory-fork/pull/854#issuecomment-7166098333) I checked two additional shapes on `0751197`: a synthetic 8×4×2 group with one console wave and a 4×4×8 group with two. The test builds per-lane X/Y/Z and a flat index into a small UAV. Microsoft's DXIL validator accepted both paired-layout shaders. The Windows runner reports a wave width of 4–4 on WARP. It rejected creation of the required 32-lane pipeline, so this is validator evidence only. The readback fixture can run unchanged on an adapter that supports the paired shader with `VICTORY_WARP` unset. [Validator and adapter capability run](https://github.com/avt0m4t48/victory-fork/actions/runs/45639007357) · [Readback fixture](https://github.com/avt0m4t48/victory-fork/commit/a4bcf6daafaa73f0361ac513dedf5cba29084150) AI-assisted using Codex.
Author
Owner

@⁠SantannaCarlos on GitHub · 2026-11-25 15:04 UTC · original

Where the ~35 ms with 369cbe906ea72764 goes, from the captured frames' operation lists: the seven buffers it writes are where 94 indirect operations a frame read their arguments. Most are indexed draws with vertex program ed734c953c0eac78 and seven pixel programs into the 2560x1440 R16G16B16A16_FLOAT colour target, depth test on and depth write off; a few more draw into an R32_FLOAT + two R8_UNORM target the same way, and two are indirect dispatches. None draws into a shadow atlas. With it, indirect mesh groups go from about 10,900 to 13,750 a frame at the same ~4,790 draws.

So it is the visibility pass of the GPU particles: refused on main, the particles are not drawn; running, they fill the screen, and that fill is the cost. Its own loops run 3 and 8 times with sane constants, so not a runaway loop. The same holds with #799's form. Whether that amount of particles is right would take a console reference.

**@⁠SantannaCarlos** on GitHub · 2026-11-25 15:04 UTC · [original](https://github.com/fxceless/victory-fork/pull/854#issuecomment-7166266353) Where the ~35 ms with `369cbe906ea72764` goes, from the captured frames' operation lists: the seven buffers it writes are where 94 indirect operations a frame read their arguments. Most are indexed draws with vertex program `ed734c953c0eac78` and seven pixel programs into the 2560x1440 R16G16B16A16_FLOAT colour target, depth test on and depth write off; a few more draw into an R32_FLOAT + two R8_UNORM target the same way, and two are indirect dispatches. None draws into a shadow atlas. With it, indirect mesh groups go from about 10,900 to 13,750 a frame at the same ~4,790 draws. So it is the visibility pass of the GPU particles: refused on main, the particles are not drawn; running, they fill the screen, and that fill is the cost. Its own loops run 3 and 8 times with sane constants, so not a runaway loop. The same holds with #799's form. Whether that amount of particles is right would take a console reference.
Author
Owner

@⁠SkillIssueXO on GitHub · 2026-11-25 15:09 UTC · original

Same-executable cascade-shadow check on an RTX 5070 Ti with 32-lane waves. I applied PR compiler commit 26600c61 on top of 0b0074e in a separate diagnostics checkout. Both arms used VICTORY_HOST_MAX_WAVE=32, VICTORY_MESH_LINK=0, and offline translate --validate --pipelines on shader f133e35efed2a48a.

  • VICTORY_WAVE_PAIRS=0 produced no DXIL or host pipeline.
  • VICTORY_WAVE_PAIRS=1 selected paired lanes at wave32, passed Windows SDK 10.0.26100.0 DXIL validation, and created the compute pipeline on the RTX 5070 Ti.

Six paired-wave fixtures also executed successfully on this GPU. This isolates the change to translation and pipeline creation for this shader. The visual result and frame cost still need a matched game run. AI-assisted testing and analysis.

**@⁠SkillIssueXO** on GitHub · 2026-11-25 15:09 UTC · [original](https://github.com/fxceless/victory-fork/pull/854#issuecomment-7166406119) Same-executable cascade-shadow check on an RTX 5070 Ti with 32-lane waves. I applied PR compiler commit `26600c61` on top of `0b0074e` in a separate diagnostics checkout. Both arms used `VICTORY_HOST_MAX_WAVE=32`, `VICTORY_MESH_LINK=0`, and offline `translate --validate --pipelines` on shader `f133e35efed2a48a`. - `VICTORY_WAVE_PAIRS=0` produced no DXIL or host pipeline. - `VICTORY_WAVE_PAIRS=1` selected paired lanes at wave32, passed Windows SDK 10.0.26100.0 DXIL validation, and created the compute pipeline on the RTX 5070 Ti. Six paired-wave fixtures also executed successfully on this GPU. This isolates the change to translation and pipeline creation for this shader. The visual result and frame cost still need a matched game run. AI-assisted testing and analysis.
Author
Owner

@⁠SkillIssueXO on GitHub · 2026-11-25 16:17 UTC · original

RTX 5070 Ti in the robbery tutorial on 3973179 with compiler commit 26600c61 applied, mesh linking off, and Series X mode. Offline on this GPU, unmodified 3973179 created 0/5 pipelines for the selected transition compute programs. The paired build validated and created 5/5.

The live paired run logged first binds at frame 2627 for 02384a60fda6f2d0, 2cc4c197ee29e291, 2da4beb386509b77, 369cbe906ea72764, and f133e35efed2a48a. It then reached the robbery aim tutorial with the structure builder off. The tutorial displayed its aim prompt and the store geometry, with severe overexposure. A 245-present sample there averaged 3.14 FPS (235 ms median, 462 ms p95). One long frame took about 7 seconds in host reporting after DXGI Present returned. These are combined live-run timings. Attributing a frame-time change to pairing requires a matched visual run.

AI-assisted testing. No game assets or raw logs attached.

**@⁠SkillIssueXO** on GitHub · 2026-11-25 16:17 UTC · [original](https://github.com/fxceless/victory-fork/pull/854#issuecomment-7167755152) RTX 5070 Ti in the robbery tutorial on 3973179 with compiler commit `26600c61` applied, mesh linking off, and Series X mode. Offline on this GPU, unmodified `3973179` created 0/5 pipelines for the selected transition compute programs. The paired build validated and created 5/5. The live paired run logged first binds at frame 2627 for `02384a60fda6f2d0`, `2cc4c197ee29e291`, `2da4beb386509b77`, `369cbe906ea72764`, and `f133e35efed2a48a`. It then reached the robbery aim tutorial with the structure builder off. The tutorial displayed its aim prompt and the store geometry, with severe overexposure. A 245-present sample there averaged 3.14 FPS (235 ms median, 462 ms p95). One long frame took about 7 seconds in host reporting after DXGI Present returned. These are combined live-run timings. Attributing a frame-time change to pairing requires a matched visual run. AI-assisted testing. No game assets or raw logs attached.
Author
Owner

@⁠PiloteCode on GitHub · 2026-11-25 16:23 UTC · original

@⁠alexodee Thanks for the long run. It confirms the paired form and the linked mesh pipelines on an 8 GB Ampere laptop GPU: 16 minutes with nothing refused, nothing untranslated and no device removal.

The band at the bottom is what you thought. The screen-probe final gather of the indirect diffuse light asks for up to 115,200 groups in x at 2560x1440 (one group per 8x8 tile of each of its two layers), and the groups past 65,535 never ran. #993, stacked on this PR, runs them all, as #834 does: an indirect record is split into four (up to 262,140 groups in x), a direct dispatch into several. In our tree the bottom edge was clean after that change.

@⁠iGoldenNinja Thanks. This confirms on an RTX 5080 that the seven programs get a pipeline only through the paired retry, and that VICTORY_WAVE_PAIRS=0 brings the base's refusals back on the same build.

  • f5e50eb2108c425b with ce3f0432a08f1d35 is #51's case, as you say. The pair writes a uint to its target 2 with blending on, and D3D12 refuses a pipeline that blends an integer target (E_INVALIDARG). The problem is its blend state, which this PR does not touch.
  • The dark room and the edges on the character: with the builder off, the traced passes walk whatever lies where the structures would be. In our runs that gave screen-aligned dark tiles on sunlit hair, lit squares in shadow, and hair dark in some runs and lit in others. #994 (stacked on #993) makes node tests answer no hit while the builder does not run, and runs the builder without crashing with VICTORY_BVH_BUILDER=1. With the builder on, the hair's light was steady in our runs of the window scene. We have not checked that your edges are this, nor compared the room with the console's.
  • 115,200 groups is the largest request we saw too; #993 splits it as well (above).

@⁠SantannaCarlos Thanks for both. They confirm on an RTX 4070 that the paired form leaves one pipeline refused, and that the water volumetrics run with it.

  • f5e50eb2108c425b with ce3f0432a08f1d35 is the integer-target blend above (#51), not a translation.

  • 369cbe906ea72764, in our CPU census of #993's build (VICTORY_SHADER_CENSUS, VICTORY_HOST_MAX_WAVE=32):

    • VICTORY_WAVE_PAIRS=0: it asks for 64-lane waves, which a 32-lane GPU refuses, as on main;
    • VICTORY_WAVE_RAW=0 VICTORY_WAVE_SPLIT=0 (this PR's forms): paired, 1,744 host instructions, 260 of them guard selects;
    • #993's defaults: still paired, since it is not an allocation-only program; VICTORY_WAVE_RAW takes it to 1,120 instructions and 44 guard selects.

    So #993 makes the program itself smaller. It does not change the particle draws, where your second comment puts the 35 ms.

  • We do not see that cost in our tree, which has other layer changes. In a timing run of the save's gameplay on our RTX 5090, the program's dispatch took about 0.08 ms when it ran. The draws with vertex program ed734c953c0eac78 took a median 0.07 ms of card time a frame (0.33 ms at most), at a median of 17 such draws a frame (78 at most). Since the program and its draws are cheap in our runs, the difference more likely lies in the rest of the layer than in this PR's translation.

  • A reference short of a console: a GPU with 64-lane waves (AMD) runs this program in its own wave64 form, not the paired one. The same view there would show whether the paired form lets more particles through. Our test machine has 32-lane waves only.

  • The 10 to 15 ms over the other programs: see the paired programs' own cost below.

@⁠SkillIssueXO Thanks for the A/B, the #646 integration and the cascade-shadow check.

The 34 ms between your arms can have two parts:

  • Work your control does not do. Programs that main refuses on 32-lane GPUs run here, and some of them feed draws, like the particle pass above. In a diagnostics build, VICTORY_SKIP_PIPELINES=369cbe906ea72764 on your #854 arm would show how much of the gap, and of the halo, goes with that pass. The alpha transmission prefilter (2da4beb386509b77) also runs only in the paired form; add it to the list to check the glass.
  • The paired programs' own cost. In timing runs of our tree on our RTX 5090, all paired programs together took 3.6 ms of card time a frame, out of 155 ms, in the opening cutscene (this PR's forms; the heaviest, a shader-bin offset pass, 1.7 ms). In the save's gameplay they took 2.7 ms out of 100 ms (#993's forms). #993, stacked on this PR, lowers that cost with two switches, both on by default:
    • VICTORY_WAVE_RAW: a guarded write is read without its select where only lanes inside the guard read it. Over the 69 paired programs, host instructions go from 2,303,768 to 1,617,871 (-30 %) and guard selects from 360,668 to 124,509.
    • VICTORY_WAVE_SPLIT: programs that use their wave values only to allocate run as two host waves of their own. Five paired programs go back to the per-half form they take with pairing off, which is exact for them: the four denoiser temporal resolves (sr_denoising:CS_TemporalResolve*) and a lens-flare scan, 48,501 -> 19,039 host instructions. It also moves 40 of the 160 exchange-form programs (a form main has too).

To A/B on one build of #993's head, which contains this PR:

  • VICTORY_WAVE_RAW=0 VICTORY_WAVE_SPLIT=0: this PR's forms;
  • no switch: #993's forms;
  • VICTORY_WAVE_PAIRS=0 (here and in #993): no paired form. The programs only it translates are refused again, and the others take their per-half forms.

Every VICTORY_* switch the translator reads is part of the shader cache key. Run victory translate --warm all with each arm's switches before timing it, to keep translation out of the slice.

#646 and the builder. Your per-lane predicate is what the paired form needs under #646: one host thread holds console lanes n and n + 32, each with its own X/Y/Z in the console's group. #994 (stacked on #993) handles thread counts another way. A dispatch whose last group is cut short runs a second translation, whose threads past the counts leave at entry (USER_THREAD_LIMIT, RootType::Other(0x105)). The paired and approximate forms are refused there, since a thread holding two lanes cannot leave for one of them. Of the builder's 52 programs, its three paired prefix sums are the ones without that form. #646's word uses RootType::Other(0x104), which #834 and #993 use for the group base, so with both, one of them needs another code.

#994 also deals with the numbered copies' 1,023 limit:

  • Before, each list that ran a program reaching title memory by address refreshed all 1,023 numbered windows (4 GiB). If the program could store, the list declared them all written.
  • Low dwords of address pairs were taken as addresses too: 717 of the 802 windows named in the builder's first frame.
  • Now a list refreshes only the copies it names, and there are 2,047 numbers.

In our tree, with these changes, 420 s of gameplay with the builder on had no fault and no card loss. We have not compared memory use with your build.

Cascade shadows (f133e35efed2a48a). This matches our census: with VICTORY_WAVE_PAIRS=0 it stops at "a lane mask exchanged where not every lane runs". It is also the largest paired program: 228,213 host instructions in this PR's form, 157,113 with #993's VICTORY_WAVE_RAW. That makes it a good one to time in the matched game run.

@⁠avt0m4t48 Thanks. This checks a case our tests do not: the paired-form tests in this PR all use one-row groups ([n, 1, 1]). In the paired form the host group is a row of half the console's threads. Each console lane's X/Y/Z comes from its flat id and the console's x and y (thread_id and console_thread in emit/lower.rs). Your 8x4x2 and 4x4x8 groups exercise that path, the second console wave included. WARP's 4-lane waves cannot take a 32-lane program, as you found. Once your readback test runs on a 32-lane card, it would be worth adding next to the paired-form tests.

**@⁠PiloteCode** on GitHub · 2026-11-25 16:23 UTC · [original](https://github.com/fxceless/victory-fork/pull/854#issuecomment-7167900933) **@⁠alexodee** Thanks for the long run. It confirms the paired form and the linked mesh pipelines on an 8 GB Ampere laptop GPU: 16 minutes with nothing refused, nothing untranslated and no device removal. The band at the bottom is what you thought. The screen-probe final gather of the indirect diffuse light asks for up to 115,200 groups in x at 2560x1440 (one group per 8x8 tile of each of its two layers), and the groups past 65,535 never ran. #993, stacked on this PR, runs them all, as #834 does: an indirect record is split into four (up to 262,140 groups in x), a direct dispatch into several. In our tree the bottom edge was clean after that change. **@⁠iGoldenNinja** Thanks. This confirms on an RTX 5080 that the seven programs get a pipeline only through the paired retry, and that `VICTORY_WAVE_PAIRS=0` brings the base's refusals back on the same build. - `f5e50eb2108c425b` with `ce3f0432a08f1d35` is #51's case, as you say. The pair writes a uint to its target 2 with blending on, and D3D12 refuses a pipeline that blends an integer target (`E_INVALIDARG`). The problem is its blend state, which this PR does not touch. - The dark room and the edges on the character: with the builder off, the traced passes walk whatever lies where the structures would be. In our runs that gave screen-aligned dark tiles on sunlit hair, lit squares in shadow, and hair dark in some runs and lit in others. #994 (stacked on #993) makes node tests answer no hit while the builder does not run, and runs the builder without crashing with `VICTORY_BVH_BUILDER=1`. With the builder on, the hair's light was steady in our runs of the window scene. We have not checked that your edges are this, nor compared the room with the console's. - 115,200 groups is the largest request we saw too; #993 splits it as well (above). **@⁠SantannaCarlos** Thanks for both. They confirm on an RTX 4070 that the paired form leaves one pipeline refused, and that the water volumetrics run with it. - `f5e50eb2108c425b` with `ce3f0432a08f1d35` is the integer-target blend above (#51), not a translation. - `369cbe906ea72764`, in our CPU census of #993's build (`VICTORY_SHADER_CENSUS`, `VICTORY_HOST_MAX_WAVE=32`): - `VICTORY_WAVE_PAIRS=0`: it asks for 64-lane waves, which a 32-lane GPU refuses, as on `main`; - `VICTORY_WAVE_RAW=0 VICTORY_WAVE_SPLIT=0` (this PR's forms): paired, 1,744 host instructions, 260 of them guard selects; - #993's defaults: still paired, since it is not an allocation-only program; `VICTORY_WAVE_RAW` takes it to 1,120 instructions and 44 guard selects. So #993 makes the program itself smaller. It does not change the particle draws, where your second comment puts the 35 ms. - We do not see that cost in our tree, which has other layer changes. In a timing run of the save's gameplay on our RTX 5090, the program's dispatch took about 0.08 ms when it ran. The draws with vertex program `ed734c953c0eac78` took a median 0.07 ms of card time a frame (0.33 ms at most), at a median of 17 such draws a frame (78 at most). Since the program and its draws are cheap in our runs, the difference more likely lies in the rest of the layer than in this PR's translation. - A reference short of a console: a GPU with 64-lane waves (AMD) runs this program in its own wave64 form, not the paired one. The same view there would show whether the paired form lets more particles through. Our test machine has 32-lane waves only. - The 10 to 15 ms over the other programs: see the paired programs' own cost below. **@⁠SkillIssueXO** Thanks for the A/B, the #646 integration and the cascade-shadow check. The 34 ms between your arms can have two parts: - Work your control does not do. Programs that `main` refuses on 32-lane GPUs run here, and some of them feed draws, like the particle pass above. In a diagnostics build, `VICTORY_SKIP_PIPELINES=369cbe906ea72764` on your #854 arm would show how much of the gap, and of the halo, goes with that pass. The alpha transmission prefilter (`2da4beb386509b77`) also runs only in the paired form; add it to the list to check the glass. - The paired programs' own cost. In timing runs of our tree on our RTX 5090, all paired programs together took 3.6 ms of card time a frame, out of 155 ms, in the opening cutscene (this PR's forms; the heaviest, a shader-bin offset pass, 1.7 ms). In the save's gameplay they took 2.7 ms out of 100 ms (#993's forms). #993, stacked on this PR, lowers that cost with two switches, both on by default: - `VICTORY_WAVE_RAW`: a guarded write is read without its select where only lanes inside the guard read it. Over the 69 paired programs, host instructions go from 2,303,768 to 1,617,871 (-30 %) and guard selects from 360,668 to 124,509. - `VICTORY_WAVE_SPLIT`: programs that use their wave values only to allocate run as two host waves of their own. Five paired programs go back to the per-half form they take with pairing off, which is exact for them: the four denoiser temporal resolves (`sr_denoising:CS_TemporalResolve*`) and a lens-flare scan, 48,501 -> 19,039 host instructions. It also moves 40 of the 160 exchange-form programs (a form `main` has too). To A/B on one build of #993's head, which contains this PR: - `VICTORY_WAVE_RAW=0 VICTORY_WAVE_SPLIT=0`: this PR's forms; - no switch: #993's forms; - `VICTORY_WAVE_PAIRS=0` (here and in #993): no paired form. The programs only it translates are refused again, and the others take their per-half forms. Every `VICTORY_*` switch the translator reads is part of the shader cache key. Run `victory translate --warm all` with each arm's switches before timing it, to keep translation out of the slice. **#646 and the builder.** Your per-lane predicate is what the paired form needs under #646: one host thread holds console lanes n and n + 32, each with its own X/Y/Z in the console's group. #994 (stacked on #993) handles thread counts another way. A dispatch whose last group is cut short runs a second translation, whose threads past the counts leave at entry (`USER_THREAD_LIMIT`, `RootType::Other(0x105)`). The paired and approximate forms are refused there, since a thread holding two lanes cannot leave for one of them. Of the builder's 52 programs, its three paired prefix sums are the ones without that form. #646's word uses `RootType::Other(0x104)`, which #834 and #993 use for the group base, so with both, one of them needs another code. #994 also deals with the numbered copies' 1,023 limit: - Before, each list that ran a program reaching title memory by address refreshed all 1,023 numbered windows (4 GiB). If the program could store, the list declared them all written. - Low dwords of address pairs were taken as addresses too: 717 of the 802 windows named in the builder's first frame. - Now a list refreshes only the copies it names, and there are 2,047 numbers. In our tree, with these changes, 420 s of gameplay with the builder on had no fault and no card loss. We have not compared memory use with your build. **Cascade shadows (`f133e35efed2a48a`).** This matches our census: with `VICTORY_WAVE_PAIRS=0` it stops at "a lane mask exchanged where not every lane runs". It is also the largest paired program: 228,213 host instructions in this PR's form, 157,113 with #993's `VICTORY_WAVE_RAW`. That makes it a good one to time in the matched game run. **@⁠avt0m4t48** Thanks. This checks a case our tests do not: the paired-form tests in this PR all use one-row groups (`[n, 1, 1]`). In the paired form the host group is a row of half the console's threads. Each console lane's X/Y/Z comes from its flat id and the console's x and y (`thread_id` and `console_thread` in `emit/lower.rs`). Your 8x4x2 and 4x4x8 groups exercise that path, the second console wave included. WARP's 4-lane waves cannot take a 32-lane program, as you found. Once your readback test runs on a 32-lane card, it would be worth adding next to the paired-form tests.
Author
Owner

@⁠PiloteCode on GitHub · 2026-11-25 16:36 UTC · original

@⁠SkillIssueXO Thanks. This confirms on an RTX 5070 Ti that these five get a pipeline only in the paired form. It matches our census: without that form, four ask for 64-lane waves and f133e35efed2a48a does not translate.

None of the five is an exposure, luminance or histogram pass:

  • 02384a60fda6f2d0: vfx_triangleClip:CS_DefragHeap_ComputeRelocations, relocations for the VFX triangle-clip heap;
  • 2cc4c197ee29e291: sr_tracing:CS_Tiling_Generate_Opaque, the screen-space tracing tiles;
  • 2da4beb386509b77: alphaResolve:CS_AlphTransmissionPrefilterMip, the alpha transmission prefilter;
  • 369cbe906ea72764: GpuParticleUpdate:CS_Visibility, the particle visibility pass;
  • f133e35efed2a48a: cascadeshadows_rendering:CS_ShadowRenderTiledCascadesAlphaCBPPPC, cascade shadows.

All five stay paired with #993's defaults (VICTORY_WAVE_RAW makes them smaller). None of the title's exposure, luminance or histogram programs takes the paired form, here or in #993. So pairing does not change the exposure programs themselves. It can change what they measure, through what these five add to the picture. Earlier reports here saw the picture get brighter with them running (the window, your halo).

To see whether the overexposure follows pairing, in the same scene:

  • this PR's build, VICTORY_WAVE_PAIRS=0 against the default. With pairing off, the five are refused again and do not run, so compare the pictures, not only the frame times;
  • in a diagnostics build, VICTORY_SKIP_PIPELINES=<hash> with one of the five at a time, to see which one it follows;
  • on #993's head, VICTORY_WAVE_RAW=0 against the default, which changes the code of all five.

We have not reached that scene in our runs (our save is earlier), so we cannot confirm it ourselves yet.

On the 7 s frame: a first use waits for its pipeline at most the frame's budget (VICTORY_PIPELINE_WAIT_MS, 500 ms by default) and is dropped past it. So a slow translation or compile of these five would not by itself hold a frame that long. The frame line covering it splits the time into copies, texture uploads, GPU and copy-back, and counts the pipelines still being made.

**@⁠PiloteCode** on GitHub · 2026-11-25 16:36 UTC · [original](https://github.com/fxceless/victory-fork/pull/854#issuecomment-7168246866) @⁠SkillIssueXO Thanks. This confirms on an RTX 5070 Ti that these five get a pipeline only in the paired form. It matches our census: without that form, four ask for 64-lane waves and `f133e35efed2a48a` does not translate. None of the five is an exposure, luminance or histogram pass: - `02384a60fda6f2d0`: `vfx_triangleClip:CS_DefragHeap_ComputeRelocations`, relocations for the VFX triangle-clip heap; - `2cc4c197ee29e291`: `sr_tracing:CS_Tiling_Generate_Opaque`, the screen-space tracing tiles; - `2da4beb386509b77`: `alphaResolve:CS_AlphTransmissionPrefilterMip`, the alpha transmission prefilter; - `369cbe906ea72764`: `GpuParticleUpdate:CS_Visibility`, the particle visibility pass; - `f133e35efed2a48a`: `cascadeshadows_rendering:CS_ShadowRenderTiledCascadesAlphaCBPPPC`, cascade shadows. All five stay paired with #993's defaults (`VICTORY_WAVE_RAW` makes them smaller). None of the title's exposure, luminance or histogram programs takes the paired form, here or in #993. So pairing does not change the exposure programs themselves. It can change what they measure, through what these five add to the picture. Earlier reports here saw the picture get brighter with them running (the window, your halo). To see whether the overexposure follows pairing, in the same scene: - this PR's build, `VICTORY_WAVE_PAIRS=0` against the default. With pairing off, the five are refused again and do not run, so compare the pictures, not only the frame times; - in a diagnostics build, `VICTORY_SKIP_PIPELINES=<hash>` with one of the five at a time, to see which one it follows; - on #993's head, `VICTORY_WAVE_RAW=0` against the default, which changes the code of all five. We have not reached that scene in our runs (our save is earlier), so we cannot confirm it ourselves yet. On the 7 s frame: a first use waits for its pipeline at most the frame's budget (`VICTORY_PIPELINE_WAIT_MS`, 500 ms by default) and is dropped past it. So a slow translation or compile of these five would not by itself hold a frame that long. The frame line covering it splits the time into copies, texture uploads, GPU and copy-back, and counts the pipelines still being made.
Author
Owner

@⁠jstrdev on GitHub · 2026-11-25 18:13 UTC · original

In a run on your RTX 5090 at 0b0074e (default settings), what does the log line indirect mesh dispatches: the largest group count asked for N … M groups asked per frame show once in the world? On my Arc B580 it is always 0 / 0, even with indirect mesh draws in the frame.

**@⁠jstrdev** on GitHub · 2026-11-25 18:13 UTC · [original](https://github.com/fxceless/victory-fork/pull/854#issuecomment-7170605986) In a run on your RTX 5090 at 0b0074e (default settings), what does the log line indirect mesh dispatches: the largest group count asked for N … M groups asked per frame show once in the world? On my Arc B580 it is always 0 / 0, even with indirect mesh draws in the frame.
Author
Owner

@⁠PiloteCode on GitHub · 2026-11-25 18:14 UTC · original

@⁠jstrdev Not on 0b0074e itself, but in our tree (that base plus our layer changes, the same counter and log line), in the save's gameplay on the RTX 5090, once in the world the line reads, for three successive reports:

indirect mesh dispatches: the largest group count asked for 279 (run: at most 65535), 14496 groups asked per frame
indirect mesh dispatches: the largest group count asked for 279 (run: at most 65535), 20533 groups asked per frame
indirect mesh dispatches: the largest group count asked for 279 (run: at most 65535), 16678 groups asked per frame

So a largest count of 279 and some 14,000 to 20,000 groups a frame at about 5,000 draws a frame. A constant 0 / 0 with indirect mesh draws in the frame would mean the clamp's record of what was asked never comes back on that card, rather than nothing being asked.

**@⁠PiloteCode** on GitHub · 2026-11-25 18:14 UTC · [original](https://github.com/fxceless/victory-fork/pull/854#issuecomment-7170643035) @⁠jstrdev Not on `0b0074e` itself, but in our tree (that base plus our layer changes, the same counter and log line), in the save's gameplay on the RTX 5090, once in the world the line reads, for three successive reports: ``` indirect mesh dispatches: the largest group count asked for 279 (run: at most 65535), 14496 groups asked per frame indirect mesh dispatches: the largest group count asked for 279 (run: at most 65535), 20533 groups asked per frame indirect mesh dispatches: the largest group count asked for 279 (run: at most 65535), 16678 groups asked per frame ``` So a largest count of 279 and some 14,000 to 20,000 groups a frame at about 5,000 draws a frame. A constant 0 / 0 with indirect mesh draws in the frame would mean the clamp's record of what was asked never comes back on that card, rather than nothing being asked.
Author
Owner

@⁠superboynick on GitHub · 2026-11-25 20:27 UTC · original

A runtime data point for the mesh side of this table, from an ordinary run rather than a translate census.

On 0b0074e plus a wave-narrowing change, RTX 5070 Ti Laptop (32-lane), no switches beyond tracing, exactly one mesh pipeline is refused during the prologue:

host PSO creation failed kind="graphics" shader=f5e50eb2108c425b
  shaders=[mesh f5e50eb2108c425b, pixel ce3f0432a08f1d35]
  rootsig_params=3 descriptors="root_bindings" uav=0 srv=1 cbv=0 nodemsk=0 flags=0 cs_len=0 hresult=0x80070057

That is consistent with the linked-mesh-and-pixel case in the description: the mesh program is refused when created together with its pixel program, with a three-parameter root signature carrying one SRV.

For context on the compute side, our five refusals became four after narrowing shaders that cannot observe the wave width - the one that went away was NumThreads=64,1,1, GroupShared=512, no wave intrinsics - so at this point the runtime picture on a 32-lane NVIDIA host is four compute refusals plus this one mesh refusal.

If it helps, the four remaining compute programs are NumThreads 256x1x1, 8x8, 128x1x1 and 1024x1x1 with group-shared sizes 512, 512, 16896 and 32768 bytes; all four use wave operations, which is why they are left alone.

**@⁠superboynick** on GitHub · 2026-11-25 20:27 UTC · [original](https://github.com/fxceless/victory-fork/pull/854#issuecomment-7173692254) A runtime data point for the mesh side of this table, from an ordinary run rather than a translate census. On `0b0074e` plus a wave-narrowing change, RTX 5070 Ti Laptop (32-lane), no switches beyond tracing, exactly one mesh pipeline is refused during the prologue: ``` host PSO creation failed kind="graphics" shader=f5e50eb2108c425b shaders=[mesh f5e50eb2108c425b, pixel ce3f0432a08f1d35] rootsig_params=3 descriptors="root_bindings" uav=0 srv=1 cbv=0 nodemsk=0 flags=0 cs_len=0 hresult=0x80070057 ``` That is consistent with the linked-mesh-and-pixel case in the description: the mesh program is refused when created together with its pixel program, with a three-parameter root signature carrying one SRV. For context on the compute side, our five refusals became four after narrowing shaders that cannot observe the wave width - the one that went away was `NumThreads=64,1,1`, `GroupShared=512`, no wave intrinsics - so at this point the runtime picture on a 32-lane NVIDIA host is four compute refusals plus this one mesh refusal. If it helps, the four remaining compute programs are `NumThreads` 256x1x1, 8x8, 128x1x1 and 1024x1x1 with group-shared sizes 512, 512, 16896 and 32768 bytes; all four use wave operations, which is why they are left alone.
Author
Owner

@⁠superboynick on GitHub · 2026-11-25 20:43 UTC · original

A named instance of the linked mesh-and-pixel case, with both halves of the evidence.

Our runtime run refused one graphics pipeline during the prologue:

host PSO creation failed kind="graphics"
  shaders=[mesh f5e50eb2108c425b, pixel ce3f0432a08f1d35]
  rootsig_params=3 descriptors="root_bindings" uav=0 srv=1 cbv=0 nodemsk=0 flags=0 cs_len=0
  hresult=0x80070057

Running the pack through victory translate --pipelines --list with VICTORY_HOST_WAVE=32 on the same machine, both programs are created when translated on their own, each with a stub for the other stage:

MSNC_VS_WindshieldWiperMask_54c2b473_Wrapped #f5e50eb2108c425b  Ms  pipeline created
PS_WindshieldWiperMask_54c2b473_Wrapped   #ce3f0432a08f1d35  Ps  pipeline created

So the mesh program named MSNC_VS_WindshieldWiperMask is the concrete case: fine alone, refused when linked with PS_WindshieldWiperMask, exactly the failure mode described in the opening comment.

Whole-pack totals on this machine, for comparison with the table above (RTX 5070 Ti, 32-lane, our wave narrowing applied, no --validate because dxil.dll is absent here):

Compute 2649 created   Mesh 8762   Pixel 12008   Vertex 2191   total 25610

The failure summary left after that run is short: 40 descriptor-by-control-flow, 24 invalid-argument pipeline, 10 hardware SGPR input, 5 descriptor-read-as-data, 2 lane mask as data, and one each of two lane-mask cases and a resource-exhaustion failure.

What I could not do: I have no way to swap a stub pixel shader into the runtime path, so the linked case is confirmed by the pair of observations above rather than by an A/B inside the run.

**@⁠superboynick** on GitHub · 2026-11-25 20:43 UTC · [original](https://github.com/fxceless/victory-fork/pull/854#issuecomment-7174093668) A named instance of the linked mesh-and-pixel case, with both halves of the evidence. Our runtime run refused one graphics pipeline during the prologue: ``` host PSO creation failed kind="graphics" shaders=[mesh f5e50eb2108c425b, pixel ce3f0432a08f1d35] rootsig_params=3 descriptors="root_bindings" uav=0 srv=1 cbv=0 nodemsk=0 flags=0 cs_len=0 hresult=0x80070057 ``` Running the pack through `victory translate --pipelines --list` with `VICTORY_HOST_WAVE=32` on the same machine, both programs are created when translated on their own, each with a stub for the other stage: ``` MSNC_VS_WindshieldWiperMask_54c2b473_Wrapped #f5e50eb2108c425b Ms pipeline created PS_WindshieldWiperMask_54c2b473_Wrapped #ce3f0432a08f1d35 Ps pipeline created ``` So the mesh program named `MSNC_VS_WindshieldWiperMask` is the concrete case: fine alone, refused when linked with `PS_WindshieldWiperMask`, exactly the failure mode described in the opening comment. Whole-pack totals on this machine, for comparison with the table above (RTX 5070 Ti, 32-lane, our wave narrowing applied, no `--validate` because dxil.dll is absent here): ``` Compute 2649 created Mesh 8762 Pixel 12008 Vertex 2191 total 25610 ``` The failure summary left after that run is short: 40 descriptor-by-control-flow, 24 invalid-argument pipeline, 10 hardware SGPR input, 5 descriptor-read-as-data, 2 lane mask as data, and one each of two lane-mask cases and a resource-exhaustion failure. What I could not do: I have no way to swap a stub pixel shader into the runtime path, so the linked case is confirmed by the pair of observations above rather than by an A/B inside the run.
Author
Owner

@⁠superboynick on GitHub · 2026-11-25 20:52 UTC · original

Validation-side census from a second machine, since the table above is a translate census. RTX 5070 Ti Laptop, 32-lane, VICTORY_HOST_WAVE=32, validator dxil.dll 1.9 from the DXC v1.9.2609 release, wave narrowing applied.

stage   emitted        validated      pipelines
VS/PS   14199 of 14247 14088          14199
CS       2674 of 2682   2674           2649
MS       8762 of 8765   8657           8762

Pipelines created: CS 2649, MS 8762, PS 12008, VS 2191 - 25610 in total, which is the same order as the 25682 in the table above from a 5090.

What the validator added, beyond the pipeline outcome: 158 error lines, of which 84 are one class - two signature elements packed into the same row with different interpolation modes:

validator: error: signature element NORMAL at location (7,2) size (1,2) has
  interpolation mode that differs from another element packed into the same row
  PS_VfxVBuffer_AlphaClip_0e67afa3_Wrapped #1a3c05a4c0bec967
validator: error: signature element SV_IsFrontFace at location (7,1) size (1,1) ...
  PS_PropFoliageDeferred_Fire_ExportDepth_11bfc62c_Wrapped #ccfabc83c5c1cd02
validator: error: signature element TEXCOORD at location (9,3) size (1,1) ...
  MS_VS_OctaSLODFire_5fd19871_Wrapped #0bd4d80ad23b106b

Affected names cluster on foliage, water, decals and vehicle rasterisation paths - PS_PropFoliageDeferred*, PS_RasterizeWaterVolumeExposedSurface*, PS_VfxVBuffer_AlphaClip*, MS_VS_OctaSLODFire. Every occurrence says one element's interpolation mode disagrees with another element sharing its row, which suggests the emitter assigns modes per element without considering which elements share a packed row.

A further 4 lines are out of bound coord must be undef, on mirror-reflection texture reads.

Not claimed: whether binding these pipelines would be correct if the validator were bypassed - 14088 of 14199 validate, so the class is narrow either way. The point is that it is a named, reproducible failure mode with the programs listed, and it does not appear in a census that runs without --validate.

Note for anyone repeating this: dxil.dll is not present by default on this machine; the DXC release zip supplies it and VICTORY_DXIL points at it.

**@⁠superboynick** on GitHub · 2026-11-25 20:52 UTC · [original](https://github.com/fxceless/victory-fork/pull/854#issuecomment-7174302880) Validation-side census from a second machine, since the table above is a translate census. RTX 5070 Ti Laptop, 32-lane, `VICTORY_HOST_WAVE=32`, validator `dxil.dll` 1.9 from the DXC v1.9.2609 release, wave narrowing applied. ``` stage emitted validated pipelines VS/PS 14199 of 14247 14088 14199 CS 2674 of 2682 2674 2649 MS 8762 of 8765 8657 8762 ``` Pipelines created: CS 2649, MS 8762, PS 12008, VS 2191 - 25610 in total, which is the same order as the 25682 in the table above from a 5090. What the validator added, beyond the pipeline outcome: **158 error lines, of which 84 are one class** - two signature elements packed into the same row with different interpolation modes: ``` validator: error: signature element NORMAL at location (7,2) size (1,2) has interpolation mode that differs from another element packed into the same row PS_VfxVBuffer_AlphaClip_0e67afa3_Wrapped #1a3c05a4c0bec967 validator: error: signature element SV_IsFrontFace at location (7,1) size (1,1) ... PS_PropFoliageDeferred_Fire_ExportDepth_11bfc62c_Wrapped #ccfabc83c5c1cd02 validator: error: signature element TEXCOORD at location (9,3) size (1,1) ... MS_VS_OctaSLODFire_5fd19871_Wrapped #0bd4d80ad23b106b ``` Affected names cluster on foliage, water, decals and vehicle rasterisation paths - `PS_PropFoliageDeferred*`, `PS_RasterizeWaterVolumeExposedSurface*`, `PS_VfxVBuffer_AlphaClip*`, `MS_VS_OctaSLODFire`. Every occurrence says one element's interpolation mode disagrees with another element sharing its row, which suggests the emitter assigns modes per element without considering which elements share a packed row. A further 4 lines are `out of bound coord must be undef`, on mirror-reflection texture reads. Not claimed: whether binding these pipelines would be correct if the validator were bypassed - 14088 of 14199 validate, so the class is narrow either way. The point is that it is a named, reproducible failure mode with the programs listed, and it does not appear in a census that runs without `--validate`. Note for anyone repeating this: `dxil.dll` is not present by default on this machine; the DXC release zip supplies it and `VICTORY_DXIL` points at it.
Author
Owner

@⁠superboynick on GitHub · 2026-11-25 21:09 UTC · original

Follow-up: the interpolation-mode class from my previous comment is fixed and re-measured on the same pack.

The emitter kept the container's row assignment and set interpolation modes per element afterwards, so two elements sharing a row could disagree. Elements are now separated by mode after lowering, and a program that cannot fit within 32 rows is reported unsupported instead of emitted invalid.

Full pack, --validate --pipelines --list, dxil.dll 1.9, 32-lane:

interpolation-mode errors    84 -> 0
all validator errors        158 -> 80
validated vertex and pixel  14088 -> 14135
pipelines created           25610 -> 25610

Two things this does not do: the pipeline count is unchanged, so it corrects generated code rather than unlocking draws, and the four out of bound coord must be undef errors are untouched.

The change is in our fork as a stacked PR on the wave-narrowing branch: https://github.com/superboynick/victory-fork/pull/3 - happy to move it anywhere you prefer.

Worth repeating for anyone running this census: this class is invisible without --validate, which is the likely reason it survived until now.

**@⁠superboynick** on GitHub · 2026-11-25 21:09 UTC · [original](https://github.com/fxceless/victory-fork/pull/854#issuecomment-7174699229) Follow-up: the interpolation-mode class from my previous comment is fixed and re-measured on the same pack. The emitter kept the container's row assignment and set interpolation modes per element afterwards, so two elements sharing a row could disagree. Elements are now separated by mode after lowering, and a program that cannot fit within 32 rows is reported unsupported instead of emitted invalid. Full pack, `--validate --pipelines --list`, dxil.dll 1.9, 32-lane: ``` interpolation-mode errors 84 -> 0 all validator errors 158 -> 80 validated vertex and pixel 14088 -> 14135 pipelines created 25610 -> 25610 ``` Two things this does not do: the pipeline count is unchanged, so it corrects generated code rather than unlocking draws, and the four `out of bound coord must be undef` errors are untouched. The change is in our fork as a stacked PR on the wave-narrowing branch: https://github.com/superboynick/victory-fork/pull/3 - happy to move it anywhere you prefer. Worth repeating for anyone running this census: this class is invisible without ``--validate``, which is the likely reason it survived until now.
Author
Owner

@⁠superboynick on GitHub · 2026-11-25 21:26 UTC · original

Second fix in the same area, measured on the same pack.

After the interpolation-row change, what remained were 80 lines of Container part 'Program Input/Output Signature' does not match expected for module. Both parts were being rebuilt from the lowered module but ordered by column instead of by name within each register, so the validator disagreed with the module it was reading.

With that corrected, full pack, --validate --pipelines --list, dxil.dll 1.9, 32-lane:

                            before   interp fix   this too
container signature mismatch    80  ->     80   ->    0
interpolation-mode errors       84  ->      0   ->    0
validated vertex and pixel   14088  ->  14135   -> 14196
pipelines created            25610  ->  25610   -> 25610

What is left in the validator: 72 mesh programs whose combined vertex and primitive output signatures exceed the limit - the case described at the top of this issue - and 4 out of bound coord must be undef on mirror-reflection texture reads.

Both changes are in our fork, stacked: https://github.com/superboynick/victory-fork/pull/3

**@⁠superboynick** on GitHub · 2026-11-25 21:26 UTC · [original](https://github.com/fxceless/victory-fork/pull/854#issuecomment-7175069418) Second fix in the same area, measured on the same pack. After the interpolation-row change, what remained were 80 lines of `Container part 'Program Input/Output Signature' does not match expected for module`. Both parts were being rebuilt from the lowered module but ordered by column instead of by name within each register, so the validator disagreed with the module it was reading. With that corrected, full pack, `--validate --pipelines --list`, dxil.dll 1.9, 32-lane: ``` before interp fix this too container signature mismatch 80 -> 80 -> 0 interpolation-mode errors 84 -> 0 -> 0 validated vertex and pixel 14088 -> 14135 -> 14196 pipelines created 25610 -> 25610 -> 25610 ``` What is left in the validator: 72 mesh programs whose combined vertex and primitive output signatures exceed the limit - the case described at the top of this issue - and 4 `out of bound coord must be undef` on mirror-reflection texture reads. Both changes are in our fork, stacked: https://github.com/superboynick/victory-fork/pull/3
Author
Owner

@⁠superboynick on GitHub · 2026-11-25 21:26 UTC · original

Numbers for the 32 KiB case, since it is now the largest remaining class on this machine.

After the two fixes above, 72 of the 76 remaining validator errors are one message:

validator: Function: main: error: For shader 'main',
  vertex plus primitive output size is greater than 32768.

All 72 are mesh programs, and the names cluster on the ped-skinning variants:

MS_VS_PedTransform_Decals_52f61330_Wrapped          #e7f6ba5d1754ea8c
MS_VS_PedTransformFire_52f61330_Wrapped             #cae2477d493c3988
MS_VS_PedTransformTransmissionFire_52f61330_Wrapped #be7cb028c31b0895
MSNC_VS_PedTransformSkin_Decals_70522ddb_Wrapped
MSNC_VS_PedTransformSkinFire_70522ddb_Wrapped
MSNC_VS_PedTransformSkinTransmissionFire_70522ddb_Wrapped

Note that these are the MS_/MSNC_ mesh forms of vertex programs whose vertex form validates fine, so the same attribute set fits when written as a vertex output and does not when written as a mesh output plus primitive output.

One question worth answering before anyone spends time on it: are these programs genuinely over the limit, or does the emitted output signature spend rows it need not - one scalar per element rather than packing four into a row? I do not know which, and I have not changed anything to find out.

The remaining 4 errors are out of bound coord must be undef on mirror-reflection reads, unrelated.

**@⁠superboynick** on GitHub · 2026-11-25 21:26 UTC · [original](https://github.com/fxceless/victory-fork/pull/854#issuecomment-7175077507) Numbers for the 32 KiB case, since it is now the largest remaining class on this machine. After the two fixes above, 72 of the 76 remaining validator errors are one message: ``` validator: Function: main: error: For shader 'main', vertex plus primitive output size is greater than 32768. ``` All 72 are mesh programs, and the names cluster on the ped-skinning variants: ``` MS_VS_PedTransform_Decals_52f61330_Wrapped #e7f6ba5d1754ea8c MS_VS_PedTransformFire_52f61330_Wrapped #cae2477d493c3988 MS_VS_PedTransformTransmissionFire_52f61330_Wrapped #be7cb028c31b0895 MSNC_VS_PedTransformSkin_Decals_70522ddb_Wrapped MSNC_VS_PedTransformSkinFire_70522ddb_Wrapped MSNC_VS_PedTransformSkinTransmissionFire_70522ddb_Wrapped ``` Note that these are the `MS_`/`MSNC_` mesh forms of vertex programs whose vertex form validates fine, so the same attribute set fits when written as a vertex output and does not when written as a mesh output plus primitive output. One question worth answering before anyone spends time on it: are these programs genuinely over the limit, or does the emitted output signature spend rows it need not - one scalar per element rather than packing four into a row? I do not know which, and I have not changed anything to find out. The remaining 4 errors are `out of bound coord must be undef` on mirror-reflection reads, unrelated.
Author
Owner

@⁠superboynick on GitHub · 2026-11-25 21:27 UTC · original

Answering my own question from the previous comment, having looked at how our emitter builds these signatures.

Compacting the rows cannot fix it. Our output signatures inherit the container's registers and masks rather than assigning one element per row - a vec3 already shares its row with whatever else was packed there in the source. More to the point, the validator's 32768 counts components, not rows: on our side the estimate is 4 * (vertex components rounded to 32 + primitive components) over the actual component counts. Row packing therefore saves nothing against this limit.

So the 72 programs are either genuinely over the component budget or they carry components they need not. Which of those is true needs a per-program signature dump, which I have not produced.

Recording it because the "pack the rows tighter" idea looks attractive and does not help here - the number that matters is the component count, and the emitted set already sits on the container's allocation.

**@⁠superboynick** on GitHub · 2026-11-25 21:27 UTC · [original](https://github.com/fxceless/victory-fork/pull/854#issuecomment-7175097535) Answering my own question from the previous comment, having looked at how our emitter builds these signatures. **Compacting the rows cannot fix it.** Our output signatures inherit the container's registers and masks rather than assigning one element per row - a vec3 already shares its row with whatever else was packed there in the source. More to the point, the validator's 32768 counts **components**, not rows: on our side the estimate is `4 * (vertex components rounded to 32 + primitive components)` over the actual component counts. Row packing therefore saves nothing against this limit. So the 72 programs are either genuinely over the component budget or they carry components they need not. Which of those is true needs a per-program signature dump, which I have not produced. Recording it because the "pack the rows tighter" idea looks attractive and does not help here - the number that matters is the component count, and the emitted set already sits on the container's allocation.
Author
Owner

@⁠superboynick on GitHub · 2026-11-25 21:39 UTC · original

Per-program signature counts for those 72 mesh failures, measured with a temporary trace switch on our emitter. 71 unique hashes, all MS_/MSNC_ ped-skinning forms, all with primitive_components=0 - the whole budget goes on vertex outputs.

total components   8320 - 9088
limit              8192
over by            128, 256, 384, 512, 640, 896   (6, 33, 15, 8, 6, 3 programs)
elements           20, 21, 22, 23

One example verbatim:

name=MS_VS_PedTransformFire_52f61330_Wrapped
vertex_components=8448 primitive_components=0
total_components=8448 rows=20 elements=20 estimated_bytes=33792

Two things follow from that shape.

The overshoot is small: 1.6% in the best case, 11% in the worst, with 33 of 71 sitting at +256 components. These are not programs that need a different path; they need to carry less.

And since primitive_components is zero throughout, nothing is being spent on primitive attributes - the budget is entirely vertex outputs at 20 to 23 elements. Our own I/O summary on this pack counts 154 exported parameters that the consuming stage never reads, so dropping unread outputs is the obvious lever before anything clever.

Not claiming that dropping exactly those 154 is sufficient: I have not matched unread exports to these specific programs. But the arithmetic says each of these needs only one to seven elements fewer, depending on the row, and unread outputs are the cheapest candidates.

**@⁠superboynick** on GitHub · 2026-11-25 21:39 UTC · [original](https://github.com/fxceless/victory-fork/pull/854#issuecomment-7175367225) Per-program signature counts for those 72 mesh failures, measured with a temporary trace switch on our emitter. 71 unique hashes, all `MS_`/`MSNC_` ped-skinning forms, all with `primitive_components=0` - the whole budget goes on vertex outputs. ``` total components 8320 - 9088 limit 8192 over by 128, 256, 384, 512, 640, 896 (6, 33, 15, 8, 6, 3 programs) elements 20, 21, 22, 23 ``` One example verbatim: ``` name=MS_VS_PedTransformFire_52f61330_Wrapped vertex_components=8448 primitive_components=0 total_components=8448 rows=20 elements=20 estimated_bytes=33792 ``` Two things follow from that shape. The overshoot is **small**: 1.6% in the best case, 11% in the worst, with 33 of 71 sitting at +256 components. These are not programs that need a different path; they need to carry less. And since `primitive_components` is zero throughout, nothing is being spent on primitive attributes - the budget is entirely vertex outputs at 20 to 23 elements. Our own I/O summary on this pack counts 154 exported parameters that the consuming stage never reads, so dropping unread outputs is the obvious lever before anything clever. Not claiming that dropping exactly those 154 is sufficient: I have not matched unread exports to these specific programs. But the arithmetic says each of these needs only one to seven elements fewer, depending on the row, and unread outputs are the cheapest candidates.
Author
Owner

@⁠superboynick on GitHub · 2026-11-25 21:45 UTC · original

Correcting the suggestion at the end of my previous comment: "drop unread outputs" is not available to the emitter today, so it is not the cheap lever I implied.

At emit time there is no consumer information. The unread param count in our I/O summary comes from a placeholder (param0) that the lowering already ignores; it is not a set of signature elements anyone can drop, and it does not identify which vertex outputs the pixel stage never reads. Wiring that up needs the paired pixel program on hand when the vertex or mesh signature is built, which is a real change rather than a flag.

I built the switch to be sure: with the conservative fallback in place, the 71 programs are unchanged (over the limit 71 before and after, largest 9088 before and after), which is what a no-op should show.

So the +128 to +896 overshoot is still unexplained in terms of what to remove. Two ways forward that I can see: pair each mesh program with its pixel program at emit time and drop only outputs that both agree are unread, or find where these ped-skinning outputs are wider than the console's own signature needs. I do not know which is right, and I would rather say so than leave a plausible-sounding direction in the thread.

**@⁠superboynick** on GitHub · 2026-11-25 21:45 UTC · [original](https://github.com/fxceless/victory-fork/pull/854#issuecomment-7175499257) Correcting the suggestion at the end of my previous comment: "drop unread outputs" is not available to the emitter today, so it is not the cheap lever I implied. At emit time there is no consumer information. The `unread param` count in our I/O summary comes from a placeholder (param0) that the lowering already ignores; it is not a set of signature elements anyone can drop, and it does not identify which vertex outputs the pixel stage never reads. Wiring that up needs the paired pixel program on hand when the vertex or mesh signature is built, which is a real change rather than a flag. I built the switch to be sure: with the conservative fallback in place, the 71 programs are unchanged (over the limit 71 before and after, largest 9088 before and after), which is what a no-op should show. So the +128 to +896 overshoot is still unexplained in terms of what to remove. Two ways forward that I can see: pair each mesh program with its pixel program at emit time and drop only outputs that both agree are unread, or find where these ped-skinning outputs are wider than the console's own signature needs. I do not know which is right, and I would rather say so than leave a plausible-sounding direction in the thread.
Author
Owner

@⁠PiloteCode on GitHub · 2026-11-25 22:11 UTC · original

Merged main (c36971b) into the branch: a merge commit on top of the commits already here (f66feef), then two lint commits. No conflict.

Where both sides changed the same code. main's c36971b adds loads of four dwords a call to the translator (VICTORY_SHADER_OPT bit 64, not in the default) in emit/lower.rs, emit/mod.rs and emit/bitcode/opt.rs, which this branch changes too. They merge side by side: main's new paths are taken only with the bit on, and its test of them passes here. emit/lower.rs is 504,469 bytes of the policy's 524,288. The rest of main's commits is in files this branch does not change, but for the README and three lint lines.

Added after the merge: two lint commits for main's newer code, the same as on our other open branches: manual_is_multiple_of in shadow.rs, queue.rs, draw.rs and watch.rs, map_entry in fpsbox.rs, collapsible_if in pipeline/library.rs. Without them cargo clippy --workspace --all-targets --locked -- -D warnings fails on c36971b, with or without --all-features.

Checked, the branch as it is (6e52a49), every test on the software adapter (the description's test counts are from the card, on 9376fd6):

  • cargo clippy --workspace --all-targets --locked -- -D warnings, and the same with --all-features: clean.
  • cargo xtask policy, cargo build --release -p victory and cargo build --profile diag -p victory --features diagnostics: pass.
  • cargo test -p victory-shader -- --test-threads=1 with VICTORY_WARP=1: 238 passed, 5 failed, 2 ignored. Four of the five fail on main alone on the software adapter (212 passed, 4 failed, 3 ignored): ds_min_max_f32_order_floats_and_return_the_old_value, v_permlane16_and_x16_read_the_lanes_their_selectors_pick, whole_wave_f64_sum_and_cvt_f32_f64 and a_lane_mask_joined_with_a_number_is_read_as_the_number_it_is. The fifth is this branch's lds_subtractions_get_a_pipeline_and_stay_atomic. The description's run on the card, on 9376fd6, had no failure; the merged branch has not run on the card.
  • cargo test -p victory-gpu --features diagnostics -- --test-threads=1 with VICTORY_D3D12_WARP=1: 200 passed, 1 failed, 6 ignored, as on main. The failure is depth_bounds_pipeline_loads_and_filters_draws: WARP does not reject the pixels outside the depth bounds.
  • cargo test -p victory-hle -- --test-threads=1: 100 + 1 passed, as on main.
  • cargo test -p victory -p victory-loader: passed.
**@⁠PiloteCode** on GitHub · 2026-11-25 22:11 UTC · [original](https://github.com/fxceless/victory-fork/pull/854#issuecomment-7176054138) Merged `main` (`c36971b`) into the branch: a merge commit on top of the commits already here (`f66feef`), then two lint commits. No conflict. **Where both sides changed the same code.** `main`'s c36971b adds loads of four dwords a call to the translator (`VICTORY_SHADER_OPT` bit 64, not in the default) in `emit/lower.rs`, `emit/mod.rs` and `emit/bitcode/opt.rs`, which this branch changes too. They merge side by side: `main`'s new paths are taken only with the bit on, and its test of them passes here. `emit/lower.rs` is 504,469 bytes of the policy's 524,288. The rest of `main`'s commits is in files this branch does not change, but for the README and three lint lines. **Added after the merge:** two lint commits for `main`'s newer code, the same as on our other open branches: `manual_is_multiple_of` in `shadow.rs`, `queue.rs`, `draw.rs` and `watch.rs`, `map_entry` in `fpsbox.rs`, `collapsible_if` in `pipeline/library.rs`. Without them `cargo clippy --workspace --all-targets --locked -- -D warnings` fails on `c36971b`, with or without `--all-features`. **Checked**, the branch as it is (`6e52a49`), every test on the software adapter (the description's test counts are from the card, on `9376fd6`): - `cargo clippy --workspace --all-targets --locked -- -D warnings`, and the same with `--all-features`: clean. - `cargo xtask policy`, `cargo build --release -p victory` and `cargo build --profile diag -p victory --features diagnostics`: pass. - `cargo test -p victory-shader -- --test-threads=1` with `VICTORY_WARP=1`: 238 passed, 5 failed, 2 ignored. Four of the five fail on `main` alone on the software adapter (212 passed, 4 failed, 3 ignored): `ds_min_max_f32_order_floats_and_return_the_old_value`, `v_permlane16_and_x16_read_the_lanes_their_selectors_pick`, `whole_wave_f64_sum_and_cvt_f32_f64` and `a_lane_mask_joined_with_a_number_is_read_as_the_number_it_is`. The fifth is this branch's `lds_subtractions_get_a_pipeline_and_stay_atomic`. The description's run on the card, on `9376fd6`, had no failure; the merged branch has not run on the card. - `cargo test -p victory-gpu --features diagnostics -- --test-threads=1` with `VICTORY_D3D12_WARP=1`: 200 passed, 1 failed, 6 ignored, as on `main`. The failure is `depth_bounds_pipeline_loads_and_filters_draws`: WARP does not reject the pixels outside the depth bounds. - `cargo test -p victory-hle -- --test-threads=1`: 100 + 1 passed, as on `main`. - `cargo test -p victory -p victory-loader`: passed.
Author
Owner

@⁠superboynick on GitHub · 2026-11-25 22:33 UTC · original

Third and final class from my earlier comments is fixed, so here is the whole set in one place.

All three were invisible without --validate - the programs in question already had pipelines - and all three are now zero on the retail pack:

                            origin/main   after
interpolation-mode errors            84       0
container signature mismatch         74       0
out of bound coord                    4       0
validated vertex and pixel        14088   14199
pipelines created                 25607   25607

The third one was small and dull: an array-layer index was passed into the third coordinate of a level-of-detail query with the remaining slots left as they came, which the validator reads as an out-of-bounds coordinate rather than an unused one. It affected exactly the three *_AlphaClip pixel shaders that appeared in my earlier list.

All 14,199 emitted vertex and pixel programs now validate, with the pipeline count unchanged, so this corrects generated code rather than unlocking draws.

What remains on this host is the case at the top of this issue: 72 mesh programs whose combined vertex and primitive output exceeds 32768 components. Their overshoot is 128 to 896 components, 33 of 71 unique hashes sitting at +256, all ped-skinning meshes with no primitive outputs at all. I documented that in an earlier comment and did not attempt it.

All three changes are in one PR now: #1160

**@⁠superboynick** on GitHub · 2026-11-25 22:33 UTC · [original](https://github.com/fxceless/victory-fork/pull/854#issuecomment-7176514241) Third and final class from my earlier comments is fixed, so here is the whole set in one place. All three were invisible without `--validate` - the programs in question already had pipelines - and all three are now zero on the retail pack: ``` origin/main after interpolation-mode errors 84 0 container signature mismatch 74 0 out of bound coord 4 0 validated vertex and pixel 14088 14199 pipelines created 25607 25607 ``` The third one was small and dull: an array-layer index was passed into the third coordinate of a level-of-detail query with the remaining slots left as they came, which the validator reads as an out-of-bounds coordinate rather than an unused one. It affected exactly the three `*_AlphaClip` pixel shaders that appeared in my earlier list. All 14,199 emitted vertex and pixel programs now validate, with the pipeline count unchanged, so this corrects generated code rather than unlocking draws. What remains on this host is the case at the top of this issue: 72 mesh programs whose combined vertex and primitive output exceeds 32768 components. Their overshoot is 128 to 896 components, 33 of 71 unique hashes sitting at +256, all ped-skinning meshes with no primitive outputs at all. I documented that in an earlier comment and did not attempt it. All three changes are in one PR now: https://git.gtahub.st/github/fxceless--victory-fork/pulls/1160
Author
Owner

@⁠PiloteCode on GitHub · 2026-11-25 22:54 UTC · original

@⁠DoubleD17 thanks, you are right: on a GPU of 32-lane waves that test passed with nothing run on the card. It lowered the program for 64-lane waves only, the device refused the pipeline, and the test returned.

It now does what you describe (51700c6, test only):

  • the device is asked how wide its waves are (WaveLaneCountMax of D3D12_OPTIONS1) before the form is chosen;
  • 64 lanes: the console's own form, as before; 32 lanes: the paired form (paired(&native), which also validates it); fewer (the software adapter's 4): a line, and nothing run;
  • the pipeline and the dispatch are made on that same device, one device for the eight cases, and a refusal now fails the test.

On our RTX 5090 (32-lane waves), cargo test -p victory-shader wave64_tests: 15 passed, and this test says "ran on the hardware device (waves of at most 32 lanes)": the paired form gives the console's tree bit for bit with 64, 63, 40, 33, 32, 17, 5 and 1 lanes left, as in your run on the RTX 5070. On the software adapter it prints "the hardware device's waves hold at most 4 lanes; not run". Clippy (with and without --all-features) and cargo xtask policy pass.

The change is merged into #993 and #994 as well, since both contain this branch.

**@⁠PiloteCode** on GitHub · 2026-11-25 22:54 UTC · [original](https://github.com/fxceless/victory-fork/pull/854#issuecomment-7176933093) @⁠DoubleD17 thanks, you are right: on a GPU of 32-lane waves that test passed with nothing run on the card. It lowered the program for 64-lane waves only, the device refused the pipeline, and the test returned. It now does what you describe (`51700c6`, test only): - the device is asked how wide its waves are (`WaveLaneCountMax` of `D3D12_OPTIONS1`) before the form is chosen; - 64 lanes: the console's own form, as before; 32 lanes: the paired form (`paired(&native)`, which also validates it); fewer (the software adapter's 4): a line, and nothing run; - the pipeline and the dispatch are made on that same device, one device for the eight cases, and a refusal now fails the test. On our RTX 5090 (32-lane waves), `cargo test -p victory-shader wave64_tests`: 15 passed, and this test says "ran on the hardware device (waves of at most 32 lanes)": the paired form gives the console's tree bit for bit with 64, 63, 40, 33, 32, 17, 5 and 1 lanes left, as in your run on the RTX 5070. On the software adapter it prints "the hardware device's waves hold at most 4 lanes; not run". Clippy (with and without `--all-features`) and `cargo xtask policy` pass. The change is merged into #993 and #994 as well, since both contain this branch.
Author
Owner

@⁠PiloteCode on GitHub · 2026-11-25 22:54 UTC · original

@⁠superboynick thanks for the series. What of it meets this PR:

  • f5e50eb2108c425b with ce3f0432a08f1d35: as you found, each half is created on its own. The pair writes a uint target with blending on, and D3D12 refuses a pipeline that blends an integer target (#51): a matter of the blend state, which this PR does not touch.
  • The 71 mesh programs over 32 KiB of vertex output (your 72 lines, the ped-skinning forms): that is the case this PR links. The consumer information you say the emitter lacks is what link_mesh brings: the mesh program is translated again with the pixel program of its pipeline, and keeps only the outputs that program reads. #993, stacked on this one, adds the form for the same programs drawn with no pixel program (system values only).
  • Your three validator classes (interpolation modes, the container's signature, the out-of-bound coordinate): in our census of this branch (victory translate --validate --list, 32-lane host), all 14,259 vertex and pixel programs translate and validate, so none of the three shows there. We have not run it against the 1.9 validator you used; if you run --validate on this branch with it and a class comes back, the program names would tell us where.
**@⁠PiloteCode** on GitHub · 2026-11-25 22:54 UTC · [original](https://github.com/fxceless/victory-fork/pull/854#issuecomment-7176933309) @⁠superboynick thanks for the series. What of it meets this PR: - `f5e50eb2108c425b` with `ce3f0432a08f1d35`: as you found, each half is created on its own. The pair writes a uint target with blending on, and D3D12 refuses a pipeline that blends an integer target (#51): a matter of the blend state, which this PR does not touch. - The 71 mesh programs over 32 KiB of vertex output (your 72 lines, the ped-skinning forms): that is the case this PR links. The consumer information you say the emitter lacks is what `link_mesh` brings: the mesh program is translated again with the pixel program of its pipeline, and keeps only the outputs that program reads. #993, stacked on this one, adds the form for the same programs drawn with no pixel program (system values only). - Your three validator classes (interpolation modes, the container's signature, the out-of-bound coordinate): in our census of this branch (`victory translate --validate --list`, 32-lane host), all 14,259 vertex and pixel programs translate and validate, so none of the three shows there. We have not run it against the 1.9 validator you used; if you run `--validate` on this branch with it and a class comes back, the program names would tell us where.
Author
Owner

@⁠HyperEndgame on GitHub · 2026-11-26 00:43 UTC · original

Tested #854 on 085ee7c. Offline, it clears all 27 compute refusals on 32-lane waves. One in-game run reached the first gameplay room with no compute refusals and no device loss.

Setup

  • GPU: RTX 4070 SUPER 12 GB (32-lane waves), driver 32.0.16.2101
  • CPU / RAM / OS: Ryzen 7 7700X, 32 GB, Windows 11
  • Profile: Series X
  • Base: main 085ee7c plus #854
  • Offline: VICTORY_HOST_MAX_WAVE=32, translate with --validate --pipelines --list over the shader pack

Offline results

  • main 085ee7c: 27 unique compute programs refused (E_INVALIDARG). Compute pipelines created: 2647.
  • main + #854: 0 refused. Compute pipelines created: 2677.
  • No new failures. 5 emit/validator failures remain, all already on main.
  • victory-shader tests: 242 pass, 0 fail, 2 ignored.

Comparison (refused compute programs, out of 27)

Variant Refused New failures
#592 26 0
#500 (VICTORY_LDS_EXACT=1) 26 0
#592 + #500 25 0
#883 (VICTORY_WAVE_PAIRS=1) 27 0
#854 0 0

#592 + #500 needed a manual conflict fix in lds_meetings. Its correctness is unverified.

Recovered programs (baseline list)

  • GPU particle emit/update: 8
  • Projected decal trails: 9
  • Triangle clip: 3
  • Water transmission volumetrics: 3
  • Hair screen-space shadow masks: 2
  • Alpha transmission prefilter: 1
  • Tiling pass: 1

In-game run (release build, 085ee7c plus #854, README switch set)

  • Reached the first gameplay room.
  • Compute pipeline refusals: 0.
  • Device loss or crash in the log: none found.
  • One mesh pipeline still refused (mesh + pixel pair, 0x80070057, hashes f5e50eb2108c425b / ce3f0432a08f1d35). Likely the integer-target blend case covered by other PRs. Unverified.
  • First room: ~6.6 fps (~150 ms a frame) at ~6,900 draws a frame, from the frame log line.
  • Run length: about 15 minutes, one run.

Not tested

  • Visual match of each recovered program against main.
  • Frame cost of the paired form in isolation.
  • 64-lane GPUs, Intel GPUs, Series S, Linux.
**@⁠HyperEndgame** on GitHub · 2026-11-26 00:43 UTC · [original](https://github.com/fxceless/victory-fork/pull/854#issuecomment-7179058575) Tested #854 on `085ee7c`. Offline, it clears all 27 compute refusals on 32-lane waves. One in-game run reached the first gameplay room with no compute refusals and no device loss. **Setup** - GPU: RTX 4070 SUPER 12 GB (32-lane waves), driver 32.0.16.2101 - CPU / RAM / OS: Ryzen 7 7700X, 32 GB, Windows 11 - Profile: Series X - Base: main `085ee7c` plus #854 - Offline: `VICTORY_HOST_MAX_WAVE=32`, translate with `--validate --pipelines --list` over the shader pack **Offline results** - main `085ee7c`: 27 unique compute programs refused (`E_INVALIDARG`). Compute pipelines created: 2647. - main + #854: 0 refused. Compute pipelines created: 2677. - No new failures. 5 emit/validator failures remain, all already on main. - victory-shader tests: 242 pass, 0 fail, 2 ignored. **Comparison (refused compute programs, out of 27)** | Variant | Refused | New failures | |---|---|---| | #592 | 26 | 0 | | #500 (`VICTORY_LDS_EXACT=1`) | 26 | 0 | | #592 + #500 | 25 | 0 | | #883 (`VICTORY_WAVE_PAIRS=1`) | 27 | 0 | | #854 | 0 | 0 | #592 + #500 needed a manual conflict fix in `lds_meetings`. Its correctness is unverified. **Recovered programs (baseline list)** - GPU particle emit/update: 8 - Projected decal trails: 9 - Triangle clip: 3 - Water transmission volumetrics: 3 - Hair screen-space shadow masks: 2 - Alpha transmission prefilter: 1 - Tiling pass: 1 **In-game run (release build, `085ee7c` plus #854, README switch set)** - Reached the first gameplay room. - Compute pipeline refusals: 0. - Device loss or crash in the log: none found. - One mesh pipeline still refused (mesh + pixel pair, `0x80070057`, hashes `f5e50eb2108c425b` / `ce3f0432a08f1d35`). Likely the integer-target blend case covered by other PRs. Unverified. - First room: ~6.6 fps (~150 ms a frame) at ~6,900 draws a frame, from the frame log line. - Run length: about 15 minutes, one run. **Not tested** - Visual match of each recovered program against main. - Frame cost of the paired form in isolation. - 64-lane GPUs, Intel GPUs, Series S, Linux.
Author
Owner

@⁠ArturoWolff on GitHub · 2026-11-26 00:08 UTC · original · edited 2026-11-26 00:56 UTC

RTX 4060 8 GB / Linux / Proton: paired form restores all four specific compute PSOs, and five synthetic GPU readbacks pass.

This follows our partial-world run on the older integrated tree (#210), which reached recognizable but dark geometry and logged four distinct WaveSize(64) refusals. I used PiloteCode's exact #854 head 51700c6d43a3507fa65e50fe4bb64074ce706cd4, clean detached checkout, Rust 1.98.1 cross-built with LLVM MinGW (cargo build --locked --offline --target x86_64-pc-windows-gnullvm --release -p victory --features diagnostics). Executable SHA-256 81e61f1865fffb8de93d1485bc902838f239b0fecc568c6b4d0ff910b80168bc.

Same binary, same four formerly refused containers (CLI recomputed all four hash labels), separate copies of the same prefix, initially empty explicit driver-cache directories, GE-Proton11-14 with the official 71cae091b06571e vkd3d-proton x64 overlay; DXVK reports NVIDIA RTX 4060, driver 620.73.4, skipping the software adapter. VICTORY_HOST_MAX_WAVE=32, translate --jobs 1 --list --validate --pipelines, with only VICTORY_WAVE_PAIRS varied:

Compute hash Paired=0 Paired=1
02384a60fda6f2d0 Validated; PSO refused Validated; PSO created
2cc4c197ee29e291 Validated; PSO refused Validated; PSO created
2da4beb386509b77 Validated; PSO refused Validated; PSO created
369cbe906ea72764 Validated; PSO refused Validated; PSO created

4 emitted of 4 compute programs; 4 validated, 0 pipelines versus 4 emitted of 4 compute programs; 4 validated, 4 pipelines. Control logs four Required WaveSize range [64, 64], but supported range is [32, 32] messages; enabled logs zero. Both processes exit 0, no host-memory guard stop or OOM count change. This is a PSO-creation test, not execution of those four game shaders.

Separately built the unmodified shader lib tests from that same revision with --features host,diagnostics. The first paired_lanes --test-threads=1 --nocapture headless attempt timed out after 360 s in the first test; its last device-init messages were DXVK/OpenXR, before adapter enumeration or a dispatch receipt. I cannot attribute this to the shader. Retried the same test binary with a private rootless XWayland display, another copy of the original prefix, an initially empty explicit driver-cache directory and a 90 s inner timeout. The actual runtime again logged 71cae091b06571e and RTX 4060. Exit 0, 5 passed; 0 failed; 0 ignored; 240 filtered out. All five printed their actual hardware execution witnesses: two console waves/loops/LDS; OR of both halves; permutes/row masks/swizzles/lane writes; LDS/lane reads/masks across halves; and the half sum 0x5914. No skip messages, and the CPU-oracle comparisons completed. No reported Xid or OOM in the accessible journal interval. All guarded units retired between attempts.

This verifies a narrow Linux/NVIDIA PSO and synthetic correctness milestone, not the title's rendering or the performance of the paired program. I would now test #854's paired form in the retail integration before adding #993's other changes. No game assets, shader dumps, or captures attached. Relevant alternatives are #823 and DexNom/VIctory#40; the four PSOs above are the specific locally observed refusals, including the multi-wave cases.

Retail follow-up, same-build paired on/off comparison: I integrated this exact head with our previously tested Linux changes from #1056 (c5820acd), #830 (951dc00, Filip722), #20 (d4a36b1, ErRusso), and #1006 (4e7af7b, OctoAlgo, port of desplmfao's upstream #2143). Resolved two lint-only merge conflicts and combined the pipeline-library rejected-file preservation from this tree with #1056's early-list fall-through; the previous #830/#20 patch applied except for a README hunk, which I omitted. #1006 applied without conflict. No #993 changes. Integration diff SHA-256 f7930b860c3caeba36f086d6a5b079c436dfca3c838f3139527cd5eb639cbc10. New executable SHA-256 a9f9c69e4382379fbb1d3f202b243840c75d23636c90356def6f27f5dc752be3, same release+diagnostics build recipe.

Two sequential 330 s Series X runs, same exe, GE-Proton11-14 / verified 71cae09, 1920x1080, file physical backing, texture guard=0/no-wait=1. Fresh copies of the same original prefix/saves and identical prior translation/driver-cache seed (1,638 early keys). Both log the 1,638 keys and mapping of a read-only vkd3d cache. New translator fingerprint: first reported translation counters have zero hits in both arms (228 vs 166 misses), so this is not a warm-translator comparison. Both proceeded to loading artwork without a qualifying visible account-picker prompt; the same prompt-gated input script sent no controller input in either arm. No input response tested.

Title compute Pairing off Pairing on
02384a60fda6f2d0 First bind requested; PSO refused First bind requested; host PSO success
2cc4c197ee29e291 First bind requested; PSO refused First bind requested; host PSO success
2da4beb386509b77 First bind requested; PSO refused First bind requested; host PSO success
369cbe906ea72764 First bind requested; PSO refused First bind requested; host PSO success

The compute host-pipeline success log is after the successful D3D12 PSO call; first-bind messages are requests, not proof each dispatch executed or produced correct output. With pairing off: four WaveSize refusals; on: zero. In both, the game captures show the loading art (about 47 s vs 46 s), then black transition frames through the scheduled stop, despite the logged world-stage pipeline binds (first target at ~242 vs ~269 s). Neither arm produced recognizable world geometry in these 34 private captures per arm. End-of-run pending pipeline counts 482 vs 701; post-transition intervals 0.1–1.0 vs 0.2–0.8 FPS, not a common visible-world performance benchmark. No HUD, subtitles, credits, control or correct lighting verified.

Off/on respectively: whole-device peak VRAM 7,163/6,789 MiB; scope peak charged 9,683/9,521 MiB; swap 2,976/2,998 MiB; minimum host MemAvailable 4,223/3,963 MiB. Game PCM nonzero in 10/21 and 13/21 chunks, fidelity unknown. Both stopped on schedule at 333.4 s, no guard stop, OOM counter advance, matching device removal lines or Xid in accessible journal; both units retired. Prior integrated build had visible partial geometry in a warm run; these runs are not a controlled comparison with that earlier build. The next useful comparison is a mode-specific warmed repeat, not a claim of a visual fix from PSO creation alone. No game assets or captures attached.

Warmed retail follow-up: same exact integrated binary, each mode warmed by one previous scheduled run. Both reached recognizable 3D geometry and the opening night cutscene with visible subtitles after one actual account-picker controller A press/release each. Pairing again removed the four Wave64 PSO refusals; no shader translation failures logged with it on, one f133e35efed2a48a with it off. Both close-ups still show black facial skin/detail despite visible colored light on shoulders. Pipeline backlog reached zero; no in-world control or correct lighting established. A further byte-identical-seed comparison of the same paired-on binary with existing VICTORY_LEVELS_ON_DEMAND=1 also left the face black, though it reached visible intro credits. Detailed texture-residency baseline and counters. This is why I am testing #1031/#1210 next rather than treating the four recovered PSOs as a visual fix.

AI assistance: Hermes Agent, working on behalf of ArturoWolff. (GPT 6.2 Sol High)

**@⁠ArturoWolff** on GitHub · 2026-11-26 00:08 UTC · [original](https://github.com/fxceless/victory-fork/pull/854#issuecomment-7178434025) · edited 2026-11-26 00:56 UTC **RTX 4060 8 GB / Linux / Proton: paired form restores all four specific compute PSOs, and five synthetic GPU readbacks pass.** This follows our partial-world run on the older integrated tree ([#210](https://git.gtahub.st/github/fxceless--victory-fork/pulls/210)), which reached recognizable but dark geometry and logged four distinct `WaveSize(64)` refusals. I used PiloteCode's exact #854 head `51700c6d43a3507fa65e50fe4bb64074ce706cd4`, clean detached checkout, Rust 1.98.1 cross-built with LLVM MinGW (`cargo build --locked --offline --target x86_64-pc-windows-gnullvm --release -p victory --features diagnostics`). Executable SHA-256 `81e61f1865fffb8de93d1485bc902838f239b0fecc568c6b4d0ff910b80168bc`. Same binary, same four formerly refused containers (CLI recomputed all four hash labels), separate copies of the same prefix, initially empty explicit driver-cache directories, GE-Proton11-14 with the official `71cae091b06571e` vkd3d-proton x64 overlay; DXVK reports NVIDIA RTX 4060, driver 620.73.4, skipping the software adapter. `VICTORY_HOST_MAX_WAVE=32`, `translate --jobs 1 --list --validate --pipelines`, with only `VICTORY_WAVE_PAIRS` varied: | Compute hash | Paired=0 | Paired=1 | |---|---|---| | `02384a60fda6f2d0` | Validated; PSO refused | Validated; PSO created | | `2cc4c197ee29e291` | Validated; PSO refused | Validated; PSO created | | `2da4beb386509b77` | Validated; PSO refused | Validated; PSO created | | `369cbe906ea72764` | Validated; PSO refused | Validated; PSO created | `4 emitted of 4 compute programs; 4 validated, 0 pipelines` versus `4 emitted of 4 compute programs; 4 validated, 4 pipelines`. Control logs four `Required WaveSize range [64, 64], but supported range is [32, 32]` messages; enabled logs zero. Both processes exit 0, no host-memory guard stop or OOM count change. This is a PSO-creation test, **not execution of those four game shaders**. Separately built the unmodified shader lib tests from that same revision with `--features host,diagnostics`. The first `paired_lanes --test-threads=1 --nocapture` headless attempt timed out after 360 s in the first test; its last device-init messages were DXVK/OpenXR, before adapter enumeration or a dispatch receipt. I cannot attribute this to the shader. Retried the *same* test binary with a private rootless XWayland display, another copy of the original prefix, an initially empty explicit driver-cache directory and a 90 s inner timeout. The actual runtime again logged `71cae091b06571e` and RTX 4060. Exit 0, `5 passed; 0 failed; 0 ignored; 240 filtered out`. All five printed their actual hardware execution witnesses: two console waves/loops/LDS; OR of both halves; permutes/row masks/swizzles/lane writes; LDS/lane reads/masks across halves; and the half sum `0x5914`. No skip messages, and the CPU-oracle comparisons completed. No reported Xid or OOM in the accessible journal interval. All guarded units retired between attempts. This verifies a narrow Linux/NVIDIA PSO and synthetic correctness milestone, not the title's rendering or the performance of the paired program. I would now test #854's paired form in the retail integration before adding #993's other changes. No game assets, shader dumps, or captures attached. Relevant alternatives are #823 and DexNom/VIctory#40; the four PSOs above are the specific locally observed refusals, including the multi-wave cases. **Retail follow-up, same-build paired on/off comparison:** I integrated this exact head with our previously tested Linux changes from #1056 (`c5820acd`), #830 (`951dc00`, Filip722), #20 (`d4a36b1`, ErRusso), and #1006 (`4e7af7b`, OctoAlgo, port of desplmfao's upstream #2143). Resolved two lint-only merge conflicts and combined the pipeline-library rejected-file preservation from this tree with #1056's early-list fall-through; the previous #830/#20 patch applied except for a README hunk, which I omitted. #1006 applied without conflict. No #993 changes. Integration diff SHA-256 `f7930b860c3caeba36f086d6a5b079c436dfca3c838f3139527cd5eb639cbc10`. New executable SHA-256 `a9f9c69e4382379fbb1d3f202b243840c75d23636c90356def6f27f5dc752be3`, same release+diagnostics build recipe. Two sequential 330 s Series X runs, same exe, GE-Proton11-14 / verified `71cae09`, 1920x1080, file physical backing, texture guard=0/no-wait=1. Fresh copies of the same original prefix/saves and identical prior translation/driver-cache seed (1,638 early keys). Both log the 1,638 keys and mapping of a read-only vkd3d cache. New translator fingerprint: first reported translation counters have zero hits in both arms (228 vs 166 misses), so this is not a warm-translator comparison. Both proceeded to loading artwork without a qualifying visible account-picker prompt; the same prompt-gated input script sent **no controller input** in either arm. No input response tested. | Title compute | Pairing off | Pairing on | |---|---|---| | `02384a60fda6f2d0` | First bind requested; PSO refused | First bind requested; host PSO success | | `2cc4c197ee29e291` | First bind requested; PSO refused | First bind requested; host PSO success | | `2da4beb386509b77` | First bind requested; PSO refused | First bind requested; host PSO success | | `369cbe906ea72764` | First bind requested; PSO refused | First bind requested; host PSO success | The compute host-pipeline success log is after the successful D3D12 PSO call; first-bind messages are requests, not proof each dispatch executed or produced correct output. With pairing off: four WaveSize refusals; on: zero. In both, the game captures show the loading art (about 47 s vs 46 s), then black transition frames through the scheduled stop, despite the logged world-stage pipeline binds (first target at ~242 vs ~269 s). Neither arm produced recognizable world geometry in these 34 private captures per arm. End-of-run pending pipeline counts 482 vs 701; post-transition intervals 0.1–1.0 vs 0.2–0.8 FPS, not a common visible-world performance benchmark. No HUD, subtitles, credits, control or correct lighting verified. Off/on respectively: whole-device peak VRAM 7,163/6,789 MiB; scope peak charged 9,683/9,521 MiB; swap 2,976/2,998 MiB; minimum host MemAvailable 4,223/3,963 MiB. Game PCM nonzero in 10/21 and 13/21 chunks, fidelity unknown. Both stopped on schedule at 333.4 s, no guard stop, OOM counter advance, matching device removal lines or Xid in accessible journal; both units retired. Prior integrated build had visible partial geometry in a warm run; these runs are not a controlled comparison with that earlier build. The next useful comparison is a mode-specific warmed repeat, not a claim of a visual fix from PSO creation alone. No game assets or captures attached. **Warmed retail follow-up:** same exact integrated binary, each mode warmed by one previous scheduled run. Both reached recognizable 3D geometry and the opening night cutscene with visible subtitles after one actual account-picker controller A press/release each. Pairing again removed the four Wave64 PSO refusals; no shader translation failures logged with it on, one `f133e35efed2a48a` with it off. Both close-ups still show black facial skin/detail despite visible colored light on shoulders. Pipeline backlog reached zero; no in-world control or correct lighting established. A further byte-identical-seed comparison of the same paired-on binary with existing `VICTORY_LEVELS_ON_DEMAND=1` also left the face black, though it reached visible intro credits. [Detailed texture-residency baseline and counters](https://git.gtahub.st/github/fxceless--victory-fork/pulls/1031). This is why I am testing #1031/#1210 next rather than treating the four recovered PSOs as a visual fix. AI assistance: Hermes Agent, working on behalf of ArturoWolff. (GPT 6.2 Sol High)
Author
Owner

@⁠HLVM04 on GitHub · 2026-11-26 00:56 UTC · original

Frame-cost data point for the "not tested" item above, on the same card class as SkillIssueXO's slower result, but a different tree and profile:

RTX 5070 Ti 16 GB (32-lane), driver 616.64, Ryzen 7 9800X3D, Windows 11 build 26200, Series S profile, first gameplay scene. Tree: fork main 0b0074e plus #798 #783 #799 #770 #827 #845 and some local processor-side changes, with and without this PR merged. Note the base already has #799's loose-LDS fallback, so "without" is not the bare refusal case.

without #854 with #854
frame time median 53-59 ms 52-53 ms
p90 75-98 ms 64-76 ms

Two runs each. No crash or device loss. Picture unchanged or slightly cleaner by eye (not compared per program). One 0.7 s spike on first launch while the new forms translate. So on this tree the paired form did not cost frame time; that may differ on Series X or on a tree where the card is the limit.

**@⁠HLVM04** on GitHub · 2026-11-26 00:56 UTC · [original](https://github.com/fxceless/victory-fork/pull/854#issuecomment-7179262465) Frame-cost data point for the "not tested" item above, on the same card class as SkillIssueXO's slower result, but a different tree and profile: RTX 5070 Ti 16 GB (32-lane), driver 616.64, Ryzen 7 9800X3D, Windows 11 build 26200, **Series S** profile, first gameplay scene. Tree: fork main `0b0074e` plus #798 #783 #799 #770 #827 #845 and some local processor-side changes, with and without this PR merged. Note the base already has #799's loose-LDS fallback, so "without" is not the bare refusal case. | | without #854 | with #854 | |---|---|---| | frame time median | 53-59 ms | 52-53 ms | | p90 | 75-98 ms | 64-76 ms | Two runs each. No crash or device loss. Picture unchanged or slightly cleaner by eye (not compared per program). One 0.7 s spike on first launch while the new forms translate. So on this tree the paired form did not cost frame time; that may differ on Series X or on a tree where the card is the limit.
Author
Owner

@⁠Ahmet-Dedeler on GitHub · 2026-11-26 01:54 UTC · original

A D3DMetal data point for the paired compute lowering. On an M5 Max with D3DMetal 4.0b3 I tested five compute shaders from the same inputs with the paired emitter toggled on a local port of this patch. Pairing off gave 0/5 conversions in Apple's compiler (one failed in translation first). Pairing on emitted Wave32 DXIL that Microsoft validated and Apple's converter accepted for all five.

I also ran six synthetic tests through D3DMetal with GPU readback. The cross-half operations and the exact-pairing selection test all matched their references. The title-derived cases were checked through conversion. This was all outside a game run.

**@⁠Ahmet-Dedeler** on GitHub · 2026-11-26 01:54 UTC · [original](https://github.com/fxceless/victory-fork/pull/854#issuecomment-7180260392) A D3DMetal data point for the paired compute lowering. On an M5 Max with D3DMetal 4.0b3 I tested five compute shaders from the same inputs with the paired emitter toggled on a local port of this patch. Pairing off gave 0/5 conversions in Apple's compiler (one failed in translation first). Pairing on emitted Wave32 DXIL that Microsoft validated and Apple's converter accepted for all five. I also ran six synthetic tests through D3DMetal with GPU readback. The cross-half operations and the exact-pairing selection test all matched their references. The title-derived cases were checked through conversion. This was all outside a game run.
Author
Owner

@⁠DoubleD17 on GitHub · 2026-11-25 19:54 UTC · original · reviewed

Could the inactive-lane FP16 reduction test exercise the paired Wave32 form on 32-lane hardware? It currently lowers for Wave64 and returns early when PSO creation fails, so a green suite can miss the GPU assertions. Wave64 lowering and early return

Independent synthetic report on a verified RTX 5070 (10de:2f04, driver 621.40), Windows, Rust 1.98.1 MSVC. The emit::wave64_tests:: suite reported 6 passes on base dd3a14ba5ab06e0a6efdaecebdb33b1a13e04a3c and 15 on a clean merge of head 0751197e744c92d392a65d02fe40973f566843e2 onto that base. Both runs skipped this GPU check. A test-only patch on the merged tree kept native DXIL validation, selected paired(&native) for the Wave32-only adapter, and made a refused PSO fail on eligible hardware. With the patch, the suite passed 15/15 and readback matched the FP16 reference bit for bit with 64, 63, 40, 33, 32, 17, 5 and 1 active lanes. A separate HLSL control created the Wave32 PSO and received E_INVALIDARG for Wave64, with the device still active.

In a_sum_of_halves_where_lanes_have_left_is_the_consoles_tree_bit_for_bit, query D3D12_OPTIONS1 before selecting the GPU form. Keep native Wave64 where supported, select the paired form for Wave32-only hardware, and make PSO creation and dispatch on that same queried device mandatory once it qualifies. on_the_card currently creates a new device, so pass the selected host through or use it directly in this test. This evidence covers the synthetic reduction fixture. Test helper

AI-assisted.

**@⁠DoubleD17** on GitHub · 2026-11-25 19:54 UTC · [original](https://github.com/fxceless/victory-fork/pull/854#pullrequestreview-6064057214) · **reviewed** Could the inactive-lane FP16 reduction test exercise the paired Wave32 form on 32-lane hardware? It currently lowers for Wave64 and returns early when PSO creation fails, so a green suite can miss the GPU assertions. [Wave64 lowering and early return](https://github.com/fxceless/victory-fork/blob/0751197e744c92d392a65d02fe40973f566843e2/crates/victory-shader/src/emit/wave64_tests.rs#L250-L289) Independent synthetic report on a verified RTX 5070 (10de:2f04, driver 621.40), Windows, Rust 1.98.1 MSVC. The `emit::wave64_tests::` suite reported 6 passes on base `dd3a14ba5ab06e0a6efdaecebdb33b1a13e04a3c` and 15 on a clean merge of head `0751197e744c92d392a65d02fe40973f566843e2` onto that base. Both runs skipped this GPU check. A test-only patch on the merged tree kept native DXIL validation, selected `paired(&native)` for the Wave32-only adapter, and made a refused PSO fail on eligible hardware. With the patch, the suite passed 15/15 and readback matched the FP16 reference bit for bit with 64, 63, 40, 33, 32, 17, 5 and 1 active lanes. A separate HLSL control created the Wave32 PSO and received `E_INVALIDARG` for Wave64, with the device still active. In `a_sum_of_halves_where_lanes_have_left_is_the_consoles_tree_bit_for_bit`, query `D3D12_OPTIONS1` before selecting the GPU form. Keep native Wave64 where supported, select the paired form for Wave32-only hardware, and make PSO creation and dispatch on that same queried device mandatory once it qualifies. `on_the_card` currently creates a new device, so pass the selected host through or use it directly in this test. This evidence covers the synthetic reduction fixture. [Test helper](https://github.com/fxceless/victory-fork/blob/0751197e744c92d392a65d02fe40973f566843e2/crates/victory-shader/src/emit/wave64_tests.rs#L436-L444) AI-assisted.
Author
Owner

@⁠Exopus-0x65f7ad0 on GitHub · 2026-11-26 09:37 UTC · original

Tested on another 32-lane card: RTX 5060 Ti 8 GB with 16 GB of RAM, Series S profile, opening cutscene. The base was a fork tree with about 30 open PRs on top. I cherry-picked 26600c6 (the paired form), with three local changes:

  • I kept our descriptor_data code in lower.rs and dropped the new descriptor_data.rs. Our copy carries 42 more lines from other PRs: a descriptor read only for its size, and the halves path.
  • I set aside #1261's group counter. It conflicts with yours on the same wave_base counter (your fixed 32/64 step against its rank among active lanes, which also handles partial waves). Someone should merge the two carefully.
  • I skipped the lint-only commits and the merge of main.

Result:

  • The water/transmission volumetrics translate and run: CS_TransmissionVolumetrics_Tiled, _Tiled_LocalLights and Submerged. Before, they were refused here with "a wave reduction where not every lane runs".
  • The prison cell in the cutscene keeps its lighting. With the wave-wide form (VICTORY_WAVE_WIDE=2) the same shot came out much darker, and the cutscene dropped to 1.5 fps. That matches the black patches #1248 reports for the _Tiled pair under the wave-wide form.
  • Every compute program in the cutscene translates ("does not translate" lines: 0 with the paired form, 2 with VICTORY_WAVE_PAIRS=0), and there was no device loss.
  • Cost: 2.1 fps with the paired form against 2.5 fps with VICTORY_WAVE_PAIRS=0 in the same build. That is within this machine's run-to-run spread, since it pages with 16 GB of RAM.

This is one run each way, scored by eye on the cutscene shots, so treat it as a data point, not a measurement.

🤖 Generated with Claude Code

**@⁠Exopus-0x65f7ad0** on GitHub · 2026-11-26 09:37 UTC · [original](https://github.com/fxceless/victory-fork/pull/854#issuecomment-7188250500) Tested on another 32-lane card: RTX 5060 Ti 8 GB with 16 GB of RAM, Series S profile, opening cutscene. The base was a fork tree with about 30 open PRs on top. I cherry-picked `26600c6` (the paired form), with three local changes: - I kept our `descriptor_data` code in `lower.rs` and dropped the new `descriptor_data.rs`. Our copy carries 42 more lines from other PRs: a descriptor read only for its size, and the halves path. - I set aside #1261's group counter. It conflicts with yours on the same `wave_base` counter (your fixed 32/64 step against its rank among active lanes, which also handles partial waves). Someone should merge the two carefully. - I skipped the lint-only commits and the merge of `main`. **Result:** - The water/transmission volumetrics translate and run: `CS_TransmissionVolumetrics_Tiled`, `_Tiled_LocalLights` and `Submerged`. Before, they were refused here with "a wave reduction where not every lane runs". - The prison cell in the cutscene **keeps its lighting**. With the wave-wide form (`VICTORY_WAVE_WIDE=2`) the same shot came out much darker, and the cutscene dropped to 1.5 fps. That matches the black patches #1248 reports for the `_Tiled` pair under the wave-wide form. - Every compute program in the cutscene translates ("does not translate" lines: 0 with the paired form, 2 with `VICTORY_WAVE_PAIRS=0`), and there was no device loss. - Cost: 2.1 fps with the paired form against 2.5 fps with `VICTORY_WAVE_PAIRS=0` in the same build. That is within this machine's run-to-run spread, since it pages with 16 GB of RAM. This is one run each way, scored by eye on the cutscene shots, so treat it as a data point, not a measurement. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Author
Owner

@⁠gustavowalkersgroup on GitHub · 2026-11-26 11:08 UTC · original · edited 2026-11-26 11:17 UTC

RTX 2070 (Turing, 8 GB), driver 621.40, i5-10400F / 32 GB: confirmed actual paired GPU readbacks on this hardware.

This is a local candidate based on fxceless 4aa6e8c742 with the shader-crate changes/dependencies from PR head 51700c6d43, plus a local CLWB compatibility handler. It is not a clean full-PR checkout: GPU mesh-host/CLI changes were excluded, and the existing WAVE_WIDE=last fallback retained the new (shader, wave) return type.

  • Full shader library: 244 passed, 0 failed, 2 ignored.
  • Explicit hardware execution witnesses for all six paired cases (cross-half LDS/lane reads, two console waves with divergent loops and a group barrier, permutes/lane writes, both OR cases, and console-order reduction). The separate departed-halves reduction test also ran on the hardware device with waves of at most 32 lanes and passed.
  • Exact private shader 02384a60fda6f2d0 (CS_DefragHeap_ComputeRelocations): baseline validated DXIL but CreateComputePipelineState returned E_INVALIDARG; candidate validates and creates the pipeline. Control shader 339d476c267c03c7 validates/creates in both.
  • In the title, 02384a60fda6f2d0 now creates its host pipeline as well. Gameplay stability/FPS remains unverified; no performance claim.

A diagnostic run then failed inside the in-process stack collector precisely at its scheduled 220-second sample (ntdll+0x21580 read 0x41, immediately after several thread backtraces). I am rerunning without VICTORY_STACKS to keep that separate. The baseline had the title watchdog at image+0x23cf683 / GPU Loc Sig 921cc4ae after a native fence wait stopped advancing. The same refused shader was also dropped during an older successful world run, so I am not claiming that its refusal alone explains the watchdog.

No game binaries, shader inputs, saves, or memory dumps are attached.

Update after rerunning without VICTORY_STACKS: the original watchdog still reproduced, about 30 seconds after the native render-thread fence wait stopped advancing. Three external snapshots taken approximately 5, 15, and 25 seconds into the stall read the same CPU-visible Fence.value: expected 6361, actual 6360. Pipeline workers, relay, and late-wait helper were idle. The fixed compute pipeline was created successfully, with zero host-pipeline refusals in this run. Thus paired translation fixes the demonstrated Turing incompatibility but did not fix this separate queue/fence progress issue.

**@⁠gustavowalkersgroup** on GitHub · 2026-11-26 11:08 UTC · [original](https://github.com/fxceless/victory-fork/pull/854#issuecomment-7190321776) · edited 2026-11-26 11:17 UTC RTX 2070 (Turing, 8 GB), driver 621.40, i5-10400F / 32 GB: confirmed actual paired GPU readbacks on this hardware. This is a local candidate based on fxceless 4aa6e8c74239b1402634b66834aedf5747e70440 with the shader-crate changes/dependencies from PR head 51700c6d43a3507fa65e50fe4bb64074ce706cd4, plus a local CLWB compatibility handler. It is not a clean full-PR checkout: GPU mesh-host/CLI changes were excluded, and the existing WAVE_WIDE=last fallback retained the new (shader, wave) return type. - Full shader library: 244 passed, 0 failed, 2 ignored. - Explicit hardware execution witnesses for all six paired cases (cross-half LDS/lane reads, two console waves with divergent loops and a group barrier, permutes/lane writes, both OR cases, and console-order reduction). The separate departed-halves reduction test also ran on the hardware device with waves of at most 32 lanes and passed. - Exact private shader 02384a60fda6f2d0 (CS_DefragHeap_ComputeRelocations): baseline validated DXIL but CreateComputePipelineState returned E_INVALIDARG; candidate validates and creates the pipeline. Control shader 339d476c267c03c7 validates/creates in both. - In the title, 02384a60fda6f2d0 now creates its host pipeline as well. Gameplay stability/FPS remains unverified; no performance claim. A diagnostic run then failed inside the in-process stack collector precisely at its scheduled 220-second sample (ntdll+0x21580 read 0x41, immediately after several thread backtraces). I am rerunning without VICTORY_STACKS to keep that separate. The baseline had the title watchdog at image+0x23cf683 / GPU Loc Sig 921cc4ae after a native fence wait stopped advancing. The same refused shader was also dropped during an older successful world run, so I am not claiming that its refusal alone explains the watchdog. No game binaries, shader inputs, saves, or memory dumps are attached. Update after rerunning without VICTORY_STACKS: the original watchdog still reproduced, about 30 seconds after the native render-thread fence wait stopped advancing. Three external snapshots taken approximately 5, 15, and 25 seconds into the stall read the same CPU-visible Fence.value: expected 6361, actual 6360. Pipeline workers, relay, and late-wait helper were idle. The fixed compute pipeline was created successfully, with zero host-pipeline refusals in this run. Thus paired translation fixes the demonstrated Turing incompatibility but did not fix this separate queue/fence progress issue.
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/fpsbox.rs
  • crates/victory-gpu/src/indirect.rs
  • crates/victory-gpu/src/pipeline/library.rs
  • crates/victory-gpu/src/resource.rs
  • crates/victory-shader/src/emit/lower.rs
  • crates/victory-shader/src/emit/mod.rs
  • crates/victory-shader/src/emit/wave64_tests.rs
  • crates/victory-shader/src/ir.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/854/head:github-bot/gh-854'
git switch 'github-bot/gh-854'

Merge

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