Light stand-in: an opt-in hold of the traced reflections to the light around (VICTORY_AMBIENT_REFLECT) #99

Closed
CowboyBingus wants to merge 396 commits from upstream-pr/99 into main
CowboyBingus commented 2026-11-27 00:46:52 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by CowboyBingus on 2026-11-27T00:46:52Z.


What it fixes

In our runs with the ray-tracing structure builder off, eyes in many close-ups showed a flat blue-white glow or a pale lavender where the irises should be. With this hold on, the irises were dark in the close-ups we captured.

avatarmanz/VIctory-7900XTX#231 reports the same symptom on AMD cards: flat, bright, bluish-white patches over the eyes, with no iris or pupil. A comment there reports the eyes correct with VICTORY_BVH_BUILDER=1.

What it does

This only acts while the builder is off and the light stand-in is on.

Right after each program that resolves the traced reflections, one pass runs over the reflection image. The image is found the same way as in #314. Any texel brighter than a set multiple of the stand-in's light around it is scaled down to that limit, keeping its hue.

How to switch it on

It is off by default. Two switches are needed:

  • VICTORY_AMBIENT_REFLECT=<multiple>: a positive number. Unset, 0 or off leaves the title's own reflections. We used 1.
  • VICTORY_AMBIENT_REFLECT_IN=<text>[,<text>]: text in the names of the programs that resolve the reflections.
    • These texts are passed at run time, so the change adds no program names to the code.
    • They are matched after the names of the stand-in's other roles.

It also needs the stand-in on: VICTORY_AMBIENT (which play.ps1 sets), or VICTORY_AMBIENT_RT, which also switches the stand-in on. It does nothing while the builder runs, including with VICTORY_AMBIENT_RT.

Log lines:

  • At start-up, when both switches are valid and the stand-in is on: reflections held to a multiple of the light around (VICTORY_AMBIENT_REFLECT) held=… count=….
  • The first time a reflection image is held: the reflections are held after their resolve size=[…].

With either switch unset, behaviour is unchanged. (With only VICTORY_AMBIENT_REFLECT set, a warning says that no reflections are held.)

  • No program gets the new role.
  • The hold's pass is not compiled.
  • The new hook after indirect dispatches does not run; it runs only for that role.

If the hold's pass fails to compile, a warning is logged and the rest of the stand-in still runs.

Measured

Setup:

  • RTX 5070 Ti 16 GB, Windows 11, Series S console.
  • play.ps1 settings without -Safe or -RayTracing: its 4090 machine settings, picked automatically, except the last three runs below, which used -Machine 4070.
  • Every run without the builder has the "structure builder, which is off" lines in its log (30 to 32 per run). The builder-on comparison run has none.
  • Runs were 230 s with a screenshot every 2 s.
  • Frame-time figures are the median of the "ms/frame" log lines over frames with more than 1,000 draws.

Results:

  • Without the hold (plain 0b5b906): a flat blue-white glow over the eyes in one close-up (run V3, s0120). Pale lavender in a close-up of another run (run P1, s0129).
  • With the hold (0b5b906 plus this change, switches as above): dark irises in close-ups at s0118 and s0123 (run E2b). In another run (H1) they were dark brown at s0125 and s0130. Both log lines were present once in each of the three runs with the hold and absent from the five without it.
  • Frame time: four alternating runs (P1 without, H1 with, P2 without, H2 with) gave 73.95, 73.15, 73.0 and 74.1 ms.
  • For comparison, the builder on (VICTORY_BVH_BUILDER=1, no hold): the eyes looked normal, but the run had other picture defects and ran at about 2 fps (median 428 ms).
  • Scoring: a separate check scored every eye close-up from 95 to 140 s in 8 runs.
    • The 3 runs with the hold had 29 normal close-ups, 0 glowing and 0 tinted.
    • The 5 runs without it had 14 glowing (flat, no pupil), 13 tinted (a blue-violet iris or patch, with the pupil still visible) and 21 normal.
    • The same check saw blue-white highlights on glossy surfaces in the runs without the hold, and none in the same shots of the runs with it.
  • This branch (4e3e366 plus this change, -Machine 4070, one run): both log lines present, the eye close-ups dark, and a median of 48.4 ms. Two plain 4e3e366 runs on the same preset had medians of 49.5 and 47.05 ms.

All runs with the hold except the last one used the change on 0b5b906. The runs without it used plain 0b5b906, except the two plain 4e3e366 runs. This branch is the same change rebased onto 4e3e366.

  • The rebase conflicted in ambient.rs after(), where this change's most meets the newer bounds(). For the hold, most is its own multiple and least is 0; the hold's pass does not read least.
  • The hold now also skips while the builder runs. This is needed because VICTORY_AMBIENT_RT lets the stand-in run with the builder.

Credit

Ported from Serph91P's avatarmanz/VIctory-7900XTX#314 (commit 6c7e3a8, GPL-3.0-or-later): the hold's HLSL pass, the reflection role, the image lookup and the hook after indirect dispatches. The idea of holding the reflections to the ambient light, and the switch's name, are beloooo's (VIctory-Belobug-AMD 44dcd437).

Differences from #314:

  • Off by default.
  • Program names are given at run time and matched last.
  • The hook after indirect dispatches is limited to this role.
  • The pass is compiled only when the hold is on, and a failure there does not turn off the rest of the stand-in.
  • The replay's --reflect and the docs are left out.

Tests

  • ambient::tests::settings: parsing of both switches.
  • ambient::tests::roles_by_name: the role is given only by the texts passed in, and never without them.
  • ambient::tests::the_hold_compiles: the hold's pass compiles with the system's compiler.
  • cargo clippy --workspace --all-targets --locked -- -D warnings, with and without --all-features: both pass (exit 0).
  • cargo test --workspace --locked --no-fail-fast on 4e3e366 + this change: 1105 passed, 0 failed, 53 ignored (29 test result lines; RTX 5070 Ti, Windows 11).

No game data in the commit.

🤖 Generated with Claude Code

<!-- greyfinch-sync:TaynanGT/Vice-Tay:issue:5519245278 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/99). Originally posted by [CowboyBingus](https://github.com/CowboyBingus) on 2026-11-27T00:46:52Z. --- **What it fixes** In our runs with the ray-tracing structure builder off, eyes in many close-ups showed a flat blue-white glow or a pale lavender where the irises should be. With this hold on, the irises were dark in the close-ups we captured. avatarmanz/VIctory-7900XTX#231 reports the same symptom on AMD cards: flat, bright, bluish-white patches over the eyes, with no iris or pupil. A comment there reports the eyes correct with `VICTORY_BVH_BUILDER=1`. **What it does** This only acts while the builder is off and the light stand-in is on. Right after each program that resolves the traced reflections, one pass runs over the reflection image. The image is found the same way as in #314. Any texel brighter than a set multiple of the stand-in's light around it is scaled down to that limit, keeping its hue. **How to switch it on** It is off by default. Two switches are needed: - `VICTORY_AMBIENT_REFLECT=<multiple>`: a positive number. Unset, `0` or `off` leaves the title's own reflections. We used `1`. - `VICTORY_AMBIENT_REFLECT_IN=<text>[,<text>]`: text in the names of the programs that resolve the reflections. - These texts are passed at run time, so the change adds no program names to the code. - They are matched after the names of the stand-in's other roles. It also needs the stand-in on: `VICTORY_AMBIENT` (which `play.ps1` sets), or `VICTORY_AMBIENT_RT`, which also switches the stand-in on. It does nothing while the builder runs, including with `VICTORY_AMBIENT_RT`. Log lines: - At start-up, when both switches are valid and the stand-in is on: `reflections held to a multiple of the light around (VICTORY_AMBIENT_REFLECT) held=… count=…`. - The first time a reflection image is held: `the reflections are held after their resolve size=[…]`. With either switch unset, behaviour is unchanged. (With only `VICTORY_AMBIENT_REFLECT` set, a warning says that no reflections are held.) - No program gets the new role. - The hold's pass is not compiled. - The new hook after indirect dispatches does not run; it runs only for that role. If the hold's pass fails to compile, a warning is logged and the rest of the stand-in still runs. **Measured** Setup: - RTX 5070 Ti 16 GB, Windows 11, Series S console. - `play.ps1` settings without `-Safe` or `-RayTracing`: its 4090 machine settings, picked automatically, except the last three runs below, which used `-Machine 4070`. - Every run without the builder has the "structure builder, which is off" lines in its log (30 to 32 per run). The builder-on comparison run has none. - Runs were 230 s with a screenshot every 2 s. - Frame-time figures are the median of the "ms/frame" log lines over frames with more than 1,000 draws. Results: - **Without the hold** (plain 0b5b906): a flat blue-white glow over the eyes in one close-up (run V3, s0120). Pale lavender in a close-up of another run (run P1, s0129). - **With the hold** (0b5b906 plus this change, switches as above): dark irises in close-ups at s0118 and s0123 (run E2b). In another run (H1) they were dark brown at s0125 and s0130. Both log lines were present once in each of the three runs with the hold and absent from the five without it. - **Frame time:** four alternating runs (P1 without, H1 with, P2 without, H2 with) gave 73.95, 73.15, 73.0 and 74.1 ms. - **For comparison, the builder on** (`VICTORY_BVH_BUILDER=1`, no hold): the eyes looked normal, but the run had other picture defects and ran at about 2 fps (median 428 ms). - **Scoring:** a separate check scored every eye close-up from 95 to 140 s in 8 runs. - The 3 runs with the hold had 29 normal close-ups, 0 glowing and 0 tinted. - The 5 runs without it had 14 glowing (flat, no pupil), 13 tinted (a blue-violet iris or patch, with the pupil still visible) and 21 normal. - The same check saw blue-white highlights on glossy surfaces in the runs without the hold, and none in the same shots of the runs with it. - **This branch (4e3e366 plus this change, `-Machine 4070`, one run):** both log lines present, the eye close-ups dark, and a median of 48.4 ms. Two plain 4e3e366 runs on the same preset had medians of 49.5 and 47.05 ms. All runs with the hold except the last one used the change on 0b5b906. The runs without it used plain 0b5b906, except the two plain 4e3e366 runs. This branch is the same change rebased onto 4e3e366. - The rebase conflicted in `ambient.rs` `after()`, where this change's `most` meets the newer `bounds()`. For the hold, `most` is its own multiple and `least` is 0; the hold's pass does not read `least`. - The hold now also skips while the builder runs. This is needed because `VICTORY_AMBIENT_RT` lets the stand-in run with the builder. **Credit** Ported from Serph91P's avatarmanz/VIctory-7900XTX#314 (commit 6c7e3a8, GPL-3.0-or-later): the hold's HLSL pass, the reflection role, the image lookup and the hook after indirect dispatches. The idea of holding the reflections to the ambient light, and the switch's name, are beloooo's (VIctory-Belobug-AMD 44dcd437). Differences from #314: - Off by default. - Program names are given at run time and matched last. - The hook after indirect dispatches is limited to this role. - The pass is compiled only when the hold is on, and a failure there does not turn off the rest of the stand-in. - The replay's `--reflect` and the docs are left out. **Tests** - `ambient::tests::settings`: parsing of both switches. - `ambient::tests::roles_by_name`: the role is given only by the texts passed in, and never without them. - `ambient::tests::the_hold_compiles`: the hold's pass compiles with the system's compiler. - `cargo clippy --workspace --all-targets --locked -- -D warnings`, with and without `--all-features`: both pass (exit 0). - `cargo test --workspace --locked --no-fail-fast` on 4e3e366 + this change: 1105 passed, 0 failed, 53 ignored (29 test result lines; RTX 5070 Ti, Windows 11). No game data in the commit. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
TaynanGT commented 2026-11-27 01:28:50 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-27T01:28:50Z.

Code review location: crates/victory-gpu/src/draw.rs; line 4644

@@ -4622,6 +4636,13 @@ impl State {
         // back (`crate::indirect`).
         if kind == DISPATCH {
             DISPATCHED.fetch_add(1, Ordering::Relaxed);
+            // The reflections' resolve is dispatched so; the other roles
+            // keep to direct dispatches, as before.
+            if p.stages.first().and_then(|s| s.shader.ambient)
+                == Some(crate::ambient::Role::Reflect)
+            {
+                self.after_dispatch(list, p);

This hook records a write to the reflection UAV after ExecuteIndirect. With a count buffer of zero, the resolve records no dispatch at playback and this still rewrites the previous contents. Do the targeted resolves always run at least one dispatch? Please document or guard that requirement if the counted path can reach the hook.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:review-comment:4714797083 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/99#discussion_r4714797083). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T01:28:50Z. **Code review location:** `crates/victory-gpu/src/draw.rs`; line 4644 ~~~~diff @@ -4622,6 +4636,13 @@ impl State { // back (`crate::indirect`). if kind == DISPATCH { DISPATCHED.fetch_add(1, Ordering::Relaxed); + // The reflections' resolve is dispatched so; the other roles + // keep to direct dispatches, as before. + if p.stages.first().and_then(|s| s.shader.ambient) + == Some(crate::ambient::Role::Reflect) + { + self.after_dispatch(list, p); ~~~~ --- This hook records a write to the reflection UAV after `ExecuteIndirect`. With a count buffer of zero, the resolve records no dispatch at playback and this still rewrites the previous contents. Do the targeted resolves always run at least one dispatch? Please document or guard that requirement if the counted path can reach the hook.
TaynanGT commented 2026-11-27 01:28:50 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-27T01:28:50Z.

Review: COMMENTED


Thanks for the alternating runs and the comparison with the builder enabled. I started CI on fc9ef8a7. Could you confirm whether the reflection resolves you measured use a count buffer? I left a question on the indirect path.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:review:6082280696 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/99#pullrequestreview-6082280696). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T01:28:50Z. **Review:** COMMENTED --- Thanks for the alternating runs and the comparison with the builder enabled. I started CI on `fc9ef8a7`. Could you confirm whether the reflection resolves you measured use a count buffer? I left a question on the indirect path.
CowboyBingus commented 2026-11-27 02:12:03 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by CowboyBingus on 2026-11-27T02:12:03Z.


Thanks. Our earlier logs could not answer the count-buffer question, so I added counts by dispatch path and measured one run.

Earlier runs. These were four runs with the hold, all on an RTX 5070 Ti: three on 0b5b906 with a port of this PR's first commit, and one on 4e3e366 with its first commit, before these guards. Their logs have only these hold lines:

  • one start-up line;
  • one line the first time the hold runs;
  • one or two of the stand-in's first lines (role=Reflect).

None of these lines says whether the resolve came from Dispatch, from ExecuteIndirect without a count buffer, or from ExecuteIndirect with one.

In fa90adf:

  • After an ExecuteIndirect with a count buffer, the hold is no longer recorded.
  • After a Dispatch of no groups, the hold is no longer recorded either.
  • The first time each of these happens while ambient::after would record a hold, an INFO line says so:
    • reflections not held after a counted indirect dispatch
    • reflections not held after a dispatch of no groups
  • The comments at both hooks give the reason.
  • The resolves are counted by how they were dispatched: holds after Dispatch, holds after ExecuteIndirect without a count, and counted and empty resolves left alone (noted only while ambient::after would record a hold). The counts are logged at the first noted resolve 100 or more frames after the first noted one, then at most once every 1000 frames:
    reflections' resolves: held after a direct dispatch, held after an indirect one without a count, not held after a counted one or a direct one of no groups frames=… direct=… indirect=… counted=… empty=…
  • Test: ambient::tests::counts_by_dispatch_are_due_after_the_first_note_then_every_so_often checks the schedule of the count lines (counts_due).

Measured. One run (its log spans 230 s) with a diagnostics build (--profile diag --features diagnostics) of b8fda70, whose tree is the same as fa90adf's (exe md5 b6405e23…): RTX 5070 Ti, Series S, -Machine 4070, VICTORY_AMBIENT_REFLECT=1 and VICTORY_AMBIENT_REFLECT_IN set. The count lines, verbatim:

  • frames=100 direct=0 indirect=201 counted=0 empty=0
  • frames=1100 direct=0 indirect=2201 counted=0 empty=0
  • frames=2100 direct=0 indirect=4201 counted=0 empty=0
  • frames=3100 direct=0 indirect=6201 counted=0 empty=0 (the last one)

In this run, up to the last count line (frames=3100), every hold that was recorded followed an ExecuteIndirect without a count buffer (direct=0). The log goes on for 10.6 s after that line, and holds in those seconds are in no count.

Neither "reflections not held after …" line appears anywhere in the log. So while ambient::after would have recorded a hold (by its own checks; the image's view is not checked), no resolve with a count buffer and no empty Dispatch reached the hook.

These counts cover only the scenes this one run reached.

Not covered: an ExecuteIndirect without a count buffer whose records ask for no groups. The hook still follows it, and these counts do not show such records.

Checks. cargo clippy --workspace --all-targets --locked -- -D warnings, with and without --all-features: both exit 0. cargo test --workspace --locked --no-fail-fast: exit 0, 1106 passed, 0 failed, 53 ignored. Both ran on this tree (b8fda70) on Windows 11, on the same machine as the run above.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:comment:7207917018 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/99#issuecomment-7207917018). Originally posted by [CowboyBingus](https://github.com/CowboyBingus) on 2026-11-27T02:12:03Z. --- Thanks. Our earlier logs could not answer the count-buffer question, so I added counts by dispatch path and measured one run. **Earlier runs.** These were four runs with the hold, all on an RTX 5070 Ti: three on 0b5b906 with a port of this PR's first commit, and one on 4e3e366 with its first commit, before these guards. Their logs have only these hold lines: - one start-up line; - one line the first time the hold runs; - one or two of the stand-in's first lines (`role=Reflect`). None of these lines says whether the resolve came from `Dispatch`, from `ExecuteIndirect` without a count buffer, or from `ExecuteIndirect` with one. **In fa90adf:** - After an `ExecuteIndirect` with a count buffer, the hold is no longer recorded. - After a `Dispatch` of no groups, the hold is no longer recorded either. - The first time each of these happens while `ambient::after` would record a hold, an INFO line says so: - `reflections not held after a counted indirect dispatch` - `reflections not held after a dispatch of no groups` - The comments at both hooks give the reason. - The resolves are counted by how they were dispatched: holds after `Dispatch`, holds after `ExecuteIndirect` without a count, and counted and empty resolves left alone (noted only while `ambient::after` would record a hold). The counts are logged at the first noted resolve 100 or more frames after the first noted one, then at most once every 1000 frames: `reflections' resolves: held after a direct dispatch, held after an indirect one without a count, not held after a counted one or a direct one of no groups frames=… direct=… indirect=… counted=… empty=…` - Test: `ambient::tests::counts_by_dispatch_are_due_after_the_first_note_then_every_so_often` checks the schedule of the count lines (`counts_due`). **Measured.** One run (its log spans 230 s) with a diagnostics build (`--profile diag --features diagnostics`) of b8fda70, whose tree is the same as fa90adf's (exe md5 b6405e23…): RTX 5070 Ti, Series S, `-Machine 4070`, `VICTORY_AMBIENT_REFLECT=1` and `VICTORY_AMBIENT_REFLECT_IN` set. The count lines, verbatim: - `frames=100 direct=0 indirect=201 counted=0 empty=0` - `frames=1100 direct=0 indirect=2201 counted=0 empty=0` - `frames=2100 direct=0 indirect=4201 counted=0 empty=0` - `frames=3100 direct=0 indirect=6201 counted=0 empty=0` (the last one) In this run, up to the last count line (frames=3100), every hold that was recorded followed an `ExecuteIndirect` without a count buffer (direct=0). The log goes on for 10.6 s after that line, and holds in those seconds are in no count. Neither "reflections not held after …" line appears anywhere in the log. So while `ambient::after` would have recorded a hold (by its own checks; the image's view is not checked), no resolve with a count buffer and no empty `Dispatch` reached the hook. These counts cover only the scenes this one run reached. **Not covered:** an `ExecuteIndirect` without a count buffer whose records ask for no groups. The hook still follows it, and these counts do not show such records. **Checks.** `cargo clippy --workspace --all-targets --locked -- -D warnings`, with and without `--all-features`: both exit 0. `cargo test --workspace --locked --no-fail-fast`: exit 0, 1106 passed, 0 failed, 53 ignored. Both ran on this tree (b8fda70) on Windows 11, on the same machine as the run above.
CowboyBingus commented 2026-11-27 02:12:06 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by CowboyBingus on 2026-11-27T02:12:06Z.

Code review location: crates/victory-gpu/src/draw.rs; line 4644

@@ -4622,6 +4636,13 @@ impl State {
         // back (`crate::indirect`).
         if kind == DISPATCH {
             DISPATCHED.fetch_add(1, Ordering::Relaxed);
+            // The reflections' resolve is dispatched so; the other roles
+            // keep to direct dispatches, as before.
+            if p.stages.first().and_then(|s| s.shader.ambient)
+                == Some(crate::ambient::Role::Reflect)
+            {
+                self.after_dispatch(list, p);

Guarded in fa90adf: after an ExecuteIndirect with a count buffer (and after a Dispatch of no groups) the hold is not recorded, with a one-time INFO line and counts by dispatch path. Measured counts and the case not covered are in the PR conversation.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:review-comment:4714996926 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/99#discussion_r4714996926). Originally posted by [CowboyBingus](https://github.com/CowboyBingus) on 2026-11-27T02:12:06Z. **Code review location:** `crates/victory-gpu/src/draw.rs`; line 4644 ~~~~diff @@ -4622,6 +4636,13 @@ impl State { // back (`crate::indirect`). if kind == DISPATCH { DISPATCHED.fetch_add(1, Ordering::Relaxed); + // The reflections' resolve is dispatched so; the other roles + // keep to direct dispatches, as before. + if p.stages.first().and_then(|s| s.shader.ambient) + == Some(crate::ambient::Role::Reflect) + { + self.after_dispatch(list, p); ~~~~ --- Guarded in fa90adf: after an `ExecuteIndirect` with a count buffer (and after a `Dispatch` of no groups) the hold is not recorded, with a one-time INFO line and counts by dispatch path. Measured counts and the case not covered are in the PR conversation.
TaynanGT commented 2026-11-27 02:19:30 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-27T02:19:30Z.

Code review location: crates/victory-gpu/src/draw.rs; line 4644

@@ -4622,6 +4636,13 @@ impl State {
         // back (`crate::indirect`).
         if kind == DISPATCH {
             DISPATCHED.fetch_add(1, Ordering::Relaxed);
+            // The reflections' resolve is dispatched so; the other roles
+            // keep to direct dispatches, as before.
+            if p.stages.first().and_then(|s| s.shader.ambient)
+                == Some(crate::ambient::Role::Reflect)
+            {
+                self.after_dispatch(list, p);

Thanks for adding the counted and direct zero-group guards and measuring the dispatch paths. I approved CI for fa90adf. Since all 6,201 holds in the reported window followed uncounted indirect resolves, the zero-group record you called out is the remaining case to cover. Could you check whether the targeted resolves can reach that path with a zero group dimension, or guard the hold so it only runs when the resolve actually wrote the image?

<!-- greyfinch-sync:TaynanGT/Vice-Tay:review-comment:4715032019 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/99#discussion_r4715032019). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T02:19:30Z. **Code review location:** `crates/victory-gpu/src/draw.rs`; line 4644 ~~~~diff @@ -4622,6 +4636,13 @@ impl State { // back (`crate::indirect`). if kind == DISPATCH { DISPATCHED.fetch_add(1, Ordering::Relaxed); + // The reflections' resolve is dispatched so; the other roles + // keep to direct dispatches, as before. + if p.stages.first().and_then(|s| s.shader.ambient) + == Some(crate::ambient::Role::Reflect) + { + self.after_dispatch(list, p); ~~~~ --- Thanks for adding the counted and direct zero-group guards and measuring the dispatch paths. I approved CI for `fa90adf`. Since all 6,201 holds in the reported window followed uncounted indirect resolves, the zero-group record you called out is the remaining case to cover. Could you check whether the targeted resolves can reach that path with a zero group dimension, or guard the hold so it only runs when the resolve actually wrote the image?
TaynanGT commented 2026-11-27 03:14:12 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-27T03:14:12Z.


@CowboyBingus Thanks for calling out the uncounted zero-group case. I tested a guard that reads the actual group counts after the clamp. The WARP test preserved the reflection texel for a zero in each dimension and for an oversized dispatch that the clamp zeroed. A valid dispatch changed the texel. I kept your commits in draft #127.

Could you repeat your RTX 5070 Ti scene on #127 with the same settings? The new counters distinguish indirect_gated from multiple. The original 6,201 uncounted calls did not distinguish those paths. A short excerpt with those counts, the GPU time and how the eyes look would cover the remaining check.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:comment:7208818554 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/99#issuecomment-7208818554). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T03:14:12Z. --- @CowboyBingus Thanks for calling out the uncounted zero-group case. I tested a guard that reads the actual group counts after the clamp. The WARP test preserved the reflection texel for a zero in each dimension and for an oversized dispatch that the clamp zeroed. A valid dispatch changed the texel. I kept your commits in draft #127. Could you repeat your RTX 5070 Ti scene on #127 with the same settings? The new counters distinguish `indirect_gated` from `multiple`. The original 6,201 uncounted calls did not distinguish those paths. A short excerpt with those counts, the GPU time and how the eyes look would cover the remaining check.
TaynanGT commented 2026-11-27 04:11:39 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-27T04:11:39Z.


Thanks for the reflection work and the follow-up RTX 5070 Ti run, @CowboyBingus. The opt-in hold is now on main through #127 with your commits preserved. The guard passed the empty-dispatch WARP regression, and I reran the ambient, indirect and texture readback checks together with #141. The gameplay numbers remain useful context for measuring the pass separately.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:comment:7209597506 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/99#issuecomment-7209597506). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T04:11:39Z. --- Thanks for the reflection work and the follow-up RTX 5070 Ti run, @CowboyBingus. The opt-in hold is now on `main` through #127 with your commits preserved. The guard passed the empty-dispatch WARP regression, and I reran the ambient, indirect and texture readback checks together with #141. The gameplay numbers remain useful context for measuring the pass separately.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
TaynanGT/Vice-Tay!99
No description provided.