Integrate the pending renderer and compatibility fixes #120

Closed
TaynanGT wants to merge 443 commits from upstream-pr/120 into main
TaynanGT commented 2026-11-27 02:57:56 +00:00 (Migrated from github.com)

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


This batch brings the six pending changes onto the current main revision and preserves their original commits.

  • Combine the opt-in RAM throttle and laptop preset from #96 and #100. The preset's documented switches now have their implementation.
  • Combine the optional texture readback pool from #92 with the device-removal diagnostics from #118.
  • Include the opt-in reflection correction from #99 and the opt-in D3D12 Agility SDK build from #102.

Both local Clippy configurations and the Windows workspace tests passed, including the documented-switch and repository-policy checks. A Windows 10 retest of #84 is still needed.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:issue:5520402098 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/120). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T02:57:56Z. --- This batch brings the six pending changes onto the current main revision and preserves their original commits. - Combine the opt-in RAM throttle and laptop preset from #96 and #100. The preset's documented switches now have their implementation. - Combine the optional texture readback pool from #92 with the device-removal diagnostics from #118. - Include the opt-in reflection correction from #99 and the opt-in D3D12 Agility SDK build from #102. Both local Clippy configurations and the Windows workspace tests passed, including the documented-switch and repository-policy checks. A Windows 10 retest of #84 is still needed.
chatgpt-codex-connector[bot] commented 2026-11-27 02:58:12 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by chatgpt-codex-connector[bot] on 2026-11-27T02:58:12Z.


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-27T03:00:09.868915Z be3fddf PR opened
🔒 Security Review ✅ Completed 2026-11-27T03:01:58.756601Z be3fddf PR opened
ℹ️ 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:7208588305 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/120#issuecomment-7208588305). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/apps/chatgpt-codex-connector) on 2026-11-27T02:58:12Z. --- <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"be3fddf7ff5fb6b24ac20113ae8d94ebaacdeb12","has_any_findings":true,"has_unresolved_findings":true,"status":"completed"},"security_review":{"commit_sha":"be3fddf7ff5fb6b24ac20113ae8d94ebaacdeb12","has_any_findings":null,"has_unresolved_findings":null,"status":"completed"}} --> <!-- codex-security-review:v1 {"blockingSeverityThreshold":"P0","headSha":"be3fddf7ff5fb6b24ac20113ae8d94ebaacdeb12","mergeGateEnabled":false,"pullRequestNumber":120,"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-27T03:00:09.868915Z">2026-11-27T03:00:09.868915Z</relative-time> | `be3fddf` | PR opened | | 🔒 **Security Review** | ✅ **Completed** <relative-time datetime="2026-11-27T03:01:58.756601Z">2026-11-27T03:01:58.756601Z</relative-time> | `be3fddf` | PR opened | <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 02:59:56 +00:00 (Migrated from github.com)

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


I moved this batch back to draft. The head be3fddf7 includes the older fc74f10 change that writes the title’s heartbeat. #96 has since removed that code in d5c5d61. The current #100 still references the removed option, has an unchecked MiB-to-bytes conversion, and needs a low-RAM load retest with the watchdog active. Please leave both out of this batch.

The review also found a remaining issue in #99. The clamp can zero an uncounted indirect dispatch, so the reflection pass needs to check the actual clamped group counts before writing the image. The readback and Agility SDK changes can be evaluated independently on a fresh main.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:comment:7208611649 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/120#issuecomment-7208611649). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T02:59:56Z. --- I moved this batch back to draft. The head `be3fddf7` includes the older `fc74f10` change that writes the title’s heartbeat. #96 has since removed that code in `d5c5d61`. The current #100 still references the removed option, has an unchecked MiB-to-bytes conversion, and needs a low-RAM load retest with the watchdog active. Please leave both out of this batch. The review also found a remaining issue in #99. The clamp can zero an uncounted indirect dispatch, so the reflection pass needs to check the actual clamped group counts before writing the image. The readback and Agility SDK changes can be evaluated independently on a fresh `main`.
chatgpt-codex-connector[bot] commented 2026-11-27 03:00:07 +00:00 (Migrated from github.com)

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

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

@@ -4652,6 +4687,20 @@ impl State {
         // back (`crate::indirect`).
         if kind == DISPATCH {
             DISPATCHED.fetch_add(1, Ordering::Relaxed);
+            // Only the reflections' resolve is followed here; the other
+            // roles keep to direct dispatches, as before. Not after a count
+            // buffer: a count of 0 runs no resolve, and the hold would
+            // rewrite the image's earlier contents.
+            use crate::ambient::{Dispatched, Role, note_reflect};
+            if p.stages.first().and_then(|s| s.shader.ambient) == Some(Role::Reflect) {
+                if counter.is_some() {
+                    if crate::ambient::on() && crate::ambient::holds() {
+                        note_reflect(Dispatched::Counted);
+                    }
+                } else if self.after_dispatch(list, p) == Some(Role::Reflect) {
+                    note_reflect(Dispatched::Indirect);

P2 Badge Skip the reflection hold for empty indirect dispatches

With the reflection correction enabled, an uncounted indirect dispatch can still execute zero groups: its argument dimensions can be zero, and the clamps in indirect.rs and indirect/batch.rs also zero dispatches that exceed their limits or available work budget. This branch nevertheless calls after_dispatch, which launches the hold over the entire reflection image, modifying earlier contents even though the resolve wrote nothing—the same corruption the new direct-dispatch and counted-dispatch guards explicitly avoid. Gate the hold on the effective GPU-side arguments, or skip uncounted indirect resolves when nonempty execution cannot be established.

Useful? React with 👍 / 👎.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:review-comment:4715252546 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/120#discussion_r4715252546). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/apps/chatgpt-codex-connector) on 2026-11-27T03:00:07Z. **Code review location:** `crates/victory-gpu/src/draw.rs`; line 4701 ~~~~diff @@ -4652,6 +4687,20 @@ impl State { // back (`crate::indirect`). if kind == DISPATCH { DISPATCHED.fetch_add(1, Ordering::Relaxed); + // Only the reflections' resolve is followed here; the other + // roles keep to direct dispatches, as before. Not after a count + // buffer: a count of 0 runs no resolve, and the hold would + // rewrite the image's earlier contents. + use crate::ambient::{Dispatched, Role, note_reflect}; + if p.stages.first().and_then(|s| s.shader.ambient) == Some(Role::Reflect) { + if counter.is_some() { + if crate::ambient::on() && crate::ambient::holds() { + note_reflect(Dispatched::Counted); + } + } else if self.after_dispatch(list, p) == Some(Role::Reflect) { + note_reflect(Dispatched::Indirect); ~~~~ --- **<sub><sub>![P2 Badge](https://img.shields.io/badge/P2-yellow?style=flat)</sub></sub> Skip the reflection hold for empty indirect dispatches** With the reflection correction enabled, an uncounted indirect dispatch can still execute zero groups: its argument dimensions can be zero, and the clamps in `indirect.rs` and `indirect/batch.rs` also zero dispatches that exceed their limits or available work budget. This branch nevertheless calls `after_dispatch`, which launches the hold over the entire reflection image, modifying earlier contents even though the resolve wrote nothing—the same corruption the new direct-dispatch and counted-dispatch guards explicitly avoid. Gate the hold on the effective GPU-side arguments, or skip uncounted indirect resolves when nonempty execution cannot be established. Useful? React with 👍 / 👎. <!-- codex-code-review-finding:v1 -->
chatgpt-codex-connector[bot] commented 2026-11-27 03:00:07 +00:00 (Migrated from github.com)

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

Review: COMMENTED


💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: be3fddf7ff

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

<!-- greyfinch-sync:TaynanGT/Vice-Tay:review:6082904327 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/120#pullrequestreview-6082904327). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/apps/chatgpt-codex-connector) on 2026-11-27T03:00:07Z. **Review:** COMMENTED --- <!-- codex-review-receipt:v1 --> ### 💡 Codex Review Here are some automated review suggestions for this pull request. **Reviewed commit:** `be3fddf7ff` <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". If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". </details>
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.


The empty indirect-dispatch fix is now in draft #127. The WARP test exercises the actual GPU clamp and confirms that the reflection texture stays unchanged when a dispatch has zero groups. The draft still needs a matched gameplay and timing run on the RTX 5070 Ti.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:comment:7208818588 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/120#issuecomment-7208818588). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T03:14:12Z. --- The empty indirect-dispatch fix is now in draft #127. The WARP test exercises the actual GPU clamp and confirms that the reflection texture stays unchanged when a dispatch has zero groups. The draft still needs a matched gameplay and timing run on the RTX 5070 Ti.
nidscode commented 2026-11-27 03:41:53 +00:00 (Migrated from github.com)

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


Updates for the two held from this batch:

  • #96 is at d5c5d61: the throttle and the race fix only, without the heartbeat code.
  • #100 is at 4c9a0a8: independent of #96 (no throttle settings in the preset, no throttle or keep-alive switches in its doc), with the checked MiB conversion. With the watchdog active, 2 of 2 low-RAM loads passed on main + #100 alone (details in #100).
  • The heartbeat is now its own PR, #126, stacked on #96, with the range, lifetime and concurrency checks. One caveat for #96: with the watchdog on, its throttle ended all 6 loads I tried on this title without #126.
<!-- greyfinch-sync:TaynanGT/Vice-Tay:comment:7209199057 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/120#issuecomment-7209199057). Originally posted by [nidscode](https://github.com/nidscode) on 2026-11-27T03:41:53Z. --- Updates for the two held from this batch: - **#96** is at `d5c5d61`: the throttle and the race fix only, without the heartbeat code. - **#100** is at `4c9a0a8`: independent of #96 (no throttle settings in the preset, no throttle or keep-alive switches in its doc), with the checked MiB conversion. With the watchdog active, 2 of 2 low-RAM loads passed on `main` + #100 alone (details in #100). - **The heartbeat** is now its own PR, **#126**, stacked on #96, with the range, lifetime and concurrency checks. One caveat for #96: with the watchdog on, its throttle ended all 6 loads I tried on this title without #126.
TaynanGT commented 2026-11-27 04:07:50 +00:00 (Migrated from github.com)

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


Thanks for separating the measurements, @nidscode. The two successful guarded loads on #100 are now evidence for the standalone laptop preset, and its Windows CI passed. Your 0-of-6 result for the throttle alone gives us a separate case for #96 and #126. This is easier to follow in the focused PRs, alongside the reflection work in #127 and the readback and Agility changes already in #130.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:comment:7209543901 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/120#issuecomment-7209543901). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T04:07:50Z. --- Thanks for separating the measurements, @nidscode. The two successful guarded loads on #100 are now evidence for the standalone laptop preset, and its Windows CI passed. Your 0-of-6 result for the throttle alone gives us a separate case for #96 and #126. This is easier to follow in the focused PRs, alongside the reflection work in #127 and the readback and Agility changes already in #130.
TaynanGT commented 2026-11-29 19:06:47 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-29T19:06:47Z.

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

@@ -4652,6 +4687,20 @@ impl State {
         // back (`crate::indirect`).
         if kind == DISPATCH {
             DISPATCHED.fetch_add(1, Ordering::Relaxed);
+            // Only the reflections' resolve is followed here; the other
+            // roles keep to direct dispatches, as before. Not after a count
+            // buffer: a count of 0 runs no resolve, and the hold would
+            // rewrite the image's earlier contents.
+            use crate::ambient::{Dispatched, Role, note_reflect};
+            if p.stages.first().and_then(|s| s.shader.ambient) == Some(Role::Reflect) {
+                if counter.is_some() {
+                    if crate::ambient::on() && crate::ambient::holds() {
+                        note_reflect(Dispatched::Counted);
+                    }
+                } else if self.after_dispatch(list, p) == Some(Role::Reflect) {
+                    note_reflect(Dispatched::Indirect);

The current local integration now passes the bounded indirect argument buffer to IndirectHold for a single uncounted record; counted and multiple records are handled separately. I want the zero-dimension and clamp-to-zero cases verified on the GPU before considering the reflection correction validated.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:review-comment:4732744435 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/120#discussion_r4732744435). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-29T19:06:47Z. **Code review location:** `crates/victory-gpu/src/draw.rs`; line 4701 ~~~~diff @@ -4652,6 +4687,20 @@ impl State { // back (`crate::indirect`). if kind == DISPATCH { DISPATCHED.fetch_add(1, Ordering::Relaxed); + // Only the reflections' resolve is followed here; the other + // roles keep to direct dispatches, as before. Not after a count + // buffer: a count of 0 runs no resolve, and the hold would + // rewrite the image's earlier contents. + use crate::ambient::{Dispatched, Role, note_reflect}; + if p.stages.first().and_then(|s| s.shader.ambient) == Some(Role::Reflect) { + if counter.is_some() { + if crate::ambient::on() && crate::ambient::holds() { + note_reflect(Dispatched::Counted); + } + } else if self.after_dispatch(list, p) == Some(Role::Reflect) { + note_reflect(Dispatched::Indirect); ~~~~ --- The current local integration now passes the bounded indirect argument buffer to IndirectHold for a single uncounted record; counted and multiple records are handled separately. I want the zero-dimension and clamp-to-zero cases verified on the GPU before considering the reflection correction validated.
TaynanGT commented 2026-11-30 17:17:00 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-30T17:17:00Z.


Superseded: main has moved to a new line of the code (see #468). Whatever is still worth having from this will come back as a new PR on the current main.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:comment:7286017861 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/120#issuecomment-7286017861). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-30T17:17:00Z. --- Superseded: `main` has moved to a new line of the code (see #468). Whatever is still worth having from this will come back as a new PR on the current `main`.

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!120
No description provided.