Reuse completed state preludes in an opt-in pool #211

Merged
TaynanGT merged 2 commits from upstream-pr/211 into main 2026-11-27 11:42:51 +00:00
TaynanGT commented 2026-11-27 10:12:08 +00:00 (Migrated from github.com)

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


Use VICTORY_PRELUDE_POOL=1 to reuse the allocator and command list for lazy state preludes. Return each pair after the owning list's previous submissions have finished and its native reset succeeds. Keep a fixed cap of 128 idle pairs so sustained host memory pressure does not force new pairs every batch.

On the RX 6900 XT in #93, the isolated pool got through world load with the same driver, Series S save, relay settings and 720p output. The previous cap of 16 under pressure went from 810 to 5,848 total creations over about one minute after the host-list count settled. The fixed cap of 128 on d2e271d stayed at 155 creations for 67 seconds under persistent host memory pressure. The run ended by hand after about a minute and a half in the world. The gameplay paths differ, so the reported frame rates are observations from each run.

Windows default and diagnostics test suites and Clippy passed. The pool test checks that a pair stays unavailable to another list until the owner returns it. Adapted from kyokyotosh's prelude pool. Refs #93 and #138.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:issue:5524865939 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/211). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T10:12:08Z. --- Use `VICTORY_PRELUDE_POOL=1` to reuse the allocator and command list for lazy state preludes. Return each pair after the owning list's previous submissions have finished and its native reset succeeds. Keep a fixed cap of 128 idle pairs so sustained host memory pressure does not force new pairs every batch. On the RX 6900 XT in #93, the isolated pool got through world load with the same driver, Series S save, relay settings and 720p output. The previous cap of 16 under pressure went from 810 to 5,848 total creations over about one minute after the host-list count settled. The fixed cap of 128 on `d2e271d` stayed at 155 creations for 67 seconds under persistent host memory pressure. The run ended by hand after about a minute and a half in the world. The gameplay paths differ, so the reported frame rates are observations from each run. Windows default and diagnostics test suites and Clippy passed. The pool test checks that a pair stays unavailable to another list until the owner returns it. Adapted from [kyokyotosh's prelude pool](https://github.com/kyokyotosh/VIctory-6700XT/commit/63a773e4420bb7454e10052bd554467e01a07a69). Refs #93 and #138.
chatgpt-codex-connector[bot] commented 2026-11-27 11:43:02 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by chatgpt-codex-connector[bot] on 2026-11-27T11:43:02Z.


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-27T11:43:39.750240Z d2e271d Draft marked ready
🔒 Security Review ✅ Completed 2026-11-27T11:44:57.967974Z d2e271d 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:7217393448 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/211#issuecomment-7217393448). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/apps/chatgpt-codex-connector) on 2026-11-27T11:43:02Z. --- <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"d2e271d612117beebbfb1f5af4478f2f675cecc3","has_any_findings":false,"has_unresolved_findings":false,"status":"completed"},"security_review":{"commit_sha":"d2e271d612117beebbfb1f5af4478f2f675cecc3","has_any_findings":null,"has_unresolved_findings":null,"status":"completed"}} --> <!-- codex-security-review:v1 {"blockingSeverityThreshold":"P0","headSha":"d2e271d612117beebbfb1f5af4478f2f675cecc3","mergeGateEnabled":false,"pullRequestNumber":211,"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-27T11:43:39.750240Z">2026-11-27T11:43:39.750240Z</relative-time> | `d2e271d` | Draft marked ready | | 🔒 **Security Review** | ✅ **Completed** <relative-time datetime="2026-11-27T11:44:57.967974Z">2026-11-27T11:44:57.967974Z</relative-time> | `d2e271d` | 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>
timorjay commented 2026-11-27 12:44:55 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by timorjay on 2026-11-27T12:44:55Z.


I ran the prelude pool off and on in the same Windows Sandbox on a GeForce RTX 5090 D v2 (driver 617.42), Ryzen 7 9800X3D, 32 GB host RAM. Both runs used the same diagnostics binary (a51fb9d plus this PR at d2e271d), same Series S starting save, same shader-cache snapshot, and a fresh host pipeline cache per run. The local settings included VICTORY_RELAY=2, VICTORY_TEXTURE_POOL=0, VICTORY_MAP_THREADS=1 and VICTORY_TEXTURE_STAGE_MS=12. Only VICTORY_PRELUDE_POOL changed between these two launches.

At the last frame report Pool off Pool on
Host command lists created 1,066 1,076
State preludes created 831 186

Both runs got through the office and displayed the city cashier tutorial. On both, holding LT changed the prompt from holding LT to aiming at the cashier. Both subsequently lost the device with 0x887A0020 in relay mode 2. The log showed one submission in flight (25 lists off, 7 on). The two routes spent different amounts of time in the prison. These are endpoint counts, and I would not infer a frame-rate gain from them. Reuse is observable on NVIDIA even though it did not resolve this later failure here.

I repeated the pool-on run with VICTORY_RELAY=0, keeping the other rendering settings, starting save and shader-cache seed the same. This time the player could walk, turn, aim, intimidate the cashier and pick up the cash. The subsequent police and family scenes rendered until the preset 30-minute observation limit. I found no 0x887A0020 in that run. The interactive interval from the first aim input to the cash pickup was 7 min 33 s. The game's 85 frame reports during that interval had a median of 7.4 rendered FPS and a tenth percentile of 6.5. Lighting remained overexposed and faces were missing in close-ups. This is one successful run in mode 0. The captures establish a difference in progression on this machine, but do not identify the underlying driver or runtime fault.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:comment:7218626007 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/211#issuecomment-7218626007). Originally posted by [timorjay](https://github.com/timorjay) on 2026-11-27T12:44:55Z. --- I ran the prelude pool off and on in the same Windows Sandbox on a GeForce RTX 5090 D v2 (driver 617.42), Ryzen 7 9800X3D, 32 GB host RAM. Both runs used the same diagnostics binary (`a51fb9d` plus this PR at `d2e271d`), same Series S starting save, same shader-cache snapshot, and a fresh host pipeline cache per run. The local settings included `VICTORY_RELAY=2`, `VICTORY_TEXTURE_POOL=0`, `VICTORY_MAP_THREADS=1` and `VICTORY_TEXTURE_STAGE_MS=12`. Only `VICTORY_PRELUDE_POOL` changed between these two launches. | At the last frame report | Pool off | Pool on | | --- | ---: | ---: | | Host command lists created | 1,066 | 1,076 | | State preludes created | 831 | 186 | Both runs got through the office and displayed the city cashier tutorial. On both, holding LT changed the prompt from holding LT to aiming at the cashier. Both subsequently lost the device with `0x887A0020` in relay mode 2. The log showed one submission in flight (25 lists off, 7 on). The two routes spent different amounts of time in the prison. These are endpoint counts, and I would not infer a frame-rate gain from them. Reuse is observable on NVIDIA even though it did not resolve this later failure here. I repeated the pool-on run with `VICTORY_RELAY=0`, keeping the other rendering settings, starting save and shader-cache seed the same. This time the player could walk, turn, aim, intimidate the cashier and pick up the cash. The subsequent police and family scenes rendered until the preset 30-minute observation limit. I found no `0x887A0020` in that run. The interactive interval from the first aim input to the cash pickup was 7 min 33 s. The game's 85 frame reports during that interval had a median of 7.4 rendered FPS and a tenth percentile of 6.5. Lighting remained overexposed and faces were missing in close-ups. This is one successful run in mode 0. The captures establish a difference in progression on this machine, but do not identify the underlying driver or runtime fault.
TaynanGT commented 2026-11-27 12:47:24 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-27T12:47:24Z.


@timorjay The 831 to 186 prelude count shows reuse on this NVIDIA setup. Both relay-2 runs still lost the device, while the relay-0 run progressed through the cashier scene. I’ll record the reuse result independently of stability and keep the pool optional while we have one successful relay-0 observation.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:comment:7218675323 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/211#issuecomment-7218675323). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T12:47:24Z. --- @timorjay The 831 to 186 prelude count shows reuse on this NVIDIA setup. Both relay-2 runs still lost the device, while the relay-0 run progressed through the cashier scene. I’ll record the reuse result independently of stability and keep the pool optional while we have one successful relay-0 observation.
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!211
No description provided.