Every ray a miss (VICTORY_RT_MISS=1), and ray-only passes left out by run-time names (port of edsuuu/VI-BR-PORT) #143

Open
github-bot wants to merge 5 commits from github-bot/gh-143 into main AGit
Owner

@⁠CowboyBingus on GitHub · 2026-11-27 04:13 UTC · original
CowboyBingus:perf/rt-miss → main · +197 −2 · 6 files · 5 commits · open

What it does

Three switches, all off by default. With none of them set, nothing changes.

  1. VICTORY_RT_MISS=1: the ray-tracing node test (image_bvh_intersect_ray / image_bvh64_intersect_ray) is emitted as a constant miss. A box node answers four absent children (bvh::NONE) and any other node the triangle-miss result (bvh::MISS). Only the value 1 turns it on. Forms of the instruction the translator already refuses are still refused. It is part of the translation: the shader cache's key gets VICTORY_RT_MISS=1 added only when it is on (as VICTORY_PORT_CBV does), so translations cached without the switch keep their key, and a run with it on looks translations up under a different key.
  2. VICTORY_RT_SKIN_NAMES=<list>: compute programs whose container matches the list are left out. Meant for programs that only skin meshes for the ray-tracing structures.
  3. VICTORY_RT_TRACE_NAMES=<list>: the same, meant for programs that trace against the ray-tracing structures.

Exact semantics of the two lists

  • They act only while VICTORY_RT_MISS=1 and VICTORY_BVH_BUILDER is not 1. Otherwise both lists are dropped and nothing is left out. Unset, empty, or not valid Unicode: nothing is left out.
  • A list is entries split by ,. An entry is terms split by +; each term is a name that a compute program's container must hold, or, with a leading -, a name it must not hold. Whitespace around terms is trimmed. Matching is on exact bytes, case-sensitive, anywhere in the container. An entry with no name it must hold (only - terms, or none) is dropped.
  • A pipeline matches when any of its compute shaders' containers satisfies every term of some entry. A pipeline that matches both lists counts under the skinning list.
  • A matching pipeline is left out through the existing left_out path of crates/victory-gpu/src/pipeline/make.rs (the one the ray-resolve and ray-activation programs already take without the builder): no host pipeline is made for it (ready, now and early return without making it), so its direct and indirect dispatches find no host pipeline and are not run.
  • The variables are read once, the first time a pipeline being created reaches this check (after the existing ray-resolve and ray-activation rules).

Names come only from run-time text

Following docs/asset-policy.md, this change adds no program names, hashes or other text from a title to the tree: its code, comments, tests and docs carry none. The names are given at run time in the two environment variables. The unit test uses made-up names.

How to see that it engaged

With either list holding at least one entry, the log has, once, when the variables are read, a line ending in (info level, so in release and diagnostics builds):

ray-only programs named by VICTORY_RT_SKIN_NAMES / VICTORY_RT_TRACE_NAMES: left out only with VICTORY_RT_MISS=1 and the builder off on=true skin_entries=<n> trace_entries=<m>

on=true means VICTORY_RT_MISS=1 was read and the builder is off. The 1st, 2nd, 4th, 8th, ... pipeline each list leaves out (counted per list, at pipeline creation) logs a line ending in:

pipeline left out: skins only for the ray-tracing structures, which every ray misses (VICTORY_RT_SKIN_NAMES), left out count=<k> shaders=<hashes>
pipeline left out: traces the ray-tracing structures, which every ray misses (VICTORY_RT_TRACE_NAMES), left out count=<k> shaders=<hashes>

VICTORY_RT_MISS=1 has no log line of its own; with it on, the shader cache key differs, so each shader is translated under the new key the first time it is needed with the switch on.

Credit

Ported from edsuuu/VI-BR-PORT (GPL-3.0-or-later, as this repository), author edsuuu:

  • 7d7b9e49 "Shaders: VICTORY_RT_MISS=1 has the ray-tracing node test hit nothing": the victory-shader code (emit/intersect.rs, the switch's reader in emit/mod.rs) is taken from it; only the reader's doc comment is shortened.
  • ab4571df and 1556de82 (the skinning passes) and 24f8d2ed (the tracing passes, and one more pass it counts with the skinning ones): the idea is ported; the code here is new.

Differences from the source

  • Names: the source names the programs in code; here they come from VICTORY_RT_SKIN_NAMES / VICTORY_RT_TRACE_NAMES at run time, in the list form above.
  • Where the passes are left out: the source marks the pipeline and returns early in the direct dispatch and in execute_indirect in draw.rs; here the pipeline is left out when it is created (Pending::new → left_out), so the running title never translates or builds it either.
  • Running them anyway: the source has VICTORY_RT_SKIN=1 / VICTORY_RT_TRACE=1 to run a kind anyway; here leaving the list unset does that.
  • Shader cache key: the source adds VICTORY_RT_MISS= and the variable's raw value (empty when unset) to the key on every run; here VICTORY_RT_MISS=1 is added only when the switch is on.
  • Logs: the source logs one line, once, at the first direct dispatch it leaves out (none for indirect ones); here the lists' line and the per-pipeline lines above.
  • Doc comment of rt_miss: the source's also describes what the picture and the card's time did in its runs; here it keeps what the code does and when to use it.
  • Later commits of the source (other passes, such as shadow-mask programs) are not part of this.

Tests and checks

Run on the branch's code with toolchain 1.98.1 from rust-toolchain.toml. Since these checks, only docs/this-fork.md has changed.

  • cargo clippy --workspace --all-targets --locked -- -D warnings: clean
  • cargo clippy --workspace --all-targets --all-features --locked -- -D warnings: clean
  • cargo test --workspace --locked: 1107 passed, 0 failed, 53 ignored (includes policy::tests::repository_passes_policy)
  • cargo test --workspace --all-features --locked -- --test-threads=1: 1170 passed, 0 failed, 54 ignored
  • cargo build --locked --release -p victory and cargo build --locked --profile diag -p victory --features diagnostics: built

New unit test: pipeline::make::tests::name_lists_match_held_and_absent_names (list parsing and matching, made-up names).

Measured

Setup

  • Machine: RTX 5070 Ti, Ryzen 7 9800X3D, 64 GB of RAM.
  • Build: the release build of this branch (cargo build --locked --release -p victory, exe md5 70ca0abbf02d175663c152c734dfe3b2).
  • Settings: -Machine 4070, Series S. Each run was about 230 s of log time (229.6-230.1 s).
  • Runs: six, alternating off, on, off, on, off, on.
    • "on" sets VICTORY_RT_MISS=1 and both name lists, with the texts passed at run time.
    • "off" sets none of the three.
    • The structure builder was off in all six.
  • The off baseline does not include #99 (the opt-in reflection hold, VICTORY_AMBIENT_REFLECT, still open). No run set VICTORY_AMBIENT_REFLECT, and ray-miss was not run together with #99.

Frame time

Medians over the log's frame lines that report more than 1,000 draws per frame (31 or 32 lines per run). "preparing" and "copying back" are that line's own ms-per-frame figures.

run ms/frame preparing copying back
off 1 47.4 38.7 27.4
on 1 43.65 34.95 24.4
off 2 43.65 34.1 24.55
on 2 40.65 30.15 22.8
off 3 46.8 38.4 26.4
on 3 44.45 34.75 23.2

The mean of the off medians is 45.95 ms/frame, and of the on medians 42.92. Each on run was 2.35 to 3.75 ms/frame below the off run just before it.

Engagement

  • Each on run logged the list line once, with on=true skin_entries=2 trace_entries=2.
  • Each on run also logged 5 pipeline left out lines for the skinning list (count 1, 2, 4, 8, 16) and 4 for the tracing list (count 1, 2, 4, 8).
  • The off runs logged neither.

Picture, with the switches on

  • Eye glow. The blue-white eye glow that #99 addresses was absent in the on runs. This was not run together with #99.
    • At two moments, a character's eyes glow blue-white in all three off runs.
      • In "on 1" and "on 2", in the same shot as "off 1" and "off 2", they look normal.
      • At the first moment, "off 3" and "on 3" show another shot: the eyes glow in "off 3" and look normal in "on 3".
      • At the second moment, "on 3" shows the character in another pose.
      • The eyes in "on 3" look normal in its close-ups (screenshots 89, 91, 117, 120).
  • Interior highlights. Bright blue-white highlights in dark interior areas, present in the off runs, are gone in the on runs. Two moments were compared; at one of them only two on runs had the same shot.
  • Darker in places. We took the mean pixel value (0-255, all channels, picture rows only) at 11 moments matched across the runs.
    • At 4 of the 11, every on run was darker than every off run. At one of those 4, only two on runs had the same shot. Two examples:
      • 95.8-96.8 on against 102.2-103.5 off;
      • in a dark interior, 24.8-26.4 on against 29.8-30.4 off.
    • At the other 7 moments, the on and off ranges overlapped.
  • Purple tint. A paper surface in a later scene has a purple tint in all three on runs. Over the screenshots from 150 s to 228 s (33-35 per run), the paper area's mean blue channel was 41.0-42.2 on and 37.4-38.2 off. Its mean red channel was 48.8-49.1 on and 48.3-48.7 off.

Known risk: corrupted patches on a character's face

These patches are multicolour blocks or green blotches on one character's face. The cause is not established, and the corruption also appears with none of the three switches set. We checked screenshots 104-118, part of the scene where that character is on screen.

  • The six runs above. It appeared in 2 of the 3 on runs: green blotches in "on 2", multicolour blocks in "on 3". It did not appear on that character's face in "on 1" or in any off run.
    • Just before that window, screenshot 103 of "off 1" shows block patches on another character's face.
  • Two later runs of the same build and settings with none of the three switches. It appeared in both: multicolour blocks in one, green blotches in the other. Their screenshots are about 5 s apart.
  • A run of an older build also showed it. That run used the 4090 settings in safe mode, with none of these switches and one unrelated switch set.
  • All our runs with all three switches set: 3 of 9.
    • These nine include runs of two other builds.
    • Some of them had further switches on (an upscale, a render-scale and one other switch).
    • All six of the extra runs used lists with one name moved from the skinning list to the tracing list (skin_entries=1 trace_entries=3).
    • One of them has only three screenshots in that window.
  • Runs with VICTORY_RT_MISS=1 alone (no lists, same build and settings): it appeared in 0 of 5.
    • Three of them were 150 s runs with a screenshot about every 1.3 s.
    • Two have screenshots about 5 s apart.
    • In the three 150 s runs, the blue-white eye glow was still visible.

Recommendation

Keep all three switches off by default. VICTORY_RT_MISS alone (no lists) may be the safer subset. In four alternating runs of the same build with only that switch (off, on, off, on; a screen recording ran from about 160 s to 175 s in each; in the second off run it captured another window), the medians were 45.2, 49.1, 50.45 and 47.7 ms: no consistent difference from off.

🤖 Generated with Claude Code

**@⁠CowboyBingus** on GitHub · 2026-11-27 04:13 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/143) `CowboyBingus:perf/rt-miss` → `main` · +197 −2 · 6 files · 5 commits · open ## What it does Three switches, all off by default. With none of them set, nothing changes. 1. **`VICTORY_RT_MISS=1`**: the ray-tracing node test (`image_bvh_intersect_ray` / `image_bvh64_intersect_ray`) is emitted as a constant miss. A box node answers four absent children (`bvh::NONE`) and any other node the triangle-miss result (`bvh::MISS`). Only the value `1` turns it on. Forms of the instruction the translator already refuses are still refused. It is part of the translation: the shader cache's key gets `VICTORY_RT_MISS=1` added only when it is on (as `VICTORY_PORT_CBV` does), so translations cached without the switch keep their key, and a run with it on looks translations up under a different key. 2. **`VICTORY_RT_SKIN_NAMES=<list>`**: compute programs whose container matches the list are left out. Meant for programs that only skin meshes for the ray-tracing structures. 3. **`VICTORY_RT_TRACE_NAMES=<list>`**: the same, meant for programs that trace against the ray-tracing structures. ### Exact semantics of the two lists - They act only while `VICTORY_RT_MISS=1` **and** `VICTORY_BVH_BUILDER` is not `1`. Otherwise both lists are dropped and nothing is left out. Unset, empty, or not valid Unicode: nothing is left out. - A list is entries split by `,`. An entry is terms split by `+`; each term is a name that a compute program's container must hold, or, with a leading `-`, a name it must not hold. Whitespace around terms is trimmed. Matching is on exact bytes, case-sensitive, anywhere in the container. An entry with no name it must hold (only `-` terms, or none) is dropped. - A pipeline matches when any of its compute shaders' containers satisfies every term of some entry. A pipeline that matches both lists counts under the skinning list. - A matching pipeline is left out through the existing `left_out` path of `crates/victory-gpu/src/pipeline/make.rs` (the one the ray-resolve and ray-activation programs already take without the builder): no host pipeline is made for it (`ready`, `now` and `early` return without making it), so its direct and indirect dispatches find no host pipeline and are not run. - The variables are read once, the first time a pipeline being created reaches this check (after the existing ray-resolve and ray-activation rules). ### Names come only from run-time text Following `docs/asset-policy.md`, this change adds no program names, hashes or other text from a title to the tree: its code, comments, tests and docs carry none. The names are given at run time in the two environment variables. The unit test uses made-up names. ## How to see that it engaged With either list holding at least one entry, the log has, once, when the variables are read, a line ending in (info level, so in release and diagnostics builds): ``` ray-only programs named by VICTORY_RT_SKIN_NAMES / VICTORY_RT_TRACE_NAMES: left out only with VICTORY_RT_MISS=1 and the builder off on=true skin_entries=<n> trace_entries=<m> ``` `on=true` means `VICTORY_RT_MISS=1` was read and the builder is off. The 1st, 2nd, 4th, 8th, ... pipeline each list leaves out (counted per list, at pipeline creation) logs a line ending in: ``` pipeline left out: skins only for the ray-tracing structures, which every ray misses (VICTORY_RT_SKIN_NAMES), left out count=<k> shaders=<hashes> pipeline left out: traces the ray-tracing structures, which every ray misses (VICTORY_RT_TRACE_NAMES), left out count=<k> shaders=<hashes> ``` `VICTORY_RT_MISS=1` has no log line of its own; with it on, the shader cache key differs, so each shader is translated under the new key the first time it is needed with the switch on. ## Credit Ported from [edsuuu/VI-BR-PORT](https://github.com/edsuuu/VI-BR-PORT) (GPL-3.0-or-later, as this repository), author edsuuu: - [`7d7b9e49`](https://github.com/edsuuu/VI-BR-PORT/commit/7d7b9e49cdf4dd3041161367ee47bf0f2d271f79) "Shaders: VICTORY_RT_MISS=1 has the ray-tracing node test hit nothing": the `victory-shader` code (`emit/intersect.rs`, the switch's reader in `emit/mod.rs`) is taken from it; only the reader's doc comment is shortened. - [`ab4571df`](https://github.com/edsuuu/VI-BR-PORT/commit/ab4571df0872ec525a4c133d357953fd19ed1e9f) and [`1556de82`](https://github.com/edsuuu/VI-BR-PORT/commit/1556de820308208a719be8fdef9f31931948ea02) (the skinning passes) and [`24f8d2ed`](https://github.com/edsuuu/VI-BR-PORT/commit/24f8d2ed48518d90daef5cb44f52fdbc545a216e) (the tracing passes, and one more pass it counts with the skinning ones): the idea is ported; the code here is new. ## Differences from the source - **Names**: the source names the programs in code; here they come from `VICTORY_RT_SKIN_NAMES` / `VICTORY_RT_TRACE_NAMES` at run time, in the list form above. - **Where the passes are left out**: the source marks the pipeline and returns early in the direct `dispatch` and in `execute_indirect` in `draw.rs`; here the pipeline is left out when it is created (`Pending::new` → `left_out`), so the running title never translates or builds it either. - **Running them anyway**: the source has `VICTORY_RT_SKIN=1` / `VICTORY_RT_TRACE=1` to run a kind anyway; here leaving the list unset does that. - **Shader cache key**: the source adds `VICTORY_RT_MISS=` and the variable's raw value (empty when unset) to the key on every run; here `VICTORY_RT_MISS=1` is added only when the switch is on. - **Logs**: the source logs one line, once, at the first direct dispatch it leaves out (none for indirect ones); here the lists' line and the per-pipeline lines above. - **Doc comment of `rt_miss`**: the source's also describes what the picture and the card's time did in its runs; here it keeps what the code does and when to use it. - Later commits of the source (other passes, such as shadow-mask programs) are not part of this. ## Tests and checks Run on the branch's code with toolchain 1.98.1 from `rust-toolchain.toml`. Since these checks, only `docs/this-fork.md` has changed. - `cargo clippy --workspace --all-targets --locked -- -D warnings`: clean - `cargo clippy --workspace --all-targets --all-features --locked -- -D warnings`: clean - `cargo test --workspace --locked`: 1107 passed, 0 failed, 53 ignored (includes `policy::tests::repository_passes_policy`) - `cargo test --workspace --all-features --locked -- --test-threads=1`: 1170 passed, 0 failed, 54 ignored - `cargo build --locked --release -p victory` and `cargo build --locked --profile diag -p victory --features diagnostics`: built New unit test: `pipeline::make::tests::name_lists_match_held_and_absent_names` (list parsing and matching, made-up names). ## Measured **Setup** - Machine: RTX 5070 Ti, Ryzen 7 9800X3D, 64 GB of RAM. - Build: the release build of this branch (`cargo build --locked --release -p victory`, exe md5 `70ca0abbf02d175663c152c734dfe3b2`). - Settings: `-Machine 4070`, Series S. Each run was about 230 s of log time (229.6-230.1 s). - Runs: six, alternating off, on, off, on, off, on. - "on" sets `VICTORY_RT_MISS=1` and both name lists, with the texts passed at run time. - "off" sets none of the three. - The structure builder was off in all six. - The off baseline does **not** include #99 (the opt-in reflection hold, `VICTORY_AMBIENT_REFLECT`, still open). No run set `VICTORY_AMBIENT_REFLECT`, and ray-miss was not run together with #99. **Frame time** Medians over the log's frame lines that report more than 1,000 draws per frame (31 or 32 lines per run). "preparing" and "copying back" are that line's own ms-per-frame figures. | run | ms/frame | preparing | copying back | |---|---|---|---| | off 1 | 47.4 | 38.7 | 27.4 | | on 1 | 43.65 | 34.95 | 24.4 | | off 2 | 43.65 | 34.1 | 24.55 | | on 2 | 40.65 | 30.15 | 22.8 | | off 3 | 46.8 | 38.4 | 26.4 | | on 3 | 44.45 | 34.75 | 23.2 | The mean of the off medians is 45.95 ms/frame, and of the on medians 42.92. Each on run was 2.35 to 3.75 ms/frame below the off run just before it. **Engagement** - Each on run logged the list line once, with `on=true skin_entries=2 trace_entries=2`. - Each on run also logged 5 `pipeline left out` lines for the skinning list (count 1, 2, 4, 8, 16) and 4 for the tracing list (count 1, 2, 4, 8). - The off runs logged neither. **Picture, with the switches on** - **Eye glow.** The blue-white eye glow that #99 addresses was absent in the on runs. This was not run together with #99. - At two moments, a character's eyes glow blue-white in all three off runs. - In "on 1" and "on 2", in the same shot as "off 1" and "off 2", they look normal. - At the first moment, "off 3" and "on 3" show another shot: the eyes glow in "off 3" and look normal in "on 3". - At the second moment, "on 3" shows the character in another pose. - The eyes in "on 3" look normal in its close-ups (screenshots 89, 91, 117, 120). - **Interior highlights.** Bright blue-white highlights in dark interior areas, present in the off runs, are gone in the on runs. Two moments were compared; at one of them only two on runs had the same shot. - **Darker in places.** We took the mean pixel value (0-255, all channels, picture rows only) at 11 moments matched across the runs. - At 4 of the 11, every on run was darker than every off run. At one of those 4, only two on runs had the same shot. Two examples: - 95.8-96.8 on against 102.2-103.5 off; - in a dark interior, 24.8-26.4 on against 29.8-30.4 off. - At the other 7 moments, the on and off ranges overlapped. - **Purple tint.** A paper surface in a later scene has a purple tint in all three on runs. Over the screenshots from 150 s to 228 s (33-35 per run), the paper area's mean blue channel was 41.0-42.2 on and 37.4-38.2 off. Its mean red channel was 48.8-49.1 on and 48.3-48.7 off. **Known risk: corrupted patches on a character's face** These patches are multicolour blocks or green blotches on one character's face. The cause is not established, and the corruption also appears with none of the three switches set. We checked screenshots 104-118, part of the scene where that character is on screen. - **The six runs above.** It appeared in 2 of the 3 on runs: green blotches in "on 2", multicolour blocks in "on 3". It did not appear on that character's face in "on 1" or in any off run. - Just before that window, screenshot 103 of "off 1" shows block patches on another character's face. - **Two later runs of the same build and settings with none of the three switches.** It appeared in both: multicolour blocks in one, green blotches in the other. Their screenshots are about 5 s apart. - **A run of an older build** also showed it. That run used the 4090 settings in safe mode, with none of these switches and one unrelated switch set. - **All our runs with all three switches set: 3 of 9.** - These nine include runs of two other builds. - Some of them had further switches on (an upscale, a render-scale and one other switch). - All six of the extra runs used lists with one name moved from the skinning list to the tracing list (`skin_entries=1 trace_entries=3`). - One of them has only three screenshots in that window. - **Runs with `VICTORY_RT_MISS=1` alone** (no lists, same build and settings): it appeared in 0 of 5. - Three of them were 150 s runs with a screenshot about every 1.3 s. - Two have screenshots about 5 s apart. - In the three 150 s runs, the blue-white eye glow was still visible. **Recommendation** Keep all three switches off by default. `VICTORY_RT_MISS` alone (no lists) may be the safer subset. In four alternating runs of the same build with only that switch (off, on, off, on; a screen recording ran from about 160 s to 175 s in each; in the second off run it captured another window), the medians were 45.2, 49.1, 50.45 and 47.7 ms: no consistent difference from off. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Ported from edsuuu/VI-BR-PORT commit 7d7b9e49cdf4dd3041161367ee47bf0f2d271f79
(author edsuuu, GPL-3.0-or-later; that commit says it was cherry picked
from 8b349eee). The victory-shader code (emit/intersect.rs, the switch's
reader in emit/mod.rs) is that commit's; the reader's doc comment here
keeps what the code does and when to use it (the source's comment also
describes what the picture and the card's time did in its runs).

A box node answers four absent children and any other node the triangle
miss. Off by default (only "1" turns it on).

Adaptation for Vice-Tay: the switch enters the shader cache key only
when it is on (as VICTORY_PORT_CBV does), so translations cached without
it keep their key; with it on, the key differs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Port of the idea of edsuuu/VI-BR-PORT commits
ab4571df08 ("gpu: skip the ray-tracing skinning passes when every ray
misses") and 1556de8203 ("gpu: know the ray-tracing skinning passes by
their entry point"), author edsuuu, GPL-3.0-or-later.

Those commits name the title's programs in code. Under docs/asset-policy.md
the names come at run time here: VICTORY_RT_SKIN_NAMES is a list of
entries split by ',', each entry terms split by '+' that a compute
program's container must hold (a leading '-': must not hold). A pipeline
whose compute program matches is left out through the existing left_out
path of pipeline/make.rs (no host pipeline is made for it, so its
dispatches find none and are not run) only while
VICTORY_RT_MISS=1 and VICTORY_BVH_BUILDER is not 1. Unset or empty:
nothing changes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Port of the idea of edsuuu/VI-BR-PORT commit 24f8d2ed48 ("gpu: leave out
tracing against the ray structures when every ray misses"), author
edsuuu, GPL-3.0-or-later.

As with VICTORY_RT_SKIN_NAMES, the title's program names come at run time
(docs/asset-policy.md), not from code: VICTORY_RT_TRACE_NAMES, same list
form. Acts only while VICTORY_RT_MISS=1 and VICTORY_BVH_BUILDER is not 1.
Unset or empty: nothing changes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The switch and the two lists in the ray-tracing document's table, as the
other ray-tracing switches are, and a line in this-fork.md. Credit to
edsuuu/VI-BR-PORT, from which the change is ported.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 04:15:44 +00:00
Author
Owner

@⁠TaynanGT on GitHub · 2026-11-27 05:46 UTC · original

Thanks for keeping the controls opt-in, @⁠CowboyBingus. I checked that the shader cache key separates the miss variant and that the name lists only select compute passes with the builder off. GitHub currently shows conflicts with main. The cache key and emitted miss behaviour need to stay paired when the branch is reconciled.

For the foliage report in #168, I’d keep this as a separate comparison once an affected recipe is identified. The name lists should target passes known to feed ray tracing so shared skinning work stays available.

**@⁠TaynanGT** on GitHub · 2026-11-27 05:46 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/143#issuecomment-7210937288) Thanks for keeping the controls opt-in, @⁠CowboyBingus. I checked that the shader cache key separates the miss variant and that the name lists only select compute passes with the builder off. GitHub currently shows conflicts with `main`. The cache key and emitted miss behaviour need to stay paired when the branch is reconciled. For the foliage report in #168, I’d keep this as a separate comparison once an affected recipe is identified. The name lists should target passes known to feed ray tracing so shared skinning work stays available.
github-bot force-pushed github-bot/gh-143 from 0398c086ff to 00acb3bd3a 2026-11-27 10:40:31 +00:00 Compare
Author
Owner

@⁠CowboyBingus on GitHub · 2026-11-27 10:26 UTC · original · edited 2026-11-27 10:36 UTC

Thanks for the review. Rebased onto main 99a7f9b; the branch is now 99a7f9b + 1414057, c5941de, 1d44973 (code) + cc5d6b2, 00acb3b (docs). Against the head you reviewed (0398c08), git range-diff shows code commits 1 and 3 identical and commit 2 changed only in context (its list check in left_out now follows main's VICTORY_SKIP_PIPELINES check); in docs/fork-ray-tracing.md the new section now follows the reflection-hold text from main, which is kept. GitHub reports it mergeable.

On the two points:

  • Cache key and emitted miss read the same switch: victory_shader::emit::rt_miss() (emit/mod.rs:224) is what emit/intersect.rs:126 branches on and what shader_cache.rs:151 keys on in build(). With VICTORY_RT_MISS unset, no bytes are added to the key.
  • The name lists: ray_lists() (pipeline/make.rs:147) returns empty lists unless VICTORY_RT_MISS=1 and VICTORY_BVH_BUILDER is not 1 (line 156); with a list holding an entry but those conditions not met, the only effect is one info log line. Only compute stages are matched (line 179). No names are built in.

Not covered, plainly:

  • No unit test covers the miss branch in intersect.rs.
  • That branch returns before the descriptor handle() setup and writes its results without begin_guarded/end_guarded (each write still takes the lane guard, intersect.rs:136).
  • The shader-side miss is not gated by VICTORY_BVH_BUILDER; only the name lists are.
  • Whether the programs the skinning list matched in these runs feed anything besides the ray-tracing structures was not checked.

A/B (same session, interleaved, order A1 R1 A2 R2, 450 s each)

Setup: exe md5 B59ED46815DAAD639B969AB248C79ACE, the target\diag exe of the tree that was measured: main 4ee1a47 + the same three code commits (git range-diff shows them identical to the rebased ones) + two docs commits; the exe was written after the code commits, and the tree's uncommitted state at build time is not recorded. diag profile with the diagnostics feature (target\diag; every run log has the diagnostics-only write-watch line); scripts\play.ps1 -Console series-s -Machine 4070 -Windowed -Dlss quality; reflection hold on in both arms (VICTORY_AMBIENT_REFLECT=1, VICTORY_AMBIENT_REFLECT_IN=CS_TemporalResolve2_Opaque,CS_TemporalResolve1_Alpha); VICTORY_KEYS_FILE set: in both arms a background job, started just before the launch script, wrote Enter presses (held 0.3 s) to it once its clock was past 35 s, beginning no new round after 62 s on its clock; each write first waited until the game had taken the previous file, and neither the write times nor when the game took each press are logged; a window capture after each 3 s wait while the game window was up (135-136 taken per run, not posted). RTX 5070 Ti 16 GB, Ryzen 7 9800X3D, 64 GB.
Arm R adds VICTORY_RT_MISS=1 and the two lists, VICTORY_RT_SKIN_NAMES with 1 entry and VICTORY_RT_TRACE_NAMES with 3 entries (names given at run time). Both R logs report on=true skin_entries=1 trace_entries=3 and log left-out skinning and tracing pipelines.
Lines: the frame-meter lines this build prints about every 5 s (not once a second), with > 1000 draws and 0 pipelines being made; medians over those (rounded half up: to 0.1, draws and dropped draws to whole numbers); p10/p90 by nearest rank. With fewer than 100 lines per run, the 1% low is the lowest line.

Run lines used / all fps median p10 p90 1% low ms/frame preparing copies ms / MB textures ms / MB GPU ms copying back ms / MB draws dropped draws
A1 74 / 86 24.1 20.1 25.3 8.7 41.5 32.4 8.4 / 48.0 0.3 / 19.4 0.3 18.7 / 24.1 4422 255
R1 75 / 87 25.4 22.5 26.3 18.3 39.3 30.4 7.7 / 44.1 0.3 / 18.4 0.3 17.0 / 22.9 4439 354
A2 53 / 86 24.7 23.7 25.3 19.6 40.5 31.1 8.0 / 46.8 0.3 / 18.3 0.4 17.7 / 24.0 4423 252
R2 74 / 87 24.9 22.8 25.8 19.9 40.3 30.6 7.9 / 45.1 0.3 / 20.1 0.3 17.6 / 22.9 4438 353

A2 has fewer lines used: 33 of its 86 lines had pipelines being made (21 of them with > 1000 draws); in A1, R1 and R2 that was 2, 1 and 7.

**@⁠CowboyBingus** on GitHub · 2026-11-27 10:26 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/143#issuecomment-7215883350) · edited 2026-11-27 10:36 UTC Thanks for the [review](https://git.gtahub.st/github/TaynanGT--Vice-Tay/pulls/143). Rebased onto `main` 99a7f9b; the branch is now 99a7f9b + 1414057, c5941de, 1d44973 (code) + cc5d6b2, 00acb3b (docs). Against the head you reviewed (0398c08), `git range-diff` shows code commits 1 and 3 identical and commit 2 changed only in context (its list check in `left_out` now follows `main`'s `VICTORY_SKIP_PIPELINES` check); in `docs/fork-ray-tracing.md` the new section now follows the reflection-hold text from `main`, which is kept. GitHub reports it mergeable. On the two points: - Cache key and emitted miss read the same switch: `victory_shader::emit::rt_miss()` (`emit/mod.rs:224`) is what `emit/intersect.rs:126` branches on and what `shader_cache.rs:151` keys on in `build()`. With `VICTORY_RT_MISS` unset, no bytes are added to the key. - The name lists: `ray_lists()` (`pipeline/make.rs:147`) returns empty lists unless `VICTORY_RT_MISS=1` and `VICTORY_BVH_BUILDER` is not `1` (line 156); with a list holding an entry but those conditions not met, the only effect is one info log line. Only `compute` stages are matched (line 179). No names are built in. Not covered, plainly: - No unit test covers the miss branch in `intersect.rs`. - That branch returns before the descriptor `handle()` setup and writes its results without `begin_guarded`/`end_guarded` (each write still takes the lane guard, `intersect.rs:136`). - The shader-side miss is not gated by `VICTORY_BVH_BUILDER`; only the name lists are. - Whether the programs the skinning list matched in these runs feed anything besides the ray-tracing structures was not checked. **A/B (same session, interleaved, order A1 R1 A2 R2, 450 s each)** Setup: exe md5 `B59ED46815DAAD639B969AB248C79ACE`, the `target\diag` exe of the tree that was measured: `main` 4ee1a47 + the same three code commits (`git range-diff` shows them identical to the rebased ones) + two docs commits; the exe was written after the code commits, and the tree's uncommitted state at build time is not recorded. diag profile with the `diagnostics` feature (`target\diag`; every run log has the diagnostics-only write-watch line); `scripts\play.ps1 -Console series-s -Machine 4070 -Windowed -Dlss quality`; reflection hold on in both arms (`VICTORY_AMBIENT_REFLECT=1`, `VICTORY_AMBIENT_REFLECT_IN=CS_TemporalResolve2_Opaque,CS_TemporalResolve1_Alpha`); `VICTORY_KEYS_FILE` set: in both arms a background job, started just before the launch script, wrote Enter presses (held 0.3 s) to it once its clock was past 35 s, beginning no new round after 62 s on its clock; each write first waited until the game had taken the previous file, and neither the write times nor when the game took each press are logged; a window capture after each 3 s wait while the game window was up (135-136 taken per run, not posted). RTX 5070 Ti 16 GB, Ryzen 7 9800X3D, 64 GB. Arm R adds `VICTORY_RT_MISS=1` and the two lists, `VICTORY_RT_SKIN_NAMES` with 1 entry and `VICTORY_RT_TRACE_NAMES` with 3 entries (names given at run time). Both R logs report `on=true skin_entries=1 trace_entries=3` and log left-out skinning and tracing pipelines. Lines: the frame-meter lines this build prints about every 5 s (not once a second), with > 1000 draws and 0 pipelines being made; medians over those (rounded half up: to 0.1, draws and dropped draws to whole numbers); p10/p90 by nearest rank. With fewer than 100 lines per run, the 1% low is the lowest line. | Run | lines used / all | fps median | p10 | p90 | 1% low | ms/frame | preparing | copies ms / MB | textures ms / MB | GPU ms | copying back ms / MB | draws | dropped draws | |---|---|---|---|---|---|---|---|---|---|---|---|---|---| | A1 | 74 / 86 | 24.1 | 20.1 | 25.3 | 8.7 | 41.5 | 32.4 | 8.4 / 48.0 | 0.3 / 19.4 | 0.3 | 18.7 / 24.1 | 4422 | 255 | | R1 | 75 / 87 | 25.4 | 22.5 | 26.3 | 18.3 | 39.3 | 30.4 | 7.7 / 44.1 | 0.3 / 18.4 | 0.3 | 17.0 / 22.9 | 4439 | 354 | | A2 | 53 / 86 | 24.7 | 23.7 | 25.3 | 19.6 | 40.5 | 31.1 | 8.0 / 46.8 | 0.3 / 18.3 | 0.4 | 17.7 / 24.0 | 4423 | 252 | | R2 | 74 / 87 | 24.9 | 22.8 | 25.8 | 19.9 | 40.3 | 30.6 | 7.9 / 45.1 | 0.3 / 20.1 | 0.3 | 17.6 / 22.9 | 4438 | 353 | A2 has fewer lines used: 33 of its 86 lines had pipelines being made (21 of them with > 1000 draws); in A1, R1 and R2 that was 2, 1 and 7.
Author
Owner

@⁠TaynanGT on GitHub · 2026-11-27 10:37 UTC · original

@⁠CowboyBingus The rebased 00acb3b passed Windows CI. Both pairs show lower preparation time and roughly 100 more dropped draws per frame with the miss mode and lists enabled together. The next useful split is miss mode alone versus miss mode plus the selected lists, using the same warmed scene. That gives us a way to check which drawing work the lists remove before judging the FPS difference.

**@⁠TaynanGT** on GitHub · 2026-11-27 10:37 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/143#issuecomment-7216113009) @⁠CowboyBingus The rebased `00acb3b` passed Windows CI. Both pairs show lower preparation time and roughly 100 more dropped draws per frame with the miss mode and lists enabled together. The next useful split is miss mode alone versus miss mode plus the selected lists, using the same warmed scene. That gives us a way to check which drawing work the lists remove before judging the FPS difference.
Author
Owner

@⁠CowboyBingus on GitHub · 2026-11-27 11:43 UTC · original

The split you asked for in this comment: miss mode alone (M) and miss mode plus the lists (ML), interleaved M1 ML1 M2 ML2, 450 s each, run back to back.

Setup: as in my earlier comment, with two differences: window captures taken were 135, 127, 136 and 135 (M1, ML1, M2, ML2), and the exe (md5 9551D082D8A9B5DCF3ED830627721B47) is this PR's head 00acb3b with #206 (292adb5, the depth-plane change) merged locally. All four runs used the same exe. M sets VICTORY_RT_MISS=1; ML adds the same two lists as before (1 skinning entry, 3 tracing entries). Reflection hold on in all runs.

Lines with > 1000 draws and 0 pipelines being made; medians rounded half up (draws and dropped draws to whole numbers); p10/p90 by nearest rank; with fewer than 100 lines per run, the 1% low is the lowest line.

Run lines used / all fps median p10 p90 1% low ms/frame preparing copies ms / MB textures ms / MB GPU ms copying back ms / MB draws dropped draws
M1 30 / 84 25.6 24.4 26.9 21.7 39.2 29.1 7.1 / 43.4 0.3 / 19.0 0.6 17.4 / 23.1 4270 244
ML1 45 / 85 23.9 23.0 25.0 18.7 41.9 33.4 9.1 / 45.2 0.3 / 19.5 0.3 17.9 / 22.6 4405 346
M2 65 / 86 23.9 22.2 24.7 17.9 41.9 32.1 7.9 / 47.0 0.3 / 18.5 0.3 19.1 / 24.1 4443 254
ML2 46 / 85 26.3 24.7 27.0 22.8 38.0 28.9 7.7 / 43.8 0.3 / 17.9 0.3 16.6 / 22.7 4394 346
  • Dropped draws: M 244 / 254, ML 346 / 346.
  • ms/frame: M 39.2 / 41.9, ML 41.9 / 38.0. Which arm is faster flips between the two rounds, so I do not read a frame-time difference from these four runs.
  • Many lines still had pipelines being made (54, 40, 21 and 39 of the lines in M1, ML1, M2, ML2), so the lines used are 30 to 65 per run.

Log: no missing-depth warning in any of the four runs. A role=Resolve stand-in line is logged in M1, ML1 and ML2, not in M2. Both ML runs log the lists as on (on=true) and log pipeline left out: lines for the skinning and tracing lists; the M runs log neither. On the last per-reason dropped .../frame without a host pipeline lines of each run, the skinning list accounts for 95.3 (ML1) and 95.1 (ML2) per frame and the tracing list for 4.0 per frame in both; the M runs have no list entries there.

Picture: at about 200, 330 and 440 s, the walls on both sides of the window are darker in M1 than in ML1, M2 and ML2, and M1's shots are framed slightly differently. I have not found why.

**@⁠CowboyBingus** on GitHub · 2026-11-27 11:43 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/143#issuecomment-7217395363) The split you asked for in [this comment](https://git.gtahub.st/github/TaynanGT--Vice-Tay/pulls/143): miss mode alone (M) and miss mode plus the lists (ML), interleaved M1 ML1 M2 ML2, 450 s each, run back to back. **Setup:** as in [my earlier comment](https://git.gtahub.st/github/TaynanGT--Vice-Tay/pulls/143), with two differences: window captures taken were 135, 127, 136 and 135 (M1, ML1, M2, ML2), and the exe (md5 `9551D082D8A9B5DCF3ED830627721B47`) is this PR's head `00acb3b` with [#206](https://git.gtahub.st/github/TaynanGT--Vice-Tay/pulls/206) (`292adb5`, the depth-plane change) merged locally. All four runs used the same exe. M sets `VICTORY_RT_MISS=1`; ML adds the same two lists as before (1 skinning entry, 3 tracing entries). Reflection hold on in all runs. Lines with > 1000 draws and 0 pipelines being made; medians rounded half up (draws and dropped draws to whole numbers); p10/p90 by nearest rank; with fewer than 100 lines per run, the 1% low is the lowest line. | Run | lines used / all | fps median | p10 | p90 | 1% low | ms/frame | preparing | copies ms / MB | textures ms / MB | GPU ms | copying back ms / MB | draws | dropped draws | |---|---|---|---|---|---|---|---|---|---|---|---|---|---| | M1 | 30 / 84 | 25.6 | 24.4 | 26.9 | 21.7 | 39.2 | 29.1 | 7.1 / 43.4 | 0.3 / 19.0 | 0.6 | 17.4 / 23.1 | 4270 | 244 | | ML1 | 45 / 85 | 23.9 | 23.0 | 25.0 | 18.7 | 41.9 | 33.4 | 9.1 / 45.2 | 0.3 / 19.5 | 0.3 | 17.9 / 22.6 | 4405 | 346 | | M2 | 65 / 86 | 23.9 | 22.2 | 24.7 | 17.9 | 41.9 | 32.1 | 7.9 / 47.0 | 0.3 / 18.5 | 0.3 | 19.1 / 24.1 | 4443 | 254 | | ML2 | 46 / 85 | 26.3 | 24.7 | 27.0 | 22.8 | 38.0 | 28.9 | 7.7 / 43.8 | 0.3 / 17.9 | 0.3 | 16.6 / 22.7 | 4394 | 346 | - Dropped draws: M 244 / 254, ML 346 / 346. - ms/frame: M 39.2 / 41.9, ML 41.9 / 38.0. Which arm is faster flips between the two rounds, so I do not read a frame-time difference from these four runs. - Many lines still had pipelines being made (54, 40, 21 and 39 of the lines in M1, ML1, M2, ML2), so the lines used are 30 to 65 per run. **Log:** no missing-depth warning in any of the four runs. A `role=Resolve` stand-in line is logged in M1, ML1 and ML2, not in M2. Both ML runs log the lists as on (`on=true`) and log `pipeline left out:` lines for the skinning and tracing lists; the M runs log neither. On the last per-reason `dropped .../frame without a host pipeline` lines of each run, the skinning list accounts for 95.3 (ML1) and 95.1 (ML2) per frame and the tracing list for 4.0 per frame in both; the M runs have no list entries there. **Picture:** at about 200, 330 and 440 s, the walls on both sides of the window are darker in M1 than in ML1, M2 and ML2, and M1's shots are framed slightly differently. I have not found why.
Author
Owner

@⁠TaynanGT on GitHub · 2026-11-27 11:50 UTC · original

@⁠CowboyBingus The two rounds flip which arm is faster, while the lists consistently add about 95 skinning and four tracing drops per frame. I’ll keep the lists opt-in. The wall difference is worth a same-angle check with the miss mode alone, using the same cache state. The shared role=Resolve line is useful when it appears, and the four runs had no missing-depth warnings.

**@⁠TaynanGT** on GitHub · 2026-11-27 11:50 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/143#issuecomment-7217530578) @⁠CowboyBingus The two rounds flip which arm is faster, while the lists consistently add about 95 skinning and four tracing drops per frame. I’ll keep the lists opt-in. The wall difference is worth a same-angle check with the miss mode alone, using the same cache state. The shared `role=Resolve` line is useful when it appears, and the four runs had no missing-depth warnings.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/143/head:github-bot/gh-143'
git switch 'github-bot/gh-143'

Merge

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