startup: read translated compute inputs that live only in title memory from a snapshot #2854

Merged
tedin7 merged 7 commits from upstream-pr/2862 into main 2026-11-28 03:31:38 +00:00
tedin7 commented 2026-11-26 14:41:30 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T14:41:30Z.


Part of #870
Fixes #2860

What this unblocks: translated compute dispatches whose input buffers were written by the title (placed buffers that do not alias title memory) and dispatches with an unbound input run instead of being refused, also in a long run.

Change

Runtime only (d3d12_draw.inl, d3d12_xs_device.cpp, upload_reservation.h), plus a docs paragraph and test modes:

  • X2W_TRANSLATED_TITLE_INPUT_SNAPSHOT=1 (opt-in): an input in a placed buffer that does not alias title memory is read from a GPU copy this list made, else from a snapshot of at most 16 MiB copied from title memory at the dispatch.
  • Snapshots have a pool of their own, built like the shared upload ring of #2849: 128 MiB in chunks of 16 MiB, a chunk is reused once no recording can submit its bytes and every queue that used it has finished, and a recording holds the chunks it used. Its chunks are numbered after the ring's in the same recording mask and per-queue table, so the two pools cannot collide. Draw and texture uploads cannot use up the snapshots' pool, and a long run is not stopped by it filling up: with snapshots in the shared ring, a long run reported on this PR hit snapshot ring reservation refused: no unused capacity (report), and a pool that is never reused fills up over time. A reservation the pool cannot serve logs x2w-draw snapshot pool reservation refused: no unused capacity.
  • An all-zero compute input descriptor is an unbound buffer and binds 16 zero bytes (taken from the snapshot pool). An empty range with any non-zero word stays refused.
  • The log names the source of each key's first input; the render totals count GPU copies and snapshots.

Verification

Linux (executed locally):

  • git diff --check origin/main...HEAD: clean
  • cmake -S . -B <dir> -DDXC_EXECUTABLE=/bin/true: configure rc 0
  • tests/upload_reservation_check.cpp (new check_snapshot_pool: pool numbering, holds and discard in both pools, per-queue completion of a snapshot chunk, reuse of a finished unheld chunk) built with g++ and run: passes
  • x86_64-w64-mingw32-g++ -fsyntax-only -std=c++20 on d3d12_xs_device.cpp: no error in the changed code (the MinGW headers stop on MSVC-only constructs that origin/main has too)

Win2025 (Windows Server 2025, Build 26100, MSVC 14.44.35207, D3D12 WARP) at 73b2d0ff73921cce81188d3e11cda6064ac3de87:

  • ctest --preset dev -R '^(startup_compute_dispatch_input_|upload_reservation$)' --no-tests=error --output-on-failure: 3/3 passed (startup_compute_dispatch_input_warp, startup_compute_dispatch_input_hardware, upload_reservation)
  • ctest --preset release -R '^(startup_compute_dispatch_input_|upload_reservation$)' --no-tests=error --output-on-failure: 3/3 passed
  • Mutant (snapshot pool never recycled), dev: startup_compute_dispatch_input_warp and _hardware fail with AssertionError: dispatch-input-snapshot-long: consumer exit 85 after x2w-draw snapshot pool reservation refused: no unused capacity; upload_reservation passes.

Tests: startup_compute_dispatch_input keeps dispatch-input-snapshot (off: refused; on: all 320 words match; zero title memory runs on zeros) and dispatch-input-null, and adds dispatch-input-snapshot-long: 48 frames of dispatches whose 8 MiB title-memory input is snapshotted each frame with the queue completed between frames (384 MiB in all, three times the pool). Every frame must translate and give the first frame's words, the last frame must match the CPU reference on the D3D12 adapter, and no reservation may be refused.

Real-hardware testing: @Makto94 - thanks for the help.

Source: Microsoft D3D12 documentation (placed resources, upload heaps, raw buffer SRVs).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:5512043220 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2862). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-26T14:41:30Z. --- Part of #870 Fixes #2860 What this unblocks: translated compute dispatches whose input buffers were written by the title (placed buffers that do not alias title memory) and dispatches with an unbound input run instead of being refused, also in a long run. ## Change Runtime only (`d3d12_draw.inl`, `d3d12_xs_device.cpp`, `upload_reservation.h`), plus a docs paragraph and test modes: - `X2W_TRANSLATED_TITLE_INPUT_SNAPSHOT=1` (opt-in): an input in a placed buffer that does not alias title memory is read from a GPU copy this list made, else from a snapshot of at most 16 MiB copied from title memory at the dispatch. - Snapshots have a pool of their own, built like the shared upload ring of #2849: 128 MiB in chunks of 16 MiB, a chunk is reused once no recording can submit its bytes and every queue that used it has finished, and a recording holds the chunks it used. Its chunks are numbered after the ring's in the same recording mask and per-queue table, so the two pools cannot collide. Draw and texture uploads cannot use up the snapshots' pool, and a long run is not stopped by it filling up: with snapshots in the shared ring, a long run reported on this PR hit `snapshot ring reservation refused: no unused capacity` ([report](https://github.com/R0Y00/Xbox2Windows/pull/2862#issuecomment-7201896190)), and a pool that is never reused fills up over time. A reservation the pool cannot serve logs `x2w-draw snapshot pool reservation refused: no unused capacity`. - An all-zero compute input descriptor is an unbound buffer and binds 16 zero bytes (taken from the snapshot pool). An empty range with any non-zero word stays refused. - The log names the source of each key's first input; the render totals count GPU copies and snapshots. ## Verification Linux (executed locally): - `git diff --check origin/main...HEAD`: clean - `cmake -S . -B <dir> -DDXC_EXECUTABLE=/bin/true`: configure rc 0 - `tests/upload_reservation_check.cpp` (new `check_snapshot_pool`: pool numbering, holds and discard in both pools, per-queue completion of a snapshot chunk, reuse of a finished unheld chunk) built with g++ and run: passes - `x86_64-w64-mingw32-g++ -fsyntax-only -std=c++20` on `d3d12_xs_device.cpp`: no error in the changed code (the MinGW headers stop on MSVC-only constructs that `origin/main` has too) Win2025 (Windows Server 2025, Build 26100, MSVC 14.44.35207, D3D12 WARP) at `73b2d0ff73921cce81188d3e11cda6064ac3de87`: - `ctest --preset dev -R '^(startup_compute_dispatch_input_|upload_reservation$)' --no-tests=error --output-on-failure`: **3/3 passed** (`startup_compute_dispatch_input_warp`, `startup_compute_dispatch_input_hardware`, `upload_reservation`) - `ctest --preset release -R '^(startup_compute_dispatch_input_|upload_reservation$)' --no-tests=error --output-on-failure`: **3/3 passed** - Mutant (snapshot pool never recycled), `dev`: `startup_compute_dispatch_input_warp` and `_hardware` fail with `AssertionError: dispatch-input-snapshot-long: consumer exit 85` after `x2w-draw snapshot pool reservation refused: no unused capacity`; `upload_reservation` passes. Tests: `startup_compute_dispatch_input` keeps `dispatch-input-snapshot` (off: refused; on: all 320 words match; zero title memory runs on zeros) and `dispatch-input-null`, and adds `dispatch-input-snapshot-long`: 48 frames of dispatches whose 8 MiB title-memory input is snapshotted each frame with the queue completed between frames (384 MiB in all, three times the pool). Every frame must translate and give the first frame's words, the last frame must match the CPU reference on the D3D12 adapter, and no reservation may be refused. Real-hardware testing: @Makto94 - thanks for the help. Source: Microsoft D3D12 documentation (placed resources, upload heaps, raw buffer SRVs).
chatgpt-codex-connector[bot] commented 2026-11-26 14:52:20 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-26T14:52:20Z.


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-26T20:46:31.917087Z 73b2d0f 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:R0Y00/Xbox2Windows:comment:7195455936 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2862#issuecomment-7195455936). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/apps/chatgpt-codex-connector) on 2026-11-26T14:52:20Z. --- <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"73b2d0ff73921cce81188d3e11cda6064ac3de87","has_any_findings":false,"has_unresolved_findings":false,"status":"completed"},"security_review":{"commit_sha":null,"has_any_findings":null,"has_unresolved_findings":null,"status":null}} --> <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-26T20:46:31.917087Z">2026-11-26T20:46:31.917087Z</relative-time> | `73b2d0f` | 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>
chatgpt-codex-connector[bot] commented 2026-11-26 14:58:38 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-26T14:58:38Z.

Review: COMMENTED


💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d9fbfc86a3

ℹ️ 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:R0Y00/Xbox2Windows:review:6076313986 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2862#pullrequestreview-6076313986). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/apps/chatgpt-codex-connector) on 2026-11-26T14:58:38Z. **Review:** COMMENTED --- <!-- codex-review-receipt:v1 --> ### 💡 Codex Review Here are some automated review suggestions for this pull request. **Reviewed commit:** `d9fbfc86a3` <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>
chatgpt-codex-connector[bot commented 2026-11-26 15:01:01 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-26T14:58:38Z.

Code review location: tests/startup_compute_dispatch_input_check.py; line 94

@@ -85,6 +85,28 @@ def main(consumer, dxc, adapter):
         assert got == expected and len(lines(result, 'Dispatch(3, 2, 2) translated')) == 1 and             not lines(result, 'refused: '), result.stderr[-3000:]
         errors = [line for line in lines(result, 'x2w-d3d12-debug ') if ' sev=0 ' in line or ' sev=1 ' in line]
         assert not errors, errors[0]
+        # Opt-in X2W_TRANSLATED_TITLE_INPUT_SNAPSHOT: an input in a placed buffer that does not alias title memory holds
+        # its bytes only in title memory (the desktop copy is zeros). Off, it is refused; on, the bytes are snapshotted
+        # into the upload ring and all 320 words match; with title memory zero (dispatch-input-copied) the dispatch runs
+        # on zeros: not refused, not the expected words, not untouched.
+        snapshot_env = dict(env, X2W_TRANSLATED_TITLE_INPUT_SNAPSHOT='1')
+        got, result = dispatch(directory, consumer, env, 'dispatch-input-snapshot')
+        assert got == untouched and lines(result, 'refused: ')[0].endswith(CONTROLS[3][1]), result.stderr[-3000:]

P2 Badge Force the snapshot flag off for the baseline runs

When X2W_TRANSLATED_TITLE_INPUT_SNAPSHOT=1 is already exported, prepare() inherits it through os.environ, making env and snapshot_env identical. The supposedly disabled run therefore takes the snapshot path and cannot satisfy its refusal assertion; the earlier dispatch-input-copied control also fails before reaching these checks. Explicitly disable the flag in the baseline environment before running the controls, then enable it only in snapshot_env, so the test works from a session configured to use this feature.

Useful? React with 👍 / 👎.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review-comment:4710098510 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2862#discussion_r4710098510). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-26T14:58:38Z. **Code review location:** `tests/startup_compute_dispatch_input_check.py`; line 94 ~~~~diff @@ -85,6 +85,28 @@ def main(consumer, dxc, adapter): assert got == expected and len(lines(result, 'Dispatch(3, 2, 2) translated')) == 1 and not lines(result, 'refused: '), result.stderr[-3000:] errors = [line for line in lines(result, 'x2w-d3d12-debug ') if ' sev=0 ' in line or ' sev=1 ' in line] assert not errors, errors[0] + # Opt-in X2W_TRANSLATED_TITLE_INPUT_SNAPSHOT: an input in a placed buffer that does not alias title memory holds + # its bytes only in title memory (the desktop copy is zeros). Off, it is refused; on, the bytes are snapshotted + # into the upload ring and all 320 words match; with title memory zero (dispatch-input-copied) the dispatch runs + # on zeros: not refused, not the expected words, not untouched. + snapshot_env = dict(env, X2W_TRANSLATED_TITLE_INPUT_SNAPSHOT='1') + got, result = dispatch(directory, consumer, env, 'dispatch-input-snapshot') + assert got == untouched and lines(result, 'refused: ')[0].endswith(CONTROLS[3][1]), result.stderr[-3000:] ~~~~ --- **<sub><sub>![P2 Badge](https://img.shields.io/badge/P2-yellow?style=flat)</sub></sub> Force the snapshot flag off for the baseline runs** When `X2W_TRANSLATED_TITLE_INPUT_SNAPSHOT=1` is already exported, `prepare()` inherits it through `os.environ`, making `env` and `snapshot_env` identical. The supposedly disabled run therefore takes the snapshot path and cannot satisfy its refusal assertion; the earlier `dispatch-input-copied` control also fails before reaching these checks. Explicitly disable the flag in the baseline environment before running the controls, then enable it only in `snapshot_env`, so the test works from a session configured to use this feature. Useful? React with 👍 / 👎. <!-- codex-code-review-finding:v1 -->
chatgpt-codex-connector[bot commented 2026-11-26 15:01:01 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-26T14:58:38Z.

Code review location: docs/experiments.md; line 203

@@ -192,6 +192,16 @@ The source is a same-device desktop resource with no title shadow, a unique alia
 or an already covered range. Later overlapping copies invalidate earlier coverage.
 The recording discards this proof at Close, so another recording needs its own writer.
 
+`X2W_TRANSLATED_TITLE_INPUT_SNAPSHOT=1` lets a translated compute Dispatch read an input that lies in a placed buffer which does
+not alias title memory. That buffer's desktop copy is a committed default buffer that holds zeros, so the bytes the title wrote
+exist only in title memory. The input resolves in this order: a validated GPU copy of the current recording (the proof above,
+which needs `X2W_TRANSLATED_INDIRECT_COPY_RANGES=1`), else a snapshot of the range (at most 16 MiB) taken from title memory
+into the upload ring when the Dispatch is recorded, else the refusal `an input is in a placed buffer that does not alias title
+memory`. A guest write after the recording is not seen, and data a GPU pass wrote into such a buffer is not either. The first
+use per pipeline key logs `x2w-draw compute <key> input <n> (...) comes from a GPU copy this list made|a snapshot of title
+memory`, and the render totals line counts both paths. Off by default; `tools/startup/tester_run.ps1` turns it on
+(`-NoTitleInputSnapshot` turns it off). `startup_compute_dispatch_input` covers it with the `dispatch-input-snapshot` case.

P2 Badge Document an available launcher for enabling snapshots

On a clean checkout, the documented launcher behavior cannot be reproduced: a repository-wide filename and symbol search, including ignored/generated files, finds no tools/startup/tester_run.ps1 or implementation of -NoTitleInputSnapshot. The existing launcher, tools/startup/run.ps1, neither declares that switch nor enables the snapshot environment variable. Document an explicit environment setting with the available launcher, or include the promised launcher and switch before advertising them.

Useful? React with 👍 / 👎.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review-comment:4710098526 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2862#discussion_r4710098526). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-26T14:58:38Z. **Code review location:** `docs/experiments.md`; line 203 ~~~~diff @@ -192,6 +192,16 @@ The source is a same-device desktop resource with no title shadow, a unique alia or an already covered range. Later overlapping copies invalidate earlier coverage. The recording discards this proof at Close, so another recording needs its own writer. +`X2W_TRANSLATED_TITLE_INPUT_SNAPSHOT=1` lets a translated compute Dispatch read an input that lies in a placed buffer which does +not alias title memory. That buffer's desktop copy is a committed default buffer that holds zeros, so the bytes the title wrote +exist only in title memory. The input resolves in this order: a validated GPU copy of the current recording (the proof above, +which needs `X2W_TRANSLATED_INDIRECT_COPY_RANGES=1`), else a snapshot of the range (at most 16 MiB) taken from title memory +into the upload ring when the Dispatch is recorded, else the refusal `an input is in a placed buffer that does not alias title +memory`. A guest write after the recording is not seen, and data a GPU pass wrote into such a buffer is not either. The first +use per pipeline key logs `x2w-draw compute <key> input <n> (...) comes from a GPU copy this list made|a snapshot of title +memory`, and the render totals line counts both paths. Off by default; `tools/startup/tester_run.ps1` turns it on +(`-NoTitleInputSnapshot` turns it off). `startup_compute_dispatch_input` covers it with the `dispatch-input-snapshot` case. ~~~~ --- **<sub><sub>![P2 Badge](https://img.shields.io/badge/P2-yellow?style=flat)</sub></sub> Document an available launcher for enabling snapshots** On a clean checkout, the documented launcher behavior cannot be reproduced: a repository-wide filename and symbol search, including ignored/generated files, finds no `tools/startup/tester_run.ps1` or implementation of `-NoTitleInputSnapshot`. The existing launcher, `tools/startup/run.ps1`, neither declares that switch nor enables the snapshot environment variable. Document an explicit environment setting with the available launcher, or include the promised launcher and switch before advertising them. Useful? React with 👍 / 👎. <!-- codex-code-review-finding:v1 -->
KelboLive commented 2026-11-26 15:40:52 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by KelboLive on 2026-11-26T15:40:52Z.

Review: APPROVED


Good work on this. The approach is sound:

  1. Dual upload pools (snapshot 128 MiB vs draw/texture 256 MiB) correctly prevents snapshots from starving draw uploads

  2. Resolution order is correct: GPU copy (from X2W_TRANSLATED_INDIRECT_COPY_RANGES) -> snapshot -> refusal. The fallback chain is safe and the 16 MiB cap on snapshots is reasonable

  3. Null descriptor handling: correctly produces 16 bytes of zeros for all-zero descriptor words, matching hardware behavior. The readable_window check before ring_copy is the right guard

  4. indirect_table_buffer API expansion: added allow_title_snapshot parameter cleanly propagated from record_translated_dispatch

  5. Tracking counters: atomic counters with snapshot KiB tracking gives good observability

Minor notes:

  • The InputSource source field in IndirectBufferView is a clear 4-value enum. When this stabilizes consider a typed enum (similar to NullCause) rather than int, but not urgent
  • The 128 MiB / 256 MiB split is hardcoded. If title pressure shows the pool balance needs tuning, make the split configurable. Not needed today

Looks good to merge. This unblocks #2860 and forms a solid foundation for the upload ring reuse work in #2847.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6076924380 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2862#pullrequestreview-6076924380). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-11-26T15:40:52Z. **Review:** APPROVED --- Good work on this. The approach is sound: 1. Dual upload pools (snapshot 128 MiB vs draw/texture 256 MiB) correctly prevents snapshots from starving draw uploads 2. Resolution order is correct: GPU copy (from X2W_TRANSLATED_INDIRECT_COPY_RANGES) -> snapshot -> refusal. The fallback chain is safe and the 16 MiB cap on snapshots is reasonable 3. Null descriptor handling: correctly produces 16 bytes of zeros for all-zero descriptor words, matching hardware behavior. The readable_window check before ring_copy is the right guard 4. indirect_table_buffer API expansion: added allow_title_snapshot parameter cleanly propagated from record_translated_dispatch 5. Tracking counters: atomic counters with snapshot KiB tracking gives good observability Minor notes: - The InputSource source field in IndirectBufferView is a clear 4-value enum. When this stabilizes consider a typed enum (similar to NullCause) rather than int, but not urgent - The 128 MiB / 256 MiB split is hardcoded. If title pressure shows the pool balance needs tuning, make the split configurable. Not needed today Looks good to merge. This unblocks #2860 and forms a solid foundation for the upload ring reuse work in #2847.
tedin7 commented 2026-11-26 16:03:56 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T15:13:05Z.

Review: COMMENTED


No description provided.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6076549813 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2862#pullrequestreview-6076549813). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-26T15:13:05Z. **Review:** COMMENTED --- _No description provided._
tedin7 commented 2026-11-26 16:03:56 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T15:13:08Z.

Review: COMMENTED


No description provided.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6076550409 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2862#pullrequestreview-6076550409). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-26T15:13:08Z. **Review:** COMMENTED --- _No description provided._
tedin7 commented 2026-11-26 16:04:01 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T15:13:04Z.


Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit 4322d76f155c1878da11b3b3e2dee195b1886bfe:

  • Debug (ctest --preset dev -R 'startup_compute_dispatch_input' --parallel 2 --no-tests=error --output-on-failure): 2/2 passed (startup_compute_dispatch_input_warp, startup_compute_dispatch_input_hardware)
  • Release (ctest --preset release -R 'startup_compute_dispatch_input' --parallel 2 --no-tests=error --output-on-failure): 2/2 passed (same two tests)

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7195951725 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2862#issuecomment-7195951725). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-26T15:13:04Z. --- Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit `4322d76f155c1878da11b3b3e2dee195b1886bfe`: - Debug (`ctest --preset dev -R 'startup_compute_dispatch_input' --parallel 2 --no-tests=error --output-on-failure`): 2/2 passed (`startup_compute_dispatch_input_warp`, `startup_compute_dispatch_input_hardware`) - Release (`ctest --preset release -R 'startup_compute_dispatch_input' --parallel 2 --no-tests=error --output-on-failure`): 2/2 passed (same two tests) AI-assisted; commands listed were executed locally.
tedin7 commented 2026-11-26 16:04:03 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T15:13:05Z.

Code review location: tests/startup_compute_dispatch_input_check.py; line 94

@@ -85,6 +85,28 @@ def main(consumer, dxc, adapter):
         assert got == expected and len(lines(result, 'Dispatch(3, 2, 2) translated')) == 1 and             not lines(result, 'refused: '), result.stderr[-3000:]
         errors = [line for line in lines(result, 'x2w-d3d12-debug ') if ' sev=0 ' in line or ' sev=1 ' in line]
         assert not errors, errors[0]
+        # Opt-in X2W_TRANSLATED_TITLE_INPUT_SNAPSHOT: an input in a placed buffer that does not alias title memory holds
+        # its bytes only in title memory (the desktop copy is zeros). Off, it is refused; on, the bytes are snapshotted
+        # into the upload ring and all 320 words match; with title memory zero (dispatch-input-copied) the dispatch runs
+        # on zeros: not refused, not the expected words, not untouched.
+        snapshot_env = dict(env, X2W_TRANSLATED_TITLE_INPUT_SNAPSHOT='1')
+        got, result = dispatch(directory, consumer, env, 'dispatch-input-snapshot')
+        assert got == untouched and lines(result, 'refused: ')[0].endswith(CONTROLS[3][1]), result.stderr[-3000:]

Fixed in 4322d76f1: prepare() copies os.environ, so the baseline env now drops X2W_TRANSLATED_TITLE_INPUT_SNAPSHOT and only snapshot_env sets it to 1. With the variable exported, prepare() returned env with 1 before the pop and none after. Win2025 dev+release ctest -R startup_compute_dispatch_input: 2/2 passed on 4322d76f1. Also ran git diff --check.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review-comment:4710269688 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2862#discussion_r4710269688). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-26T15:13:05Z. **Code review location:** `tests/startup_compute_dispatch_input_check.py`; line 94 ~~~~diff @@ -85,6 +85,28 @@ def main(consumer, dxc, adapter): assert got == expected and len(lines(result, 'Dispatch(3, 2, 2) translated')) == 1 and not lines(result, 'refused: '), result.stderr[-3000:] errors = [line for line in lines(result, 'x2w-d3d12-debug ') if ' sev=0 ' in line or ' sev=1 ' in line] assert not errors, errors[0] + # Opt-in X2W_TRANSLATED_TITLE_INPUT_SNAPSHOT: an input in a placed buffer that does not alias title memory holds + # its bytes only in title memory (the desktop copy is zeros). Off, it is refused; on, the bytes are snapshotted + # into the upload ring and all 320 words match; with title memory zero (dispatch-input-copied) the dispatch runs + # on zeros: not refused, not the expected words, not untouched. + snapshot_env = dict(env, X2W_TRANSLATED_TITLE_INPUT_SNAPSHOT='1') + got, result = dispatch(directory, consumer, env, 'dispatch-input-snapshot') + assert got == untouched and lines(result, 'refused: ')[0].endswith(CONTROLS[3][1]), result.stderr[-3000:] ~~~~ --- Fixed in 4322d76f1: prepare() copies os.environ, so the baseline env now drops X2W_TRANSLATED_TITLE_INPUT_SNAPSHOT and only snapshot_env sets it to 1. With the variable exported, prepare() returned env with 1 before the pop and none after. Win2025 dev+release `ctest -R startup_compute_dispatch_input`: 2/2 passed on 4322d76f1. Also ran `git diff --check`. AI-assisted; commands listed were executed locally.
tedin7 commented 2026-11-26 16:04:03 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T15:13:08Z.

Code review location: docs/experiments.md; line 203

@@ -192,6 +192,16 @@ The source is a same-device desktop resource with no title shadow, a unique alia
 or an already covered range. Later overlapping copies invalidate earlier coverage.
 The recording discards this proof at Close, so another recording needs its own writer.
 
+`X2W_TRANSLATED_TITLE_INPUT_SNAPSHOT=1` lets a translated compute Dispatch read an input that lies in a placed buffer which does
+not alias title memory. That buffer's desktop copy is a committed default buffer that holds zeros, so the bytes the title wrote
+exist only in title memory. The input resolves in this order: a validated GPU copy of the current recording (the proof above,
+which needs `X2W_TRANSLATED_INDIRECT_COPY_RANGES=1`), else a snapshot of the range (at most 16 MiB) taken from title memory
+into the upload ring when the Dispatch is recorded, else the refusal `an input is in a placed buffer that does not alias title
+memory`. A guest write after the recording is not seen, and data a GPU pass wrote into such a buffer is not either. The first
+use per pipeline key logs `x2w-draw compute <key> input <n> (...) comes from a GPU copy this list made|a snapshot of title
+memory`, and the render totals line counts both paths. Off by default; `tools/startup/tester_run.ps1` turns it on
+(`-NoTitleInputSnapshot` turns it off). `startup_compute_dispatch_input` covers it with the `dispatch-input-snapshot` case.

Fixed in 4322d76f1: the tester_run.ps1 and -NoTitleInputSnapshot references are gone. The doc now says to set $env:X2W_TRANSLATED_TITLE_INPUT_SNAPSHOT = "1" in the PowerShell session before starting tools/startup/run.ps1, which inherits the session environment. Docs-only change; git diff --check clean.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review-comment:4710270167 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2862#discussion_r4710270167). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-26T15:13:08Z. **Code review location:** `docs/experiments.md`; line 203 ~~~~diff @@ -192,6 +192,16 @@ The source is a same-device desktop resource with no title shadow, a unique alia or an already covered range. Later overlapping copies invalidate earlier coverage. The recording discards this proof at Close, so another recording needs its own writer. +`X2W_TRANSLATED_TITLE_INPUT_SNAPSHOT=1` lets a translated compute Dispatch read an input that lies in a placed buffer which does +not alias title memory. That buffer's desktop copy is a committed default buffer that holds zeros, so the bytes the title wrote +exist only in title memory. The input resolves in this order: a validated GPU copy of the current recording (the proof above, +which needs `X2W_TRANSLATED_INDIRECT_COPY_RANGES=1`), else a snapshot of the range (at most 16 MiB) taken from title memory +into the upload ring when the Dispatch is recorded, else the refusal `an input is in a placed buffer that does not alias title +memory`. A guest write after the recording is not seen, and data a GPU pass wrote into such a buffer is not either. The first +use per pipeline key logs `x2w-draw compute <key> input <n> (...) comes from a GPU copy this list made|a snapshot of title +memory`, and the render totals line counts both paths. Off by default; `tools/startup/tester_run.ps1` turns it on +(`-NoTitleInputSnapshot` turns it off). `startup_compute_dispatch_input` covers it with the `dispatch-input-snapshot` case. ~~~~ --- Fixed in 4322d76f1: the tester_run.ps1 and -NoTitleInputSnapshot references are gone. The doc now says to set `$env:X2W_TRANSLATED_TITLE_INPUT_SNAPSHOT = "1"` in the PowerShell session before starting tools/startup/run.ps1, which inherits the session environment. Docs-only change; `git diff --check` clean. AI-assisted; commands listed were executed locally.
Leyukaka commented 2026-11-26 19:43:34 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-26T19:43:34Z.


A run report for this PR, combined with #2902, on a local capture (counts only). The build and the run were done in an offline Windows Sandbox:

  • main 6ee878d8, merged with this head 4322d76f and with #2902 at da8c2d25;
  • X2W_TRANSLATED_TITLE_INPUT_SNAPSHOT=1, no inputs, 600 s.

Without this PR (#2902 alone), the three compute pipelines that #2902 translates are all refused at Dispatch with an input is in a placed buffer that does not alias title memory. One is dispatched about once per presented frame, 17,378 refusals in that run; the other two are dispatched once each.

With this PR:

  • The log shows compute dispatches: translated 17407, refused 0, no translation 0.
  • In this run only the per-frame pipeline was dispatched, and its named input is a 2,704-byte snapshot.
  • The two other pipelines were dispatched once each in the earlier run described below, each with a 16-byte snapshot, and were translated.
  • Over the run, 34,814 inputs came from snapshots, 69,628 KiB in total.
  • The run kept 29.9 fps over 17,810 presented frames.

One difference from this PR as written: the merge with #2849 conflicted in reserve_upload_ring. I resolved it locally by keeping #2849's recycled upload ring and passing the snapshot flag through to it. Snapshots therefore shared that ring instead of the separate 128 MiB pool here.

In an earlier run of the same merge, the title went past its first screen:

  • Cumulative snapshots reached about 1.6 GiB after about 5.5 minutes.
  • Command-list recording dominated the frame time.
  • The shared ring also ran out (snapshot ring reservation refused: no unused capacity), which is what the separate pool is meant to avoid.

That run used the shared ring above, so it says nothing direct about the separate pool.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7201896190 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2862#issuecomment-7201896190). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-26T19:43:34Z. --- A run report for this PR, combined with #2902, on a local capture (counts only). The build and the run were done in an offline Windows Sandbox: - main `6ee878d8`, merged with this head `4322d76f` and with #2902 at `da8c2d25`; - `X2W_TRANSLATED_TITLE_INPUT_SNAPSHOT=1`, no inputs, 600 s. **Without this PR** (#2902 alone), the three compute pipelines that #2902 translates are all refused at Dispatch with `an input is in a placed buffer that does not alias title memory`. One is dispatched about once per presented frame, 17,378 refusals in that run; the other two are dispatched once each. **With this PR:** - The log shows `compute dispatches: translated 17407, refused 0, no translation 0`. - In this run only the per-frame pipeline was dispatched, and its named input is a 2,704-byte snapshot. - The two other pipelines were dispatched once each in the earlier run described below, each with a 16-byte snapshot, and were translated. - Over the run, 34,814 inputs came from snapshots, 69,628 KiB in total. - The run kept 29.9 fps over 17,810 presented frames. One difference from this PR as written: the merge with #2849 conflicted in `reserve_upload_ring`. I resolved it locally by keeping #2849's recycled upload ring and passing the `snapshot` flag through to it. Snapshots therefore shared that ring instead of the separate 128 MiB pool here. In an earlier run of the same merge, the title went past its first screen: - Cumulative snapshots reached about 1.6 GiB after about 5.5 minutes. - Command-list recording dominated the frame time. - The shared ring also ran out (`snapshot ring reservation refused: no unused capacity`), which is what the separate pool is meant to avoid. That run used the shared ring above, so it says nothing direct about the separate pool. AI-assisted.
tedin7 commented 2026-11-26 19:48:35 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T19:48:35Z.


@Leyukaka thank you for this run report, and for testing this PR together with #2902 on top of current main.

Two things we take from it:

  • With the snapshot path, the three pipelines that #2902 translates are no longer refused at Dispatch (translated 17407, refused 0 in your run), which is what this PR is for.
  • Your earlier run, with snapshots sharing #2849's recycled upload ring, ran out of ring capacity (snapshot ring reservation refused). That is useful evidence that snapshots should not simply share that ring.

This PR currently conflicts with main in reserve_upload_ring after #2849. We have not pushed a resolution yet, and your report will shape it. The direction we are looking at is to keep snapshots in their own pool, built on #2849's design (chunks reused once the GPU has finished with them), instead of either the old never-reused pool or the shared ring. If we push it, the new head and a fresh Windows Server 2025 receipt will be posted here.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7201983810 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2862#issuecomment-7201983810). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-26T19:48:35Z. --- @Leyukaka thank you for this run report, and for testing this PR together with #2902 on top of current main. Two things we take from it: - With the snapshot path, the three pipelines that #2902 translates are no longer refused at Dispatch (`translated 17407, refused 0` in your run), which is what this PR is for. - Your earlier run, with snapshots sharing #2849's recycled upload ring, ran out of ring capacity (`snapshot ring reservation refused`). That is useful evidence that snapshots should not simply share that ring. This PR currently conflicts with main in `reserve_upload_ring` after #2849. We have not pushed a resolution yet, and your report will shape it. The direction we are looking at is to keep snapshots in their own pool, built on #2849's design (chunks reused once the GPU has finished with them), instead of either the old never-reused pool or the shared ring. If we push it, the new head and a fresh Windows Server 2025 receipt will be posted here. AI-assisted; commands listed were executed locally.
tedin7 commented 2026-11-26 20:42:22 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T20:42:22Z.


Stage-2 gate on the redesigned head (own recycled snapshot pool on top of #2849):

Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit 73b2d0ff73921cce81188d3e11cda6064ac3de87:

  • Debug (--preset dev):
    • Build (cmake --build --preset dev --target d3d12_xs_device_obj d3d12_xs_shim startup_stream_consumer upload_reservation_check -- -j 2): 32.15s (configure 0.00s)
    • Test (ctest --preset dev -R '^(startup_compute_dispatch_input_|upload_reservation$)' --parallel 2 --no-tests=error --output-on-failure): 3/3 passed (3.51s: startup_compute_dispatch_input_warp 3.05s, upload_reservation 0.08s, startup_compute_dispatch_input_hardware 3.26s)
  • Release /O2 (--preset release):
    • Build (cmake --build --preset release --target d3d12_xs_device_obj d3d12_xs_shim startup_stream_consumer upload_reservation_check -- -j 2): 61.48s (configure 0.00s)
    • Test (ctest --preset release -R '^(startup_compute_dispatch_input_|upload_reservation$)' --parallel 2 --no-tests=error --output-on-failure): 3/3 passed (2.24s: startup_compute_dispatch_input_hardware 2.06s, upload_reservation 0.01s, startup_compute_dispatch_input_warp 2.09s)

Mutant check (snapshot pool never recycled, dev): startup_compute_dispatch_input_warp and startup_compute_dispatch_input_hardware fail with AssertionError: dispatch-input-snapshot-long: consumer exit 85, after x2w-draw snapshot pool reservation refused: no unused capacity. So the long case does exercise recycling of the snapshot pool.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7202989885 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2862#issuecomment-7202989885). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-26T20:42:22Z. --- Stage-2 gate on the redesigned head (own recycled snapshot pool on top of #2849): Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit `73b2d0ff73921cce81188d3e11cda6064ac3de87`: - **Debug (`--preset dev`)**: - Build (`cmake --build --preset dev --target d3d12_xs_device_obj d3d12_xs_shim startup_stream_consumer upload_reservation_check -- -j 2`): `32.15s` (configure `0.00s`) - Test (`ctest --preset dev -R '^(startup_compute_dispatch_input_|upload_reservation$)' --parallel 2 --no-tests=error --output-on-failure`): **3/3 passed** (`3.51s`: `startup_compute_dispatch_input_warp` `3.05s`, `upload_reservation` `0.08s`, `startup_compute_dispatch_input_hardware` `3.26s`) - **Release `/O2` (`--preset release`)**: - Build (`cmake --build --preset release --target d3d12_xs_device_obj d3d12_xs_shim startup_stream_consumer upload_reservation_check -- -j 2`): `61.48s` (configure `0.00s`) - Test (`ctest --preset release -R '^(startup_compute_dispatch_input_|upload_reservation$)' --parallel 2 --no-tests=error --output-on-failure`): **3/3 passed** (`2.24s`: `startup_compute_dispatch_input_hardware` `2.06s`, `upload_reservation` `0.01s`, `startup_compute_dispatch_input_warp` `2.09s`) Mutant check (snapshot pool never recycled, `dev`): `startup_compute_dispatch_input_warp` and `startup_compute_dispatch_input_hardware` fail with `AssertionError: dispatch-input-snapshot-long: consumer exit 85`, after `x2w-draw snapshot pool reservation refused: no unused capacity`. So the long case does exercise recycling of the snapshot pool. AI-assisted; commands listed were executed locally.
pigalot commented 2026-11-27 19:53:15 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by pigalot on 2026-11-27T19:53:15Z.

Review: COMMENTED


I tried to review 73b2d0ff over current main 454fc0ed, but the trial merge (git merge --no-ff --no-commit) conflicts in four files:

  • src/startup_stubs/upload_reservation.h and tests/upload_reservation_check.cpp: #2949 (98e4a2ee, opt-in release of upload ring chunks at a fenced submit) is the only change to these files since the PR's base 6ee878d8. It changes the same chunk-reuse code the snapshot pool is built on, so the snapshot chunks probably need to follow the new fenced-release rule as well, not only a textual merge.
  • src/startup_stubs/d3d12_xs_device.cpp: main has since taken #2833, #2919, #3028 and #2920 in this file.
  • tests/startup_stream_consumer.cpp: main has since taken #2882, #2874, #2902 and #2953.

I'll review it once it is updated with main.

This reply was AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6092808709 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2862#pullrequestreview-6092808709). Originally posted by [pigalot](https://github.com/pigalot) on 2026-11-27T19:53:15Z. **Review:** COMMENTED --- I tried to review `73b2d0ff` over current `main` `454fc0ed`, but the trial merge (`git merge --no-ff --no-commit`) conflicts in four files: - `src/startup_stubs/upload_reservation.h` and `tests/upload_reservation_check.cpp`: #2949 (`98e4a2ee`, opt-in release of upload ring chunks at a fenced submit) is the only change to these files since the PR's base `6ee878d8`. It changes the same chunk-reuse code the snapshot pool is built on, so the snapshot chunks probably need to follow the new fenced-release rule as well, not only a textual merge. - `src/startup_stubs/d3d12_xs_device.cpp`: `main` has since taken #2833, #2919, #3028 and #2920 in this file. - `tests/startup_stream_consumer.cpp`: `main` has since taken #2882, #2874, #2902 and #2953. I'll review it once it is updated with `main`. This reply was AI-assisted.
tedin7 commented 2026-11-27 21:28:16 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-27T21:28:16Z.


Updated with main: pushed 0823554c1, a merge commit. All four conflicts are resolved. As you suspected, the snapshot chunks now follow the fenced-release rule from #2949: one 40-slot tracking mask (ring bits 0-31, snapshot bits 32-39), per-queue fence values, and a resubmit is refused if either pool recycled a referenced chunk. upload_reservation_check.cpp gains cases for bit 39, two-queue fencing, and a snapshot-only recycle.

Not yet built or run on Windows after the merge.

Commands run locally: python3 tests/startup_stream_interface_check.py, docs_links_check.py, bidi_controls_check.py, mingw -fsyntax-only on tests/upload_reservation_check.cpp, cmake -S . -B <tmp> -DDXC_EXECUTABLE=/bin/true, public_guard.py.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7228473175 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2862#issuecomment-7228473175). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-27T21:28:16Z. --- Updated with `main`: pushed `0823554c1`, a merge commit. All four conflicts are resolved. As you suspected, the snapshot chunks now follow the fenced-release rule from #2949: one 40-slot tracking mask (ring bits 0-31, snapshot bits 32-39), per-queue fence values, and a resubmit is refused if either pool recycled a referenced chunk. `upload_reservation_check.cpp` gains cases for bit 39, two-queue fencing, and a snapshot-only recycle. Not yet built or run on Windows after the merge. Commands run locally: `python3 tests/startup_stream_interface_check.py`, `docs_links_check.py`, `bidi_controls_check.py`, mingw `-fsyntax-only` on `tests/upload_reservation_check.cpp`, `cmake -S . -B <tmp> -DDXC_EXECUTABLE=/bin/true`, `public_guard.py`. AI-assisted; commands listed were executed locally.
tedin7 commented 2026-11-27 21:47:18 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-27T21:47:18Z.


Verification: head 0823554c1 after the main merge and the latest fixes.

Environment: Windows Server 2025 (build 26100), MSVC 14.44, D3D12 WARP and the hardware adapter, dev and release legs in parallel.

Commands (the same selection in both legs):

x2w_pipe.py win2025 2862 --force --regex '^(upload_reservation|startup_compute_dispatch.*|startup_slot67_indirect.*|startup_upload.*|startup_stream_(check|draw.*)|startup_frame_copy.*)$'
  dev:     cmake --build --preset dev --target auto (upload_reservation_check, startup_stream_consumer, d3d12_xs_shim, upload tests)
           ctest --preset dev -R '^(upload_reservation|startup_compute_dispatch.*|startup_slot67_indirect.*|startup_upload.*|startup_stream_(check|draw.*)|startup_frame_copy.*)$' --no-tests=error --output-on-failure
  release: cmake --build --preset release --target auto (upload_reservation_check, startup_stream_consumer, d3d12_xs_shim, upload tests)
           ctest --preset release -R '^(upload_reservation|startup_compute_dispatch.*|startup_slot67_indirect.*|startup_upload.*|startup_stream_(check|draw.*)|startup_frame_copy.*)$' --no-tests=error --output-on-failure

Result: 31/31 passed in both legs (2 native compute cases skipped by capability); includes upload_reservation and startup_compute_dispatch_input_{warp,hardware} with the 48-frame snapshot recycle case.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7228754454 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2862#issuecomment-7228754454). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-27T21:47:18Z. --- Verification: head `0823554c1` after the main merge and the latest fixes. Environment: Windows Server 2025 (build 26100), MSVC 14.44, D3D12 WARP and the hardware adapter, dev and release legs in parallel. Commands (the same selection in both legs): ``` x2w_pipe.py win2025 2862 --force --regex '^(upload_reservation|startup_compute_dispatch.*|startup_slot67_indirect.*|startup_upload.*|startup_stream_(check|draw.*)|startup_frame_copy.*)$' dev: cmake --build --preset dev --target auto (upload_reservation_check, startup_stream_consumer, d3d12_xs_shim, upload tests) ctest --preset dev -R '^(upload_reservation|startup_compute_dispatch.*|startup_slot67_indirect.*|startup_upload.*|startup_stream_(check|draw.*)|startup_frame_copy.*)$' --no-tests=error --output-on-failure release: cmake --build --preset release --target auto (upload_reservation_check, startup_stream_consumer, d3d12_xs_shim, upload tests) ctest --preset release -R '^(upload_reservation|startup_compute_dispatch.*|startup_slot67_indirect.*|startup_upload.*|startup_stream_(check|draw.*)|startup_frame_copy.*)$' --no-tests=error --output-on-failure ``` Result: 31/31 passed in both legs (2 native compute cases skipped by capability); includes `upload_reservation` and `startup_compute_dispatch_input_{warp,hardware}` with the 48-frame snapshot recycle case. AI-assisted; commands listed were executed locally.
tedin7 commented 2026-11-27 23:19:15 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-27T23:19:15Z.


Updated with main again: pushed e5af9a667 (merge commit, two conflicts in d3d12_xs_device.cpp and tests/startup_stream_consumer.cpp, both sides kept; the snapshot pool still follows the fenced-release rule).

Verification:

  • Win2025 (Build 26100, MSVC 14.44), exact head e5af9a66: x2w_pipe.py win2025 2862 --regex '^(upload_reservation.*|startup_stream_consumer.*|startup_stream_draw.*)$' --force
  • Debug: ctest --preset dev 3/3 passed. Release /O2: 3/3 passed (upload_reservation, startup_stream_draw_warp and the stream consumer test).
  • Linux: cmake -S . -B <tmp> -DDXC_EXECUTABLE=/bin/true, public_guard.py.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7230048953 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2862#issuecomment-7230048953). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-27T23:19:15Z. --- Updated with `main` again: pushed `e5af9a667` (merge commit, two conflicts in `d3d12_xs_device.cpp` and `tests/startup_stream_consumer.cpp`, both sides kept; the snapshot pool still follows the fenced-release rule). Verification: - Win2025 (Build 26100, MSVC 14.44), exact head e5af9a66: `x2w_pipe.py win2025 2862 --regex '^(upload_reservation.*|startup_stream_consumer.*|startup_stream_draw.*)$' --force` - Debug: `ctest --preset dev` 3/3 passed. Release /O2: 3/3 passed (`upload_reservation`, `startup_stream_draw_warp` and the stream consumer test). - Linux: `cmake -S . -B <tmp> -DDXC_EXECUTABLE=/bin/true`, `public_guard.py`. AI-assisted; commands listed were executed locally.
pigalot commented 2026-11-27 23:39:46 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by pigalot on 2026-11-27T23:39:46Z.

Review: APPROVED


Reviewed e5af9a66 merged over current main fad97f47. The merge is clean and git diff --cached --check is clean. The conflicts from my comment on 73b2d0ff are resolved.

What I traced.

  • Snapshot pool numbering: the snapshot pool's chunks are numbered from snapshot_chunk_base (= max_upload_chunks, 32). UploadChunkMask is now 64-bit, static_asserted against the 40 bits. The per-queue last_use and ReleasedUploadChunks::generation arrays are sized to all 40 bits. hold, reuse_upload_chunk, discard_upload_chunks, release_upload_chunks_at_submit and resubmitted_upload_chunks all go through base + index / upload_chunk_at. So a recording's mask, the queue fence table and the fenced-release rule from #2949 cover both pools, and the two pools can't collide. I found no 32-bit mask left: the resubmit log line is now %llx.
  • Budgets and statistics: the snapshot pool has its own budget (128 MiB) and never takes the release-at-submit growth path. The ring statistics and upload_ring_refusals count only the ring.
  • The snapshot path: it runs only for compute inputs (allow_title_snapshot), with X2W_TRANSLATED_TITLE_INPUT_SNAPSHOT=1, for a placed buffer that doesn't alias title memory. It comes after the GPU-copy proof and needs a range of at most 16 MiB. It refuses an unreadable range before ring_copy.
  • Null descriptors: an all-zero descriptor binds 16 zero bytes from the snapshot pool. Compute inputs go through descriptor-table raw SRVs with NumElements = bytes / 4, so reads past those 16 bytes also return zero. An empty range with any non-zero word is still refused.

What I ran. I did a full build in dev and release, then ran

ctest --test-dir out/build/<preset> --no-tests=error -j 4 -E '(_hardware$|startup_audio_)' -R '^(upload_reservation.*|startup_compute_dispatch.*|startup_slot67_indirect.*|startup_upload.*|startup_stream_(check|draw.*|consumer.*)|startup_frame_copy.*|startup_null.*|startup_indirect_translated.*|startup_compute_request.*)$'
# with X2W_TEST_DEBUG_LAYER=1, one at a time
ctest --test-dir out/build/<preset> --no-tests=error -j 1 -R '^(startup_compute_dispatch|startup_slot67_indirect|startup_upload|startup_stream_draw|startup_frame_copy|startup_null|startup_indirect_translated|startup_compute_request).*_hardware$'

The results were the same in both presets:

  • Without _hardware: 32 of 33 pass.
  • _hardware: 23 of 24 pass.
  • The two failures are startup_compute_dispatch_native_warp and _hardware (the native route left ['revision.txt'] in the cache). They're a pre-existing regression on main from #2820, not this PR. main's own Windows run on 14d56502 fails the same way; I reported it on #2820. This PR doesn't touch that test or the cache writer.
  • This PR's own tests pass in both presets and both adapters: upload_reservation, startup_compute_dispatch_input_{warp,hardware} (including both dispatch-input-snapshot-long modes) and the stream and null checks.

Mutants. For each, I rebuilt dev and ran upload_reservation, startup_compute_dispatch_input_warp, startup_stream_draw_warp and startup_null_cause_labels:

Mutant Result
snapshot chunks never reused killed (dispatch-input-snapshot-long: consumer exit 85 after snapshot pool reservation refused)
snapshot chunks numbered from 0 like the ring (base = 0 in reserve_upload_ring) killed (startup_compute_dispatch_input_warp)
snapshot_chunk_base = 0 in the header killed (upload_reservation)
the snapshot ignores X2W_TRANSLATED_TITLE_INPUT_SNAPSHOT killed (dispatch-input-copied: a refused Dispatch wrote the output)
all-zero descriptor refused as before killed (dispatch-input-null)
any empty range treated as null killed (dispatch-input-empty: a refused Dispatch wrote the output)
snapshot skips the readable_window check survives

Restored and rebuilt afterwards; git diff --quiet is clean.

Non-blocking.

  1. The unreadable-range refusal is unpinned. No case points a snapshot input at unmapped title memory. Without the check, ring_copy's plain memcpy would fault in the stand-in. A case with a freed range would pin an input range in title memory is not readable.
  2. The null-descriptor change is on by default. It isn't behind X2W_TRANSLATED_TITLE_INPUT_SNAPSHOT: dispatch-input-null runs without the flag, and the PR description says so. But the docs/experiments.md paragraph describes only the opt-in snapshot. One sentence there, saying that an all-zero compute input descriptor now binds 16 zero bytes by default, would help the next reader.

Verdict: approve on e5af9a66.

Environment: NVIDIA GeForce RTX 5090, driver 32.0.16.1088; D3D12 WARP; Windows 11 25H2 build 26200.9974; MSVC 19.52.37029; Python 3.12.10; debug layer on for the hardware runs.
CI: Build and test on Windows, Assemble and translate gfx1013 fixtures and Run platform-independent Python checks on Linux pass on e5af9a66.

This reply was AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6094341658 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2862#pullrequestreview-6094341658). Originally posted by [pigalot](https://github.com/pigalot) on 2026-11-27T23:39:46Z. **Review:** APPROVED --- Reviewed `e5af9a66` merged over current `main` `fad97f47`. The merge is clean and `git diff --cached --check` is clean. The conflicts from my comment on `73b2d0ff` are resolved. **What I traced.** - **Snapshot pool numbering:** the snapshot pool's chunks are numbered from `snapshot_chunk_base` (= `max_upload_chunks`, 32). `UploadChunkMask` is now 64-bit, `static_assert`ed against the 40 bits. The per-queue `last_use` and `ReleasedUploadChunks::generation` arrays are sized to all 40 bits. `hold`, `reuse_upload_chunk`, `discard_upload_chunks`, `release_upload_chunks_at_submit` and `resubmitted_upload_chunks` all go through `base + index` / `upload_chunk_at`. So a recording's mask, the queue fence table and the fenced-release rule from #2949 cover both pools, and the two pools can't collide. I found no 32-bit mask left: the resubmit log line is now `%llx`. - **Budgets and statistics:** the snapshot pool has its own budget (128 MiB) and never takes the release-at-submit growth path. The ring statistics and `upload_ring_refusals` count only the ring. - **The snapshot path:** it runs only for compute inputs (`allow_title_snapshot`), with `X2W_TRANSLATED_TITLE_INPUT_SNAPSHOT=1`, for a placed buffer that doesn't alias title memory. It comes after the GPU-copy proof and needs a range of at most 16 MiB. It refuses an unreadable range before `ring_copy`. - **Null descriptors:** an all-zero descriptor binds 16 zero bytes from the snapshot pool. Compute inputs go through descriptor-table raw SRVs with `NumElements = bytes / 4`, so reads past those 16 bytes also return zero. An empty range with any non-zero word is still refused. **What I ran.** I did a full build in `dev` and `release`, then ran ```powershell ctest --test-dir out/build/<preset> --no-tests=error -j 4 -E '(_hardware$|startup_audio_)' -R '^(upload_reservation.*|startup_compute_dispatch.*|startup_slot67_indirect.*|startup_upload.*|startup_stream_(check|draw.*|consumer.*)|startup_frame_copy.*|startup_null.*|startup_indirect_translated.*|startup_compute_request.*)$' # with X2W_TEST_DEBUG_LAYER=1, one at a time ctest --test-dir out/build/<preset> --no-tests=error -j 1 -R '^(startup_compute_dispatch|startup_slot67_indirect|startup_upload|startup_stream_draw|startup_frame_copy|startup_null|startup_indirect_translated|startup_compute_request).*_hardware$' ``` The results were the same in both presets: - **Without `_hardware`:** 32 of 33 pass. - **`_hardware`:** 23 of 24 pass. - **The two failures** are `startup_compute_dispatch_native_warp` and `_hardware` (`the native route left ['revision.txt'] in the cache`). They're a pre-existing regression on `main` from #2820, not this PR. `main`'s own Windows run on `14d56502` fails the same way; I reported it on #2820. This PR doesn't touch that test or the cache writer. - **This PR's own tests pass in both presets and both adapters:** `upload_reservation`, `startup_compute_dispatch_input_{warp,hardware}` (including both `dispatch-input-snapshot-long` modes) and the stream and null checks. **Mutants.** For each, I rebuilt `dev` and ran `upload_reservation`, `startup_compute_dispatch_input_warp`, `startup_stream_draw_warp` and `startup_null_cause_labels`: | Mutant | Result | |---|---| | snapshot chunks never reused | killed (`dispatch-input-snapshot-long`: consumer exit 85 after `snapshot pool reservation refused`) | | snapshot chunks numbered from 0 like the ring (`base = 0` in `reserve_upload_ring`) | killed (`startup_compute_dispatch_input_warp`) | | `snapshot_chunk_base = 0` in the header | killed (`upload_reservation`) | | the snapshot ignores `X2W_TRANSLATED_TITLE_INPUT_SNAPSHOT` | killed (`dispatch-input-copied: a refused Dispatch wrote the output`) | | all-zero descriptor refused as before | killed (`dispatch-input-null`) | | any empty range treated as null | killed (`dispatch-input-empty: a refused Dispatch wrote the output`) | | snapshot skips the `readable_window` check | **survives** | Restored and rebuilt afterwards; `git diff --quiet` is clean. **Non-blocking.** 1. **The unreadable-range refusal is unpinned.** No case points a snapshot input at unmapped title memory. Without the check, `ring_copy`'s plain `memcpy` would fault in the stand-in. A case with a freed range would pin `an input range in title memory is not readable`. 2. **The null-descriptor change is on by default.** It isn't behind `X2W_TRANSLATED_TITLE_INPUT_SNAPSHOT`: `dispatch-input-null` runs without the flag, and the PR description says so. But the `docs/experiments.md` paragraph describes only the opt-in snapshot. One sentence there, saying that an all-zero compute input descriptor now binds 16 zero bytes by default, would help the next reader. **Verdict:** approve on `e5af9a66`. Environment: NVIDIA GeForce RTX 5090, driver 32.0.16.1088; D3D12 WARP; Windows 11 25H2 build 26200.9974; MSVC 19.52.37029; Python 3.12.10; debug layer on for the hardware runs. CI: `Build and test on Windows`, `Assemble and translate gfx1013 fixtures` and `Run platform-independent Python checks on Linux` pass on `e5af9a66`. This reply was AI-assisted.
R0Y00 commented 2026-11-28 02:07:10 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-28T02:07:10Z.


The refreshed #3224 startup census puts this refusal first for 35 of the 45 keys that published a manifest (10,555 dispatches in run 74). That makes it worth retesting #2862 against those same keys. The receipt here is for source-built fixtures only.

I trial-merged e5af9a667 onto main 2d6dad19 (tree ab42ca48cd3164819cb09e68c53a9157d984d716). The only conflict is in tests/startup_stream_consumer.cpp. I kept main's indirect-pixel group counts and copied-output case, and this PR's long-run allocation, snapshot input initialization, and copied-input cases.

cmake --build <build> --target d3d12_xs_shim startup_stream_consumer upload_reservation_check
ctest --test-dir <build> --no-tests=error --output-on-failure -j 1 -R "^(upload_reservation|startup_compute_dispatch_(input_|output_)?(warp|hardware)|startup_slot67_indirect_dispatch_(warp|hardware))$"

Debug 9/9, Release /O2 9/9, no skips. Inbox WARP 10.0.26100.9818 and RTX 4060 Laptop (32.0.16.1656), Windows 11 26200.9974, D3D12 debug layer enabled for the input fixture. With the flag off the copied input was refused and the sentinel stayed intact. With it on, all 320 words matched, the zero-input control changed the output, and both 48-frame snapshot-reuse tests passed. The existing copied-output refusal and indirect graphics controls passed.

Please refresh this PR with the latest main, keeping both fixture edits. Once the head is updated, the useful runtime follow-up is a matched flag-off/on run using run 74's cache and an output reference for any newly accepted key.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7232143601 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2862#issuecomment-7232143601). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-28T02:07:10Z. --- [The refreshed #3224 startup census](https://github.com/R0Y00/Xbox2Windows/issues/3224#issuecomment-7231964791) puts this refusal first for 35 of the 45 keys that published a manifest (10,555 dispatches in run 74). That makes it worth retesting #2862 against those same keys. The receipt here is for source-built fixtures only. I trial-merged e5af9a667 onto main 2d6dad19 (tree ab42ca48cd3164819cb09e68c53a9157d984d716). The only conflict is in tests/startup_stream_consumer.cpp. I kept main's indirect-pixel group counts and copied-output case, and this PR's long-run allocation, snapshot input initialization, and copied-input cases. ``` cmake --build <build> --target d3d12_xs_shim startup_stream_consumer upload_reservation_check ctest --test-dir <build> --no-tests=error --output-on-failure -j 1 -R "^(upload_reservation|startup_compute_dispatch_(input_|output_)?(warp|hardware)|startup_slot67_indirect_dispatch_(warp|hardware))$" ``` Debug 9/9, Release /O2 9/9, no skips. Inbox WARP 10.0.26100.9818 and RTX 4060 Laptop (32.0.16.1656), Windows 11 26200.9974, D3D12 debug layer enabled for the input fixture. With the flag off the copied input was refused and the sentinel stayed intact. With it on, all 320 words matched, the zero-input control changed the output, and both 48-frame snapshot-reuse tests passed. The existing copied-output refusal and indirect graphics controls passed. Please refresh this PR with the latest main, keeping both fixture edits. Once the head is updated, the useful runtime follow-up is a matched flag-off/on run using run 74's cache and an output reference for any newly accepted key.
pigalot commented 2026-11-28 03:07:07 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by pigalot on 2026-11-28T03:07:07Z.


I merged current main (fdb6faaa) into this branch as 4d417f02, a plain merge commit with no rebase or force-push. It was approved at e5af9a66, but it conflicted with main in tests/startup_stream_consumer.cpp.

Conflict. Both sides added dispatch_slot67 modes, and I kept both:

  • groups takes main's expression, with the dispatch-indirect-pixel-* cases.
  • The VirtualAlloc size keeps this branch's long-run size, 0x28000 + long_records * 4.
  • The third placed buffer is created for dispatch-input-copied, dispatch-input-snapshot, the long runs, dispatch-root-srv-copied and main's new dispatch-output-copied. It keeps this branch's long-run size and the snapshot memcpy.
  • The long-run loop now follows main's new submit() helper. A non-pixel mode signals fence value 1 there, so the loop's frames still start at 2.

What I ran on 4d417f02:

  • Built dev and release.
  • ctest --no-tests=error -j 4 -E '(_hardware$|startup_audio_)' -R '^(upload_reservation.*|startup_compute_dispatch.*|startup_slot67_indirect.*|startup_upload.*|startup_stream_(check|draw.*|consumer.*)|startup_frame_copy.*|startup_null.*|startup_indirect_translated.*|startup_compute_request.*)$' in each preset: 34 of 34 pass. That includes upload_reservation, startup_compute_dispatch_input_warp with both dispatch-input-snapshot-long modes, and main's output and pixel modes.
  • The matching _hardware tests, -j 1 with X2W_TEST_DEBUG_LAYER=1: 25 of 25 pass in each preset.
  • The full non-hardware suite in dev (-j 6 -E '(_hardware$|startup_audio_)'): 1999 of 1999 pass.

A different reviewer will re-review the merged head.

Environment: NVIDIA GeForce RTX 5090, driver 32.0.16.1088; D3D12 WARP; Windows 11 25H2 build 26200.9974; MSVC 19.52.37029; Python 3.12.10.

This reply was AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7232805573 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2862#issuecomment-7232805573). Originally posted by [pigalot](https://github.com/pigalot) on 2026-11-28T03:07:07Z. --- I merged current `main` (`fdb6faaa`) into this branch as `4d417f02`, a plain merge commit with no rebase or force-push. It was approved at `e5af9a66`, but it conflicted with `main` in `tests/startup_stream_consumer.cpp`. **Conflict.** Both sides added `dispatch_slot67` modes, and I kept both: - `groups` takes `main`'s expression, with the `dispatch-indirect-pixel-*` cases. - The `VirtualAlloc` size keeps this branch's long-run size, `0x28000 + long_records * 4`. - The third placed buffer is created for `dispatch-input-copied`, `dispatch-input-snapshot`, the long runs, `dispatch-root-srv-copied` and `main`'s new `dispatch-output-copied`. It keeps this branch's long-run size and the snapshot `memcpy`. - The long-run loop now follows `main`'s new `submit()` helper. A non-pixel mode signals fence value 1 there, so the loop's frames still start at 2. **What I ran on `4d417f02`:** - Built `dev` and `release`. - `ctest --no-tests=error -j 4 -E '(_hardware$|startup_audio_)' -R '^(upload_reservation.*|startup_compute_dispatch.*|startup_slot67_indirect.*|startup_upload.*|startup_stream_(check|draw.*|consumer.*)|startup_frame_copy.*|startup_null.*|startup_indirect_translated.*|startup_compute_request.*)$'` in each preset: 34 of 34 pass. That includes `upload_reservation`, `startup_compute_dispatch_input_warp` with both `dispatch-input-snapshot-long` modes, and `main`'s output and pixel modes. - The matching `_hardware` tests, `-j 1` with `X2W_TEST_DEBUG_LAYER=1`: 25 of 25 pass in each preset. - The full non-hardware suite in `dev` (`-j 6 -E '(_hardware$|startup_audio_)'`): 1999 of 1999 pass. A different reviewer will re-review the merged head. Environment: NVIDIA GeForce RTX 5090, driver 32.0.16.1088; D3D12 WARP; Windows 11 25H2 build 26200.9974; MSVC 19.52.37029; Python 3.12.10. This reply was AI-assisted.
R0Y00 commented 2026-11-28 03:28:51 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-28T03:28:51Z.

Review: APPROVED


I reviewed 4d417f02 and tested its integration with main 0fe4cebc (tree 910ad5a6). The conflict resolution keeps the new indirect-pixel group counts and copied-output case, and the long-run snapshot allocation and input initialization.

Debug and Release /O2 each passed 9/9, zero skips, with the shim, stream consumer and reservation test rebuilt:

ctest --test-dir <build> --no-tests=error --output-on-failure -j 1 -R '^(upload_reservation|startup_compute_dispatch_(input_|output_)?(warp|hardware)|startup_slot67_indirect_dispatch_(warp|hardware))$'

Windows 11 26200.9974, WARP 10.0.26100.9818 and RTX 4060 Laptop driver 32.0.16.1656. The input fixture requests the D3D12 debug layer. The source-built cases cover copied and zero input, flag-off refusal, 48-frame snapshot-pool reuse, and the adjacent copied-output and indirect paths. The remaining checkout is a matched opt-in startup run for the keys reported in #3224.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6095439918 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2862#pullrequestreview-6095439918). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-28T03:28:51Z. **Review:** APPROVED --- I reviewed `4d417f02` and tested its integration with main `0fe4cebc` (tree `910ad5a6`). The conflict resolution keeps the new indirect-pixel group counts and copied-output case, and the long-run snapshot allocation and input initialization. Debug and Release /O2 each passed 9/9, zero skips, with the shim, stream consumer and reservation test rebuilt: ```powershell ctest --test-dir <build> --no-tests=error --output-on-failure -j 1 -R '^(upload_reservation|startup_compute_dispatch_(input_|output_)?(warp|hardware)|startup_slot67_indirect_dispatch_(warp|hardware))$' ``` Windows 11 26200.9974, WARP 10.0.26100.9818 and RTX 4060 Laptop driver 32.0.16.1656. The input fixture requests the D3D12 debug layer. The source-built cases cover copied and zero input, flag-off refusal, 48-frame snapshot-pool reuse, and the adjacent copied-output and indirect paths. The remaining checkout is a matched opt-in startup run for the keys reported in #3224.
pigalot commented 2026-11-28 03:52:47 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by pigalot on 2026-11-28T03:52:47Z.

Review: APPROVED


Re-reviewed 4d417f02 (the merge of main fdb6faaa into e5af9a66) integrated over the current main 0637fced (tree cbd79d55). The trial merge is clean and git diff --cached --check origin/main is clean. The earlier approval on e5af9a66 was from another session on this account; I didn't push this merge.

What I checked in the merge.

  • tests/startup_stream_consumer.cpp, the only file resolved by hand:
    • The groups expression takes main's dispatch-indirect-pixel-* cases.
    • The VirtualAlloc keeps this branch's long-run size, 0x28000 + long_records * 4.
    • The third placed buffer is created for this branch's snapshot and long modes and for main's dispatch-output-copied.
    • The long-run loop starts after main's submit(pixel ? 2 : 1), which signals fence 1 for a non-pixel mode, so its frames still wait on 2 to 48.
  • Runtime: this branch's runtime changes don't collide with main's newer compute-dispatch code.
    • The new allow_title_snapshot parameter of indirect_table_buffer goes last, with a default, and only the table-input call in record_translated_dispatch passes it.
    • The other callers, and main's output-descriptor refusals, keep their behaviour.
    • IndirectBufferView::source is appended after upload, so the existing five-field initialisers still mean the same.

What I ran. I did a full build in dev and release, then ran:

ctest --test-dir out/build/<preset> --no-tests=error -j 4 -E '(_hardware$|startup_audio_)' -R '^(upload_reservation.*|startup_compute_dispatch.*|startup_slot67_indirect.*|startup_upload.*|startup_stream_(check|draw.*|consumer.*)|startup_frame_copy.*|startup_null.*|startup_indirect_translated.*|startup_compute_request.*)$'
# X2W_TEST_DEBUG_LAYER=1, under the GPU lock
ctest --test-dir out/build/<preset> --no-tests=error -j 1 -R '^(startup_compute_dispatch|startup_slot67_indirect|startup_upload|startup_stream_draw|startup_frame_copy|startup_null|startup_indirect_translated|startup_compute_request).*_hardware$'
  • Without _hardware: 33 of 34 pass in Debug and Release /O2. startup_compute_dispatch_native_warp reports a capability skip (77).
  • _hardware: 25 of 25 pass in Debug and Release on the RTX 5090, with the debug layer on.
  • The full non-hardware suite in dev (-j 8 -E '(_hardware$|startup_audio_)'): 2000 tests.
    • 1941 pass.
    • 57 report capability skips.
    • pixel_aot_warp and pixel_aot_core_vector_warp timed out at -j 8; alone at -j 1 they pass in 18 s and 10 s.
    • The revision.txt failures from #2820 no longer appear on this main.

Mutants in the resolved tests/startup_stream_consumer.cpp. Each was applied alone, then startup_stream_consumer was rebuilt in dev and startup_compute_dispatch_{input,output}_warp run. The source was restored and rebuilt afterwards, with git diff --quiet clean and both tests passing again.

Mutant Result
third buffer not placed for main's dispatch-output-copied killed: dispatch-output-copied gets another refusal reason
long-run modes don't write their input into title memory killed: dispatch-input-snapshot-long reads other words

The earlier mutant table on e5af9a66 covers the runtime change. The merge doesn't touch it.

Verdict: approve on 4d417f02.

Environment: NVIDIA GeForce RTX 5090 driver 32.0.16.1088 and WARP 10.0.26100.9818, Windows 11 25H2 build 26200.9974, MSVC 19.52.37029, Python 3.12.10; debug layer on for the hardware runs.
CI: Build and test on Windows, Assemble and translate gfx1013 fixtures and Run platform-independent Python checks on Linux pass on 4d417f02.

This reply was AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6095580889 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2862#pullrequestreview-6095580889). Originally posted by [pigalot](https://github.com/pigalot) on 2026-11-28T03:52:47Z. **Review:** APPROVED --- Re-reviewed `4d417f02` (the merge of `main` `fdb6faaa` into `e5af9a66`) integrated over the current `main` `0637fced` (tree `cbd79d55`). The trial merge is clean and `git diff --cached --check origin/main` is clean. The earlier approval on `e5af9a66` was from another session on this account; I didn't push this merge. **What I checked in the merge.** - **`tests/startup_stream_consumer.cpp`**, the only file resolved by hand: - The `groups` expression takes `main`'s `dispatch-indirect-pixel-*` cases. - The `VirtualAlloc` keeps this branch's long-run size, `0x28000 + long_records * 4`. - The third placed buffer is created for this branch's snapshot and long modes and for `main`'s `dispatch-output-copied`. - The long-run loop starts after `main`'s `submit(pixel ? 2 : 1)`, which signals fence 1 for a non-pixel mode, so its frames still wait on 2 to 48. - **Runtime:** this branch's runtime changes don't collide with `main`'s newer compute-dispatch code. - The new `allow_title_snapshot` parameter of `indirect_table_buffer` goes last, with a default, and only the table-input call in `record_translated_dispatch` passes it. - The other callers, and `main`'s output-descriptor refusals, keep their behaviour. - `IndirectBufferView::source` is appended after `upload`, so the existing five-field initialisers still mean the same. **What I ran.** I did a full build in `dev` and `release`, then ran: ```powershell ctest --test-dir out/build/<preset> --no-tests=error -j 4 -E '(_hardware$|startup_audio_)' -R '^(upload_reservation.*|startup_compute_dispatch.*|startup_slot67_indirect.*|startup_upload.*|startup_stream_(check|draw.*|consumer.*)|startup_frame_copy.*|startup_null.*|startup_indirect_translated.*|startup_compute_request.*)$' # X2W_TEST_DEBUG_LAYER=1, under the GPU lock ctest --test-dir out/build/<preset> --no-tests=error -j 1 -R '^(startup_compute_dispatch|startup_slot67_indirect|startup_upload|startup_stream_draw|startup_frame_copy|startup_null|startup_indirect_translated|startup_compute_request).*_hardware$' ``` - **Without `_hardware`:** 33 of 34 pass in Debug and Release `/O2`. `startup_compute_dispatch_native_warp` reports a capability skip (77). - **`_hardware`:** 25 of 25 pass in Debug and Release on the RTX 5090, with the debug layer on. - **The full non-hardware suite in `dev`** (`-j 8 -E '(_hardware$|startup_audio_)'`): 2000 tests. - 1941 pass. - 57 report capability skips. - `pixel_aot_warp` and `pixel_aot_core_vector_warp` timed out at `-j 8`; alone at `-j 1` they pass in 18 s and 10 s. - The `revision.txt` failures from #2820 no longer appear on this `main`. **Mutants** in the resolved `tests/startup_stream_consumer.cpp`. Each was applied alone, then `startup_stream_consumer` was rebuilt in `dev` and `startup_compute_dispatch_{input,output}_warp` run. The source was restored and rebuilt afterwards, with `git diff --quiet` clean and both tests passing again. | Mutant | Result | |---|---| | third buffer not placed for `main`'s `dispatch-output-copied` | killed: `dispatch-output-copied` gets another refusal reason | | long-run modes don't write their input into title memory | killed: `dispatch-input-snapshot-long` reads other words | The earlier mutant table on `e5af9a66` covers the runtime change. The merge doesn't touch it. **Verdict:** approve on `4d417f02`. Environment: NVIDIA GeForce RTX 5090 driver 32.0.16.1088 and WARP 10.0.26100.9818, Windows 11 25H2 build 26200.9974, MSVC 19.52.37029, Python 3.12.10; debug layer on for the hardware runs. CI: `Build and test on Windows`, `Assemble and translate gfx1013 fixtures` and `Run platform-independent Python checks on Linux` pass on `4d417f02`. This reply was AI-assisted.
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
R0Y00/Xbox2Windows!2854
No description provided.