Guard reflection holds against empty indirect dispatches #127

Merged
TaynanGT merged 3 commits from upstream-pr/127 into main 2026-11-27 04:11:20 +00:00
TaynanGT commented 2026-11-27 03:11:37 +00:00 (Migrated from github.com)

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


Brings the reflection hold from #99 onto main with CowboyBingus’s authorship preserved. This also addresses the empty indirect-dispatch finding in #120.

For a single uncounted indirect resolve, the GPU reads the actual group counts after the clamp. If any dimension is zero, the hold leaves the reflection texture untouched. Counted and multiple-record indirect resolves skip the hold. The ordinary ambient pass keeps its existing root signature.

  • WARP readback preserved the texture for zero X, Y and Z separately, and for an oversized dispatch that the GPU clamp turned into [0, 0, 0]. A valid dispatch changed the texel.
  • The targeted run reported no Direct3D debug-layer errors. Seven ambient tests and eight indirect tests passed, with one existing test ignored. Clippy passed with and without diagnostics.

I’d like to repeat the RTX 5070 Ti scene before merging. The new indirect_gated and multiple counters show which path was recorded. The repeat should also check the image and GPU time.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:issue:5520520375 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/127). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T03:11:37Z. --- Brings the reflection hold from #99 onto `main` with CowboyBingus’s authorship preserved. This also addresses the empty indirect-dispatch finding in #120. For a single uncounted indirect resolve, the GPU reads the actual group counts after the clamp. If any dimension is zero, the hold leaves the reflection texture untouched. Counted and multiple-record indirect resolves skip the hold. The ordinary ambient pass keeps its existing root signature. - WARP readback preserved the texture for zero X, Y and Z separately, and for an oversized dispatch that the GPU clamp turned into `[0, 0, 0]`. A valid dispatch changed the texel. - The targeted run reported no Direct3D debug-layer errors. Seven ambient tests and eight indirect tests passed, with one existing test ignored. Clippy passed with and without diagnostics. I’d like to repeat the RTX 5070 Ti scene before merging. The new `indirect_gated` and `multiple` counters show which path was recorded. The repeat should also check the image and GPU time.
CowboyBingus commented 2026-11-27 03:50:51 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by CowboyBingus on 2026-11-27T03:50:51Z.


Ran #127 on the same setup as before.

Setup: a --profile diag --features diagnostics build of 486076d3 (exe md5 3fe5c262…). RTX 5070 Ti, Windows 11, Series S, play.ps1 -Machine 4070 (log line 1: "Settings for the 4070."), with VICTORY_AMBIENT_REFLECT=1 and VICTORY_AMBIENT_REFLECT_IN set. The builder was off (32 "structure builder, which is off" lines). One run capped at 230 s, with a screenshot about every 2.3 s (98 shots).

Counters (every count line in the log; the last is at frames=2100):

frames=100 direct=0 indirect_gated=199 counted=0 empty=0 multiple=0
frames=1100 direct=0 indirect_gated=2201 counted=0 empty=0 multiple=0
frames=2100 direct=0 indirect_gated=4201 counted=0 empty=0 multiple=0

Timing. The figures below are from the frame lines with more than 1,000 draws (n=31 for #127, n=32 for fa90adf). We have no per-pass GPU timing for this run. The card-busy figure is the average of the "the card about N% busy" lines over the whole log (218 lines for #127, 220 for fa90adf).

Build Median ms/frame Median "on the GPU" (ms) Card busy (avg)
#127 (486076d3) 48.8 0.8 48.6%
fa90adf (previous run) 46.65 0.65 59.9%

Eyes: in the close-ups at s0118, s0122, s0125 and s0127, the irises are dark, with no blue-white glow.

Separate observation. In this run one character's face had multicoloured block patches at s0113 and s0115. The same kind of patches appear in an earlier run of plain 4e3e366 (default 4090 settings, no reflection switches, only VICTORY_GPU_TIMING=1). Their cause is not established.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:comment:7209318425 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/127#issuecomment-7209318425). Originally posted by [CowboyBingus](https://github.com/CowboyBingus) on 2026-11-27T03:50:51Z. --- Ran #127 on the same setup as before. **Setup:** a `--profile diag --features diagnostics` build of `486076d3` (exe md5 `3fe5c262…`). RTX 5070 Ti, Windows 11, Series S, `play.ps1 -Machine 4070` (log line 1: "Settings for the 4070."), with `VICTORY_AMBIENT_REFLECT=1` and `VICTORY_AMBIENT_REFLECT_IN` set. The builder was off (32 "structure builder, which is off" lines). One run capped at 230 s, with a screenshot about every 2.3 s (98 shots). **Counters** (every count line in the log; the last is at frames=2100): ``` frames=100 direct=0 indirect_gated=199 counted=0 empty=0 multiple=0 frames=1100 direct=0 indirect_gated=2201 counted=0 empty=0 multiple=0 frames=2100 direct=0 indirect_gated=4201 counted=0 empty=0 multiple=0 ``` **Timing.** The figures below are from the frame lines with more than 1,000 draws (n=31 for #127, n=32 for `fa90adf`). We have no per-pass GPU timing for this run. The card-busy figure is the average of the "the card about N% busy" lines over the whole log (218 lines for #127, 220 for `fa90adf`). | Build | Median ms/frame | Median "on the GPU" (ms) | Card busy (avg) | |---|---|---|---| | #127 (`486076d3`) | 48.8 | 0.8 | 48.6% | | `fa90adf` (previous run) | 46.65 | 0.65 | 59.9% | **Eyes:** in the close-ups at s0118, s0122, s0125 and s0127, the irises are dark, with no blue-white glow. **Separate observation.** In this run one character's face had multicoloured block patches at s0113 and s0115. The same kind of patches appear in an earlier run of plain 4e3e366 (default 4090 settings, no reflection switches, only `VICTORY_GPU_TIMING=1`). Their cause is not established.
chatgpt-codex-connector[bot] commented 2026-11-27 03:59:46 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by chatgpt-codex-connector[bot] on 2026-11-27T03:59:46Z.


Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-27T04:01:17.346420Z 486076d Draft marked ready
🔒 Security Review ✅ Completed 2026-11-27T04:02:36.102833Z 486076d Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:comment:7209433982 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/127#issuecomment-7209433982). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/apps/chatgpt-codex-connector) on 2026-11-27T03:59:46Z. --- <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"486076d35185effbd619ba5d2ebf0e550a9df20c","has_any_findings":false,"has_unresolved_findings":false,"status":"completed"},"security_review":{"commit_sha":"486076d35185effbd619ba5d2ebf0e550a9df20c","has_any_findings":null,"has_unresolved_findings":null,"status":"completed"}} --> <!-- codex-security-review:v1 {"blockingSeverityThreshold":"P0","headSha":"486076d35185effbd619ba5d2ebf0e550a9df20c","mergeGateEnabled":false,"pullRequestNumber":127,"repository":"TaynanGT/Vice-Tay","status":"completed"} --> <details> <summary><strong>Codex Review Summary</strong>: ✅ Completed</summary> This comment shows the latest Codex review activity on this pull request. | Review | Status | Commit | Review trigger | | --- | --- | --- | --- | | 📝 **Code Review** | ✅ **Completed** <relative-time datetime="2026-11-27T04:01:17.346420Z">2026-11-27T04:01:17.346420Z</relative-time> | `486076d` | Draft marked ready | | 🔒 **Security Review** | ✅ **Completed** <relative-time datetime="2026-11-27T04:02:36.102833Z">2026-11-27T04:02:36.102833Z</relative-time> | `486076d` | Draft marked ready | <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@codex review" or "@codex security review". Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. </details> </details>
TaynanGT commented 2026-11-27 03:59:58 +00:00 (Migrated from github.com)

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


Thanks for repeating the scene on the RTX 5070 Ti, @CowboyBingus. The 4,201 gated calls and the close-ups with dark irises answer the functional check. I also tested #127 against current main: all 22 enabled ambient and indirect tests passed, including the WARP test for empty dispatches. I moved this out of draft for review as an opt-in change. The 48.8 vs 46.65 ms frame medians describe the two runs, and a per-pass capture would be needed to measure the cost of the hold itself. The face patches can be tracked separately from this change.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:comment:7209436588 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/127#issuecomment-7209436588). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T03:59:58Z. --- Thanks for repeating the scene on the RTX 5070 Ti, @CowboyBingus. The 4,201 gated calls and the close-ups with dark irises answer the functional check. I also tested #127 against current `main`: all 22 enabled ambient and indirect tests passed, including the WARP test for empty dispatches. I moved this out of draft for review as an opt-in change. The 48.8 vs 46.65 ms frame medians describe the two runs, and a per-pass capture would be needed to measure the cost of the hold itself. The face patches can be tracked separately from this change.
Geckomacabre commented 2026-11-27 04:36:54 +00:00 (Migrated from github.com)

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


A question about using this: which name text did you pass in VICTORY_AMBIENT_REFLECT_IN for this title? The PR describes "text in the names of the programs that resolve the reflections" and says you used VICTORY_AMBIENT_REFLECT=1, but not the text. We had held a different pass before (the history update at table 1, dword 40) and would like to switch to this hold with the same programs you tested, so the image lookup at (1,128)/(1,136) matches.

🤖 Generated with Claude Code

<!-- greyfinch-sync:TaynanGT/Vice-Tay:comment:7209942269 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/127#issuecomment-7209942269). Originally posted by [Geckomacabre](https://github.com/Geckomacabre) on 2026-11-27T04:36:54Z. --- A question about using this: which name text did you pass in `VICTORY_AMBIENT_REFLECT_IN` for this title? The PR describes "text in the names of the programs that resolve the reflections" and says you used `VICTORY_AMBIENT_REFLECT=1`, but not the text. We had held a different pass before (the history update at table 1, dword 40) and would like to switch to this hold with the same programs you tested, so the image lookup at (1,128)/(1,136) matches. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
TaynanGT commented 2026-11-27 04:39:00 +00:00 (Migrated from github.com)

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


@Geckomacabre The original port in avatarmanz/VIctory-7900XTX#314 matches CS_TemporalResolve2_Opaque and CS_TemporalResolve1_Alpha. Vice-Tay takes comma-separated substrings, so the equivalent launcher settings are:

-More @{ VICTORY_AMBIENT_REFLECT='1'; VICTORY_AMBIENT_REFLECT_IN='CS_TemporalResolve2_Opaque,CS_TemporalResolve1_Alpha' }

Keep the ambient stand-in enabled and the structure builder off, then check for role=Reflect in the log. The 5070 Ti report says the filter was set. @CowboyBingus, could you confirm whether you used this exact pair on 486076d3?

<!-- greyfinch-sync:TaynanGT/Vice-Tay:comment:7209979617 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/127#issuecomment-7209979617). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T04:39:00Z. --- @Geckomacabre The original port in avatarmanz/VIctory-7900XTX#314 matches `CS_TemporalResolve2_Opaque` and `CS_TemporalResolve1_Alpha`. Vice-Tay takes comma-separated substrings, so the equivalent launcher settings are: ```powershell -More @{ VICTORY_AMBIENT_REFLECT='1'; VICTORY_AMBIENT_REFLECT_IN='CS_TemporalResolve2_Opaque,CS_TemporalResolve1_Alpha' } ``` Keep the ambient stand-in enabled and the structure builder off, then check for `role=Reflect` in the log. The 5070 Ti report says the filter was set. @CowboyBingus, could you confirm whether you used this exact pair on `486076d3`?
CowboyBingus commented 2026-11-27 04:47:17 +00:00 (Migrated from github.com)

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


@TaynanGT Yes, that exact pair. The #127 run (exe md5 3fe5c262…, built from 486076d3) had VICTORY_AMBIENT_REFLECT=1, and VICTORY_AMBIENT_REFLECT_IN set to the two names in your comment, comma-separated in the same order, according to the settings recorded for the run.

The log has one role=Reflect line:

a stand-in for the indirect light role=Reflect size=[1280, 720] level=0.800000011920929 constant=0.0

The structure builder was off: there are 32 "structure builder, which is off" lines. The stand-in was on: play.ps1 sets VICTORY_AMBIENT=0.8, and the line above shows level 0.8.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:comment:7210094542 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/127#issuecomment-7210094542). Originally posted by [CowboyBingus](https://github.com/CowboyBingus) on 2026-11-27T04:47:17Z. --- @TaynanGT Yes, that exact pair. The #127 run (exe md5 `3fe5c262…`, built from `486076d3`) had `VICTORY_AMBIENT_REFLECT=1`, and `VICTORY_AMBIENT_REFLECT_IN` set to the two names in your comment, comma-separated in the same order, according to the settings recorded for the run. The log has one `role=Reflect` line: ``` a stand-in for the indirect light role=Reflect size=[1280, 720] level=0.800000011920929 constant=0.0 ``` The structure builder was off: there are 32 "structure builder, which is off" lines. The stand-in was on: `play.ps1` sets `VICTORY_AMBIENT=0.8`, and the line above shows level 0.8.
TaynanGT commented 2026-11-27 04:52:12 +00:00 (Migrated from github.com)

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


Thanks for confirming the exact pair, @CowboyBingus. That ties CS_TemporalResolve2_Opaque,CS_TemporalResolve1_Alpha to the 486076d3 RTX 5070 Ti run. The role=Reflect line confirms the 1280×720 target with the ambient stand-in at 0.8 and the builder off.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:comment:7210160399 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/127#issuecomment-7210160399). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T04:52:12Z. --- Thanks for confirming the exact pair, @CowboyBingus. That ties `CS_TemporalResolve2_Opaque,CS_TemporalResolve1_Alpha` to the `486076d3` RTX 5070 Ti run. The `role=Reflect` line confirms the 1280×720 target with the ambient stand-in at 0.8 and the builder off.
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!127
No description provided.