startup: dispatch translated compute programs with raw table buffers #2462

Closed
NiiRoZz wants to merge 31 commits from upstream-pr/2470 into main
NiiRoZz commented 2026-11-25 17:37:23 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by NiiRoZz on 2026-11-25T17:37:23Z.


Depends on #1803, #1974 (both closed for now by their author to shorten the test queue, to be reopened) and #1975. This branch contains merges of those three, so the diff here includes them until they land; the new code is the last two commits.

What / Why

A device slot 67 compute pipeline is a placeholder: its request is published and translated offline
(stage cs manifest and cs_6_0 bytecode), but nothing ran the result. Command-list slot 14 refused every
Dispatch with such a pipeline bound. This change runs the translated program for the narrowest case: raw buffer
inputs and outputs named by hardware buffer descriptors in the compute descriptor tables, with entry values from
compute root constants. Everything else is refused with one logged reason and records nothing on the desktop
list.

Change

  • publish_compute_request returns the request key; the slot 67 wrapper keeps it together with the root
    signature wrapper its description names.
  • New src/startup_stubs/d3d12_compute_dispatch.inl:
    • loader for x2w-manifest 2 / stage cs: accepts group, ud, udsrc i rootconst p w,
      srv i buf table p b, uav i table p b; any other line leaves the pipeline untranslated with one logged
      reason. An absent manifest is retried once per second, as for draws.
    • host root signature through create_translated_root, which gains an optional UAV range after the SRV range
      in the same table (graphics callers are unchanged).
    • dispatch_translated, called first in list_dispatch: resolves every view before recording anything
      (inputs through indirect_table_buffer; outputs must be placed buffers that alias the caller's memory, allow
      unordered access, start in COMMON and are not also an input), then states, descriptors in the draw heap ring,
      constants from the recorded compute root constants, Dispatch, a UAV barrier per output, and the title's
      desktop compute root and upload SRVs restored. The desktop-pipeline decision of #1974 is untouched and still
      handles every pipeline that is not a slot 67 placeholder.
  • Log line after the render totals:
    x2w-render compute dispatches: translated <n>, refused <n>, no translation <n>.
  • tests/startup_stream_consumer.cpp: slot67 ... dispatch|dispatch-none|dispatch-swapped records the heap,
    pipeline, root, constants, table and Dispatch on a stand-in list and writes the output words read from the
    aliased memory.
  • docs/experiments.md: section "Translated compute Dispatch".

Tests

Commit under test: aca6e895 (local; the neighbour run below was made at 1e567a02, before a log-only follow-up, and
the two new tests were rerun at this commit). Windows 11 build 26300. Debug layer enabled in the new tests
(X2W_D3D12_DEBUG=1); its messages are drained into the log at the Dispatch and after the queue's execute, and
none is an error or corruption message. No probe showed that a wrong state would be reported there.

cmake --build --preset dev
ctest --preset dev --no-tests=error -R "^startup_compute_dispatch_" -V
  • startup_compute_dispatch_warp: Passed. Microsoft Basic Render Driver, driver 10.0.26100.10068.
  • startup_compute_dispatch_hardware: Passed. NVIDIA GeForce RTX 5090, driver 32.0.16.2135.

Each run checks, on one cache: before translation the Dispatch is refused with "no translation" and all 320
output words keep the sentinel (negative control: the test fails if nothing translated is dispatched); after
gfx2hlsl.py --pending all 320 words equal the fixture's expectation; with no Dispatch recorded the output is
untouched; with the two descriptors exchanged the Dispatch is refused with one reason, the output is untouched
and the input is unchanged.

ctest --preset dev --no-tests=error -R 'startup_list_dispatch|startup_compute|startup_root_constant|startup_gfx2hlsl_compute|startup_indirect|era_heap|desktop_root_signature|startup_stream|docs_links|startup_draw|startup_logical'

178 selected: 177 passed, 0 failed, 1 capability skip (startup_logical_view_warp: the adapter accepts the
descriptor count directly, so that test has nothing to check; unrelated to this change). Before the change the
same build passed 162 of 162 on the narrower filter without the last three alternatives.

Limits

  • Merged dependency snapshots: #1803 9c87260b, #1974 7307c2f1, #1975 033f40cd. #1975 has since moved to
    9828b5d8 (its merge onto this branch's #1974 merge is conflict-free by git merge-tree); #1803 and #1974 are
    closed upstream for now. Redo the #1975 merge before opening.

  • On an adapter where the placed output buffer cannot alias the caller's memory, the hardware test fails
    instead of skipping.

  • One source-built gfx1013 fixture program. No title run; nothing here establishes full-game startup.

  • Not dispatched: programs with textures, samplers, root views, entry values that are not root constants, no
    entry values, no inputs or no outputs; outputs in memory that is not an aliased placed buffer; descriptors that
    are view tokens; ExecuteIndirect dispatches.

  • The slot numbers and argument layouts are those the stand-in already uses; the fixture proves the stand-in is
    self-consistent, not the console ABI.

  • git diff --check clean; LF in the index.

🤖 Generated with Claude Code

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:5496158638 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2470). Originally posted by [NiiRoZz](https://github.com/NiiRoZz) on 2026-11-25T17:37:23Z. --- Depends on #1803, #1974 (both closed for now by their author to shorten the test queue, to be reopened) and #1975. This branch contains merges of those three, so the diff here includes them until they land; the new code is the last two commits. ## What / Why A device slot 67 compute pipeline is a placeholder: its request is published and translated offline (`stage cs` manifest and `cs_6_0` bytecode), but nothing ran the result. Command-list slot 14 refused every Dispatch with such a pipeline bound. This change runs the translated program for the narrowest case: raw buffer inputs and outputs named by hardware buffer descriptors in the compute descriptor tables, with entry values from compute root constants. Everything else is refused with one logged reason and records nothing on the desktop list. ## Change - `publish_compute_request` returns the request key; the slot 67 wrapper keeps it together with the root signature wrapper its description names. - New `src/startup_stubs/d3d12_compute_dispatch.inl`: - loader for `x2w-manifest 2` / `stage cs`: accepts `group`, `ud`, `udsrc i rootconst p w`, `srv i buf table p b`, `uav i table p b`; any other line leaves the pipeline untranslated with one logged reason. An absent manifest is retried once per second, as for draws. - host root signature through `create_translated_root`, which gains an optional UAV range after the SRV range in the same table (graphics callers are unchanged). - `dispatch_translated`, called first in `list_dispatch`: resolves every view before recording anything (inputs through `indirect_table_buffer`; outputs must be placed buffers that alias the caller's memory, allow unordered access, start in COMMON and are not also an input), then states, descriptors in the draw heap ring, constants from the recorded compute root constants, `Dispatch`, a UAV barrier per output, and the title's desktop compute root and upload SRVs restored. The desktop-pipeline decision of #1974 is untouched and still handles every pipeline that is not a slot 67 placeholder. - Log line after the render totals: `x2w-render compute dispatches: translated <n>, refused <n>, no translation <n>`. - `tests/startup_stream_consumer.cpp`: `slot67 ... dispatch|dispatch-none|dispatch-swapped` records the heap, pipeline, root, constants, table and Dispatch on a stand-in list and writes the output words read from the aliased memory. - `docs/experiments.md`: section "Translated compute Dispatch". ## Tests Commit under test: `aca6e895` (local; the neighbour run below was made at `1e567a02`, before a log-only follow-up, and the two new tests were rerun at this commit). Windows 11 build 26300. Debug layer enabled in the new tests (`X2W_D3D12_DEBUG=1`); its messages are drained into the log at the Dispatch and after the queue's execute, and none is an error or corruption message. No probe showed that a wrong state would be reported there. ```powershell cmake --build --preset dev ctest --preset dev --no-tests=error -R "^startup_compute_dispatch_" -V ``` - `startup_compute_dispatch_warp`: Passed. Microsoft Basic Render Driver, driver 10.0.26100.10068. - `startup_compute_dispatch_hardware`: Passed. NVIDIA GeForce RTX 5090, driver 32.0.16.2135. Each run checks, on one cache: before translation the Dispatch is refused with "no translation" and all 320 output words keep the sentinel (negative control: the test fails if nothing translated is dispatched); after `gfx2hlsl.py --pending` all 320 words equal the fixture's expectation; with no Dispatch recorded the output is untouched; with the two descriptors exchanged the Dispatch is refused with one reason, the output is untouched and the input is unchanged. ```powershell ctest --preset dev --no-tests=error -R 'startup_list_dispatch|startup_compute|startup_root_constant|startup_gfx2hlsl_compute|startup_indirect|era_heap|desktop_root_signature|startup_stream|docs_links|startup_draw|startup_logical' ``` 178 selected: 177 passed, 0 failed, 1 capability skip (`startup_logical_view_warp`: the adapter accepts the descriptor count directly, so that test has nothing to check; unrelated to this change). Before the change the same build passed 162 of 162 on the narrower filter without the last three alternatives. ## Limits - Merged dependency snapshots: #1803 `9c87260b`, #1974 `7307c2f1`, #1975 `033f40cd`. #1975 has since moved to `9828b5d8` (its merge onto this branch's #1974 merge is conflict-free by `git merge-tree`); #1803 and #1974 are closed upstream for now. Redo the #1975 merge before opening. - On an adapter where the placed output buffer cannot alias the caller's memory, the hardware test fails instead of skipping. - One source-built gfx1013 fixture program. No title run; nothing here establishes full-game startup. - Not dispatched: programs with textures, samplers, root views, entry values that are not root constants, no entry values, no inputs or no outputs; outputs in memory that is not an aliased placed buffer; descriptors that are view tokens; ExecuteIndirect dispatches. - The slot numbers and argument layouts are those the stand-in already uses; the fixture proves the stand-in is self-consistent, not the console ABI. - `git diff --check` clean; LF in the index. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
tedin7 commented 2026-11-25 18:31:46 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T18:31:46Z.

Review: COMMENTED


Review of head aca6e895 (code read only; no Windows run by me).

What I checked

  • Scope: the diff against main also carries merges of #1803, #1974 and #1975. The new code is the last two commits (8 files, +435/-9): d3d12_compute_dispatch.inl, small hooks in d3d12_draw.inl / d3d12_xs_device.cpp / translated_sampler_bindings.h, the consumer record mode, a new check script, docs.
  • Dependencies: the body says "depends on #1803, #1974, #1975". #1803 and #1974 are CLOSED (not merged), #1975 is OPEN. So this cannot land as it is; the author says the merges must be redone before opening.
  • Test design (tests/startup_compute_dispatch_check.py): it has a negative control (before translation the Dispatch is refused with "no translation" and all 320 words keep the sentinel), a no-Dispatch control, and a swapped-descriptor refusal control, and compares all 320 output words with the fixture expectation. This is the shape a source-built regression test plus negative control should have.
  • Not provable by me: the test needs DXC and a Windows D3D12 adapter, so I could not run it or mutate the code under test on Linux.
  • Windows results: the body reports the two new tests at aca6e895 (WARP and hardware), but the neighbour ctest run (177/178) was made at 1e567a02, before the last log-only commit. I did not verify any of these numbers.
  • Startup: the body does not claim startup progress, and no game result is posted on this head. Nothing here is verified against the game.

Local commands run

  • git diff --check origin/main...HEAD (clean)
  • python3 tests/docs_links_check.py (passed, 19 files, 465 links)
  • python3 tests/bidi_controls_check.py (passed)

Open points for @R0Y00

  • Whether to take the stacked #1803/#1974/#1975 work first, or this PR as one unit. I leave that choice to you.
  • After the dependencies land, the branch needs a fresh Windows run on the final head.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6062928912 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2470#pullrequestreview-6062928912). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T18:31:46Z. **Review:** COMMENTED --- Review of head `aca6e895` (code read only; no Windows run by me). What I checked - Scope: the diff against main also carries merges of #1803, #1974 and #1975. The new code is the last two commits (8 files, +435/-9): `d3d12_compute_dispatch.inl`, small hooks in `d3d12_draw.inl` / `d3d12_xs_device.cpp` / `translated_sampler_bindings.h`, the consumer record mode, a new check script, docs. - Dependencies: the body says "depends on #1803, #1974, #1975". #1803 and #1974 are CLOSED (not merged), #1975 is OPEN. So this cannot land as it is; the author says the merges must be redone before opening. - Test design (`tests/startup_compute_dispatch_check.py`): it has a negative control (before translation the Dispatch is refused with "no translation" and all 320 words keep the sentinel), a no-Dispatch control, and a swapped-descriptor refusal control, and compares all 320 output words with the fixture expectation. This is the shape a source-built regression test plus negative control should have. - Not provable by me: the test needs DXC and a Windows D3D12 adapter, so I could not run it or mutate the code under test on Linux. - Windows results: the body reports the two new tests at `aca6e895` (WARP and hardware), but the neighbour ctest run (177/178) was made at `1e567a02`, before the last log-only commit. I did not verify any of these numbers. - Startup: the body does not claim startup progress, and no game result is posted on this head. Nothing here is verified against the game. Local commands run - `git diff --check origin/main...HEAD` (clean) - `python3 tests/docs_links_check.py` (passed, 19 files, 465 links) - `python3 tests/bidi_controls_check.py` (passed) Open points for @R0Y00 - Whether to take the stacked #1803/#1974/#1975 work first, or this PR as one unit. I leave that choice to you. - After the dependencies land, the branch needs a fresh Windows run on the final head. AI-assisted; commands listed were executed locally.
RavenCurseBurg commented 2026-11-25 20:04:42 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by RavenCurseBurg on 2026-11-25T19:22:15Z.


The #2492 runs exposed an intermittent process-exit failure in the existing direct Dispatch case on my RTX 4060. I isolated it before adding any slot 61 runtime code. The fixture-only build uses your b49c7380 runtime. The ordinary startup_compute_dispatch_check.py ... hardware failed in three of five repetitions.

For a narrower measurement I published case A once (113c5facd3b217c1), reused the cache, and launched the existing slot67 ... dispatch mode eight times on Windows 11 build 26100.9711, RTX 4060 driver 32.0.15.9579, debug layer unavailable. Every run wrote exactly the expected 1,280-byte result after its fence. Five processes exited 0, three exited 0xc0000005 after writing the correct file. This separates the process-exit problem from the output or group count. The earlier hosted WARP direct test passed.

I am narrowing down the lifetime of the translated compute objects at shutdown. I will post the result on this PR. I have kept the process exit-code check in the new fixture.

AI-assisted with Codex (GPT-6.2 Astra, xhigh).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7172200476 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2470#issuecomment-7172200476). Originally posted by [RavenCurseBurg](https://github.com/RavenCurseBurg) on 2026-11-25T19:22:15Z. --- The #2492 runs exposed an intermittent process-exit failure in the existing **direct** Dispatch case on my RTX 4060. I isolated it before adding any slot 61 runtime code. The [fixture-only build](https://github.com/RavenCurseBurg/Xbox2Windows/actions/runs/45682173291) uses your `b49c7380` runtime. The ordinary `startup_compute_dispatch_check.py ... hardware` failed in three of five repetitions. For a narrower measurement I published case A once (`113c5facd3b217c1`), reused the cache, and launched the existing `slot67 ... dispatch` mode eight times on Windows 11 build 26100.9711, RTX 4060 driver 32.0.15.9579, debug layer unavailable. **Every run wrote exactly the expected 1,280-byte result after its fence.** Five processes exited 0, three exited `0xc0000005` after writing the correct file. This separates the process-exit problem from the output or group count. The earlier hosted WARP direct test passed. I am narrowing down the lifetime of the translated compute objects at shutdown. I will post the result on this PR. I have kept the process exit-code check in the new fixture. AI-assisted with Codex (GPT-6.2 Astra, xhigh).
R0Y00 commented 2026-11-25 20:04:43 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T19:30:08Z.


The refreshed b49c7380 is green and the direct source-built output control is useful. The branch still includes closed #1803 and #1974 plus an older #1975 snapshot. Please coordinate with @tedin7 to reopen and land the independent prerequisites in order, or identify which pieces the direct slice actually needs and stack only those. Use #1975’s current head in the combined candidate and make the GPU readback depend on both slots 37 and 39. Include the missing-word and root-change/reset controls requested on #1975. Once the base lands, a clean consumer-only diff will let us advance #2490 and the separately claimed #2492 indirect fixture.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7172384676 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2470#issuecomment-7172384676). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-25T19:30:08Z. --- The refreshed `b49c7380` is green and the direct source-built output control is useful. The branch still includes closed #1803 and #1974 plus an older #1975 snapshot. Please coordinate with @tedin7 to reopen and land the independent prerequisites in order, or identify which pieces the direct slice actually needs and stack only those. Use #1975’s current head in the combined candidate and make the GPU readback depend on both slots 37 and 39. Include the missing-word and root-change/reset controls requested on #1975. Once the base lands, a clean consumer-only diff will let us advance #2490 and the separately claimed #2492 indirect fixture.
RavenCurseBurg commented 2026-11-25 20:04:44 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by RavenCurseBurg on 2026-11-25T19:36:23Z.


I isolated the RTX exit failure to the cached desktop PSO release. The instrumented build logged before and after releasing the PSO and root. In 28 case A processes all GPU output bytes matched. With normal release, 6/7 processes failed. With just the root detached, 5/7 failed. With just the PSO detached or with both detached, 7/7 in each group exited normally. All eleven failing logs stop inside the desktop PSO release during shutdown.

There is a standalone 18-line fix on your b49c7380 base ready to cherry-pick. It records the non-null reserved argument to DLL_PROCESS_DETACH and detaches the two compute COM references only during process termination. Ordinary unloading retains the normal ownership semantics. This follows the Windows DLL termination guidance.

On that exact fix, 30/30 RTX 4060 processes returned 0 with all 320 words correct. Windows Server 2025 ran four WARP CTests on the standalone fix. A separate integration head also ran the new direct, indirect and live-retry fixtures on Intel UHD 770, RTX 4060 and WARP, with all process statuses and readbacks checked. Two exact-commit CI jobs.

AI-assisted with Codex (GPT-6.2 Astra, xhigh).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7172527554 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2470#issuecomment-7172527554). Originally posted by [RavenCurseBurg](https://github.com/RavenCurseBurg) on 2026-11-25T19:36:23Z. --- I isolated the RTX exit failure to the cached desktop PSO release. The [instrumented build](https://github.com/RavenCurseBurg/Xbox2Windows/commit/966a3b8db4d6a3642c02f3d9b6b1c810b933b901) logged before and after releasing the PSO and root. In 28 case A processes all GPU output bytes matched. With normal release, 6/7 processes failed. With just the root detached, 5/7 failed. With just the PSO detached or with both detached, 7/7 in each group exited normally. All eleven failing logs stop inside the desktop PSO release during shutdown. There is a standalone [18-line fix on your `b49c7380` base](https://github.com/RavenCurseBurg/Xbox2Windows/commit/7a8d9c8928e7db2eb0c1721d025851733aaff68d) ready to cherry-pick. It records the non-null reserved argument to DLL_PROCESS_DETACH and detaches the two compute COM references only during process termination. Ordinary unloading retains the normal ownership semantics. This follows the [Windows DLL termination guidance](https://learn.microsoft.com/en-us/windows/win32/dlls/dllmain#remarks). On that exact fix, **30/30** RTX 4060 processes returned 0 with all 320 words correct. Windows Server 2025 ran four WARP CTests on the standalone fix. A separate integration head also ran the new direct, indirect and live-retry fixtures on Intel UHD 770, RTX 4060 and WARP, with all process statuses and readbacks checked. [Two exact-commit CI jobs](https://github.com/RavenCurseBurg/Xbox2Windows/actions/runs/45685747347). AI-assisted with Codex (GPT-6.2 Astra, xhigh).
MasterDomino commented 2026-11-25 20:39:06 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-25T20:39:06Z.

Review: COMMENTED


Review of b49c7380 (comment only). This adds evidence to @R0Y00's 19:30 requests; it doesn't add process.

Runs (Windows 11 build 26300; AMD Radeon RX 9070 XT 1002:7550, driver 32.0.32029.2010; WARP 10.0.26100.9818; debug layer enabled by the fixture)

ctest --preset dev --no-tests=error -j1 -R '^startup_compute_dispatch_(warp|hardware)$' -V
ctest --preset dev --no-tests=error -j1 -R 'startup_list_dispatch|startup_compute|startup_root_constant|startup_gfx2hlsl_compute|startup_indirect|era_heap|desktop_root_signature|startup_stream|docs_links|startup_draw|startup_logical'
  • New tests: 2/2 pass, with no debug messages.
  • The neighbour filter from the description: 182 selected, 180 passed, 0 failed, 2 capability skips (startup_logical_view_*).

Mutants confirm R0Y00's open requests

Each mutant is one line, rebuilt, run against ^startup_(compute_dispatch_warp|compute_root|root_constant_store|list_dispatch.*)$, then restored:

mutant result
slot 37 handler made a no-op (d3d12_draw.inl:2427) survives: the fixture only calls slot 39 (tests/startup_stream_consumer.cpp:217), so the readback doesn't depend on both 37 and 39
no clear of the compute constants on a root change (d3d12_xs_device.cpp:2505) survives: there's no root-change or Reset control at GPU level
every entry value reads uds[0] (d3d12_compute_dispatch.inl:181) caught (word=1 … 287 words differ)
root-mismatch refusal off (d3d12_compute_dispatch.inl:101) survives
output-is-also-an-input refusal off (:146) survives

The first two are direct evidence for R0Y00's #1975 requests: a slot 37 plus slot 39 readback, and root-change/Reset controls. A never-set word also reads as 0 (:181), with no missing-word control. #1975's current head has is_bound() for this, but this branch still carries 033f40cd.

Additional findings

  • P2: two refusals no test pins, the last two rows above. Scenario for :146: a title passes one buffer as both input and output, the call is accepted, and the buffer is bound as SRV and UAV at once. One fixture case for each would pin them. Also, :146 compares ID3D12Resource* pointers only, so two placed aliases over the same memory aren't detected (P3).
  • P2: process-exit release. @RavenCurseBurg isolated the RTX 4060 0xc0000005 exits to releasing the cached desktop PSO during static destruction, and has an 18-line fix on this base (7a8d9c89). On the RX 9070 XT, 20 repeats of startup_compute_dispatch_hardware (80 processes) all exited 0, so it looks adapter-dependent rather than absent. I'd take his fix, which matches how the draw path deliberately leaks its Translation*.
  • P3:
    • Stale docs: the "Startup list Dispatch" text in docs/experiments.md still says slots 35, 37 and 39 have no handler.
    • Graphics slot 40: d3d12_draw.inl:2416-2419 routes it through the shared Store, which #1975's current head reverted ("graphics slot 40 keeps its own words").
  • Stack: git merge-tree of #1975's current head 9828b5d8 onto this branch conflicts in CMakeLists.txt, root_constant_store.h and tests/startup_root_constant_store.cpp. #1974's 8a4df523 conflicts in d3d12_xs_device.cpp and mesh86_cache.inl. That agrees with R0Y00's request to land the prerequisites in order or stack only what's needed.
  • Not opt-in: in render mode, translated Dispatch runs whenever the cache holds a stage cs result. Under the merge scope, the final candidate needs an executable run. I can do that on the RX 9070 XT once the stack is settled.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6064655767 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2470#pullrequestreview-6064655767). Originally posted by [MasterDomino](https://github.com/MasterDomino) on 2026-11-25T20:39:06Z. **Review:** COMMENTED --- Review of `b49c7380` (comment only). This adds evidence to @R0Y00's 19:30 requests; it doesn't add process. ### Runs (Windows 11 build 26300; AMD Radeon RX 9070 XT 1002:7550, driver 32.0.32029.2010; WARP 10.0.26100.9818; debug layer enabled by the fixture) ```powershell ctest --preset dev --no-tests=error -j1 -R '^startup_compute_dispatch_(warp|hardware)$' -V ctest --preset dev --no-tests=error -j1 -R 'startup_list_dispatch|startup_compute|startup_root_constant|startup_gfx2hlsl_compute|startup_indirect|era_heap|desktop_root_signature|startup_stream|docs_links|startup_draw|startup_logical' ``` - **New tests:** 2/2 pass, with no debug messages. - **The neighbour filter from the description:** 182 selected, 180 passed, 0 failed, 2 capability skips (`startup_logical_view_*`). ### Mutants confirm R0Y00's open requests Each mutant is one line, rebuilt, run against `^startup_(compute_dispatch_warp|compute_root|root_constant_store|list_dispatch.*)$`, then restored: | mutant | result | |---|---| | slot 37 handler made a no-op (`d3d12_draw.inl:2427`) | **survives**: the fixture only calls slot 39 (`tests/startup_stream_consumer.cpp:217`), so the readback doesn't depend on both 37 and 39 | | no clear of the compute constants on a root change (`d3d12_xs_device.cpp:2505`) | **survives**: there's no root-change or Reset control at GPU level | | every entry value reads `uds[0]` (`d3d12_compute_dispatch.inl:181`) | caught (`word=1 … 287 words differ`) | | root-mismatch refusal off (`d3d12_compute_dispatch.inl:101`) | **survives** | | output-is-also-an-input refusal off (`:146`) | **survives** | The first two are direct evidence for R0Y00's #1975 requests: a slot 37 plus slot 39 readback, and root-change/Reset controls. A never-set word also reads as 0 (`:181`), with no missing-word control. #1975's current head has `is_bound()` for this, but this branch still carries `033f40cd`. ### Additional findings - **P2: two refusals no test pins**, the last two rows above. Scenario for `:146`: a title passes one buffer as both input and output, the call is accepted, and the buffer is bound as SRV and UAV at once. One fixture case for each would pin them. Also, `:146` compares `ID3D12Resource*` pointers only, so two placed aliases over the same memory aren't detected (P3). - **P2: process-exit release.** @RavenCurseBurg isolated the RTX 4060 `0xc0000005` exits to releasing the cached desktop PSO during static destruction, and has an 18-line fix on this base (`7a8d9c89`). On the RX 9070 XT, 20 repeats of `startup_compute_dispatch_hardware` (80 processes) all exited 0, so it looks adapter-dependent rather than absent. I'd take his fix, which matches how the draw path deliberately leaks its `Translation*`. - **P3:** - **Stale docs:** the "Startup list Dispatch" text in `docs/experiments.md` still says slots 35, 37 and 39 have no handler. - **Graphics slot 40:** `d3d12_draw.inl:2416-2419` routes it through the shared `Store`, which #1975's current head reverted ("graphics slot 40 keeps its own words"). - **Stack:** `git merge-tree` of #1975's current head `9828b5d8` onto this branch conflicts in `CMakeLists.txt`, `root_constant_store.h` and `tests/startup_root_constant_store.cpp`. #1974's `8a4df523` conflicts in `d3d12_xs_device.cpp` and `mesh86_cache.inl`. That agrees with R0Y00's request to land the prerequisites in order or stack only what's needed. - **Not opt-in:** in render mode, translated Dispatch runs whenever the cache holds a `stage cs` result. Under the merge scope, the final candidate needs an executable run. I can do that on the RX 9070 XT once the stack is settled. AI-assisted; commands listed were executed locally.
NiiRoZz commented 2026-11-25 21:01:35 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by NiiRoZz on 2026-11-25T20:55:29Z.


Reworked as the reviews asked. Head 1f5fb5e4.

What the branch is built on now

  • Merged forward (no rebase) onto the current heads of the slot 14 Dispatch decision (#1974, 8a4df523) and the root-constant store (#1975, 9828b5d8); the slot 33/35 recording comes from #1803. The old #1975 snapshot is gone: root_constant_store.h and its test are byte-for-byte #1975's.
  • This PR consumes from those three: the compute root wrapper and table recording (slot 33/35), the Dispatch decision header, and x2w_root_constants::Store with is_bound. Their authors' commits are kept as they are. @R0Y00 how do you want them landed: reopened and merged first with this stacked on top, or carried here? I will not open replacement PRs for someone else's work.

Changes

  • Slot 40 is main's again: graphics words stay in Pass::constants; only slots 37 and 39 write the compute store.
  • A Dispatch whose manifest names a word that no slot 37/39 call wrote since the compute root was set is refused with an entry value was not set since the compute root (it used to read 0).
  • The fixture now passes word 0 through slot 37 and word 1 through slot 39, with other values written through slot 40 in between, so the GPU readback depends on both slots and on the two stores being separate.
  • New controls in startup_compute_dispatch_check.py: dispatch-missing-word, dispatch-root-changed (another root, then the first again), dispatch-same-root (must still give the 320 expected words), dispatch-reset (close + reset), dispatch-wrong-root, dispatch-same-buffer. Each refusal must log its one reason and leave every output word at its sentinel.
  • Docs: the duplicated "Startup list Dispatch" section is removed and the stale sentence about the root-argument slots corrected.
  • Process-exit fault: cherry-picked @RavenCurseBurg's 7a8d9c89 with its author. I could not reproduce the fault on my adapter, so the evidence for it is their 30/30 runs, not mine.

Mutants (each applied alone, stand-in rebuilt, startup_compute_dispatch_warp rerun; not committed)

Mutant Result
slot 37 is a no-op red: word=0 got=c5c5c5c5 expected=ea74e376 (288 words differ)
no clear when another compute root is set red: dispatch-root-changed: a refused Dispatch wrote the output
root-mismatch refusal off red: dispatch-wrong-root: a refused Dispatch wrote the output
output-is-input refusal off red: dispatch-same-buffer: a refused Dispatch wrote the output
slot 40 also writes the compute store red: word=0 got=35fa18fe expected=ea74e376 (288 words differ)

Measured

ctest --preset dev --no-tests=error -R '^startup_compute_dispatch_|startup_root_constant_store|startup_list_dispatch|startup_compute_root|startup_stream'

28/28 passed, no skip. startup_compute_dispatch_warp: Microsoft Basic Render Driver 10.0.26100.10068. startup_compute_dispatch_hardware: NVIDIA GeForce RTX 5090, driver 32.0.16.2135. Windows build 26300.10075, debug layer enabled, no error or corruption message. git diff --check against main is clean.

Not done / not checked

  • Whether slot 33 still performs main's desktop bind in every case asked for on #1803: not re-verified in this push beyond the tests above.
  • Output/input overlap is detected for the same placed buffer only, not for two placements that alias the same memory.
  • No new validation was added beyond pinning the refusals that already existed.

🤖 Generated with Claude Code

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7174374022 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2470#issuecomment-7174374022). Originally posted by [NiiRoZz](https://github.com/NiiRoZz) on 2026-11-25T20:55:29Z. --- Reworked as the reviews asked. Head `1f5fb5e4`. **What the branch is built on now** - Merged forward (no rebase) onto the current heads of the slot 14 Dispatch decision (#1974, `8a4df523`) and the root-constant store (#1975, `9828b5d8`); the slot 33/35 recording comes from #1803. The old #1975 snapshot is gone: `root_constant_store.h` and its test are byte-for-byte #1975's. - This PR consumes from those three: the compute root wrapper and table recording (slot 33/35), the Dispatch decision header, and `x2w_root_constants::Store` with `is_bound`. Their authors' commits are kept as they are. @R0Y00 how do you want them landed: reopened and merged first with this stacked on top, or carried here? I will not open replacement PRs for someone else's work. **Changes** - Slot 40 is main's again: graphics words stay in `Pass::constants`; only slots 37 and 39 write the compute store. - A Dispatch whose manifest names a word that no slot 37/39 call wrote since the compute root was set is refused with `an entry value was not set since the compute root` (it used to read 0). - The fixture now passes word 0 through slot 37 and word 1 through slot 39, with other values written through slot 40 in between, so the GPU readback depends on both slots and on the two stores being separate. - New controls in `startup_compute_dispatch_check.py`: `dispatch-missing-word`, `dispatch-root-changed` (another root, then the first again), `dispatch-same-root` (must still give the 320 expected words), `dispatch-reset` (close + reset), `dispatch-wrong-root`, `dispatch-same-buffer`. Each refusal must log its one reason and leave every output word at its sentinel. - Docs: the duplicated "Startup list Dispatch" section is removed and the stale sentence about the root-argument slots corrected. - Process-exit fault: cherry-picked @RavenCurseBurg's `7a8d9c89` with its author. I could not reproduce the fault on my adapter, so the evidence for it is their 30/30 runs, not mine. **Mutants** (each applied alone, stand-in rebuilt, `startup_compute_dispatch_warp` rerun; not committed) | Mutant | Result | |---|---| | slot 37 is a no-op | red: `word=0 got=c5c5c5c5 expected=ea74e376 (288 words differ)` | | no clear when another compute root is set | red: `dispatch-root-changed: a refused Dispatch wrote the output` | | root-mismatch refusal off | red: `dispatch-wrong-root: a refused Dispatch wrote the output` | | output-is-input refusal off | red: `dispatch-same-buffer: a refused Dispatch wrote the output` | | slot 40 also writes the compute store | red: `word=0 got=35fa18fe expected=ea74e376 (288 words differ)` | **Measured** ```powershell ctest --preset dev --no-tests=error -R '^startup_compute_dispatch_|startup_root_constant_store|startup_list_dispatch|startup_compute_root|startup_stream' ``` 28/28 passed, no skip. `startup_compute_dispatch_warp`: Microsoft Basic Render Driver 10.0.26100.10068. `startup_compute_dispatch_hardware`: NVIDIA GeForce RTX 5090, driver 32.0.16.2135. Windows build 26300.10075, debug layer enabled, no error or corruption message. `git diff --check` against main is clean. **Not done / not checked** - Whether slot 33 still performs main's desktop bind in every case asked for on #1803: not re-verified in this push beyond the tests above. - Output/input overlap is detected for the same placed buffer only, not for two placements that alias the same memory. - No new validation was added beyond pinning the refusals that already existed. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MasterDomino commented 2026-11-25 21:33:39 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-25T21:33:39Z.

Review: COMMENTED


Re-review of 1f5fb5e4 (comment only). Every point from my b49c7380 review is addressed; the merge order is @R0Y00's call (21:15 note).

Runs (Windows 11 build 26300; AMD Radeon RX 9070 XT, driver 32.0.32029.2010; WARP 10.0.26100.9818; debug layer enabled by the fixture)

ctest --preset dev --no-tests=error -j1 -R '^startup_compute_dispatch_(warp|hardware)$' -V
ctest --preset dev --no-tests=error -j1 -R 'startup_list_dispatch|startup_compute|startup_root_constant|startup_gfx2hlsl_compute|startup_indirect|era_heap|desktop_root_signature|startup_stream|docs_links|startup_draw|startup_logical'
  • New tests: 2/2 pass, with no debug messages.
  • Neighbour filter: 182 selected, 180 passed, 0 failed, 2 capability skips (startup_logical_view_*).

Mutants (one line each, rebuilt, restored; ^startup_(compute_dispatch_warp|compute_root|root_constant_store|list_dispatch.*)$)

mutant result
slot 37 handler a no-op caught (word=0 got=c5c5c5c5, 288 words differ)
slot 37 stores value ^ 1 caught (word=0 got=ea74e377)
slot 39 stores data ^ 1 caught (word=1 got=748490fd)
no clear on a compute root change caught (dispatch-root-changed)
Close keeps the compute constants caught (dispatch-reset)
missing-word refusal off caught (dispatch-missing-word)
root-mismatch refusal off caught (dispatch-wrong-root)
output-is-input refusal off caught (dispatch-same-buffer)
graphics slot 40 also writes the compute store caught (word=0 got=35fa18fe)
exit-time Detach skipped (c821b4b2) survives here, as expected: this adapter never showed the exit fault. The evidence for the fix is @RavenCurseBurg's RTX 4060 runs.

So the readback now depends on both slot 37 and slot 39 by value, and the missing-word, root-change, Reset and slot 40 controls requested on #1975 are pinned at GPU level. The two refusals that survived before are pinned too.

Stack

  • #1803 (9c87260b), #1974 (8a4df523) and #1975 (9828b5d8) are all ancestors of this head. The new headers and their tests are byte-identical to those heads.
  • Apart from the corrected docs sentence and one renamed local in mesh86_cache.inl, every line those patches add is here.
  • This branch merges cleanly onto current main. #1803 and #1975 do too. #1974 has a one-line conflict with main in build_tables (list_typed[14] next to the new list_typed[16]).

P3

  • list_compute_root sets compute_srv_bound and compute_root_has_arguments twice (d3d12_xs_device.cpp:2513-2515 and :2520-2522). One copy comes from each #1974 snapshot. It's harmless, but worth dropping when the branch is trimmed.
  • The description still names aca6e895, the old snapshots and "redo the #1975 merge"; worth refreshing with the trim.

Merge readiness

  • No title start-up progress is claimed.
  • Translated Dispatch runs in render mode whenever the cache holds a stage cs result, so the trimmed candidate needs an executable run before merge. I can do that on the RX 9070 XT once the prerequisites land.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6065277757 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2470#pullrequestreview-6065277757). Originally posted by [MasterDomino](https://github.com/MasterDomino) on 2026-11-25T21:33:39Z. **Review:** COMMENTED --- Re-review of `1f5fb5e4` (comment only). Every point from my `b49c7380` review is addressed; the merge order is @R0Y00's call (21:15 note). ### Runs (Windows 11 build 26300; AMD Radeon RX 9070 XT, driver 32.0.32029.2010; WARP 10.0.26100.9818; debug layer enabled by the fixture) ```powershell ctest --preset dev --no-tests=error -j1 -R '^startup_compute_dispatch_(warp|hardware)$' -V ctest --preset dev --no-tests=error -j1 -R 'startup_list_dispatch|startup_compute|startup_root_constant|startup_gfx2hlsl_compute|startup_indirect|era_heap|desktop_root_signature|startup_stream|docs_links|startup_draw|startup_logical' ``` - **New tests:** 2/2 pass, with no debug messages. - **Neighbour filter:** 182 selected, 180 passed, 0 failed, 2 capability skips (`startup_logical_view_*`). ### Mutants (one line each, rebuilt, restored; `^startup_(compute_dispatch_warp|compute_root|root_constant_store|list_dispatch.*)$`) | mutant | result | |---|---| | slot 37 handler a no-op | caught (`word=0 got=c5c5c5c5`, 288 words differ) | | slot 37 stores `value ^ 1` | caught (`word=0 got=ea74e377`) | | slot 39 stores `data ^ 1` | caught (`word=1 got=748490fd`) | | no clear on a compute root change | caught (`dispatch-root-changed`) | | Close keeps the compute constants | caught (`dispatch-reset`) | | missing-word refusal off | caught (`dispatch-missing-word`) | | root-mismatch refusal off | caught (`dispatch-wrong-root`) | | output-is-input refusal off | caught (`dispatch-same-buffer`) | | graphics slot 40 also writes the compute store | caught (`word=0 got=35fa18fe`) | | exit-time Detach skipped (`c821b4b2`) | survives here, as expected: this adapter never showed the exit fault. The evidence for the fix is @RavenCurseBurg's RTX 4060 runs. | So the readback now depends on both slot 37 and slot 39 by value, and the missing-word, root-change, Reset and slot 40 controls requested on #1975 are pinned at GPU level. The two refusals that survived before are pinned too. ### Stack - #1803 (`9c87260b`), #1974 (`8a4df523`) and #1975 (`9828b5d8`) are all ancestors of this head. The new headers and their tests are byte-identical to those heads. - Apart from the corrected docs sentence and one renamed local in `mesh86_cache.inl`, every line those patches add is here. - This branch merges cleanly onto current `main`. #1803 and #1975 do too. #1974 has a one-line conflict with `main` in `build_tables` (`list_typed[14]` next to the new `list_typed[16]`). ### P3 - `list_compute_root` sets `compute_srv_bound` and `compute_root_has_arguments` twice (`d3d12_xs_device.cpp:2513-2515` and `:2520-2522`). One copy comes from each #1974 snapshot. It's harmless, but worth dropping when the branch is trimmed. - The description still names `aca6e895`, the old snapshots and "redo the #1975 merge"; worth refreshing with the trim. ### Merge readiness - No title start-up progress is claimed. - Translated Dispatch runs in render mode whenever the cache holds a `stage cs` result, so the trimmed candidate needs an executable run before merge. I can do that on the RX 9070 XT once the prerequisites land. AI-assisted; commands listed were executed locally.
R0Y00 commented 2026-11-25 22:02:17 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T21:15:27Z.


Let's land the original prerequisite PRs with their existing authorship. @tedin7, please reopen #1803 and #1974 when their current heads are ready. Start with #1803's slot 33/35 recording and heap/root invalidation. Keep the already-supported desktop slot-33 bind. Then verify native slot 14 in #1974, and review #1975's slot 37/39 store with this exact translated consumer before landing the two in order. Once those commits land, trim #2470 to its own delta and re-run the shared fixtures.

For the combined review, keep both one-word and multiword updates, slot 40 isolation, unset word and root change, the native versus translated dispatch split, and the RTX teardown check. #2492 remains the separate GPU-written indirect follow-up to this base. Please keep the new slot-35/37/39/45 implementation in #2491 out of the dependency chain until its separate native binding review is resolved.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7174826427 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2470#issuecomment-7174826427). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-25T21:15:27Z. --- Let's land the original prerequisite PRs with their existing authorship. @tedin7, please reopen #1803 and #1974 when their current heads are ready. Start with #1803's slot 33/35 recording and heap/root invalidation. Keep the already-supported desktop slot-33 bind. Then verify native slot 14 in #1974, and review #1975's slot 37/39 store with this exact translated consumer before landing the two in order. Once those commits land, trim #2470 to its own delta and re-run the shared fixtures. For the combined review, keep both one-word and multiword updates, slot 40 isolation, unset word and root change, the native versus translated dispatch split, and the RTX teardown check. #2492 remains the separate GPU-written indirect follow-up to this base. Please keep the new slot-35/37/39/45 implementation in #2491 out of the dependency chain until its separate native binding review is resolved.
NiiRoZz commented 2026-11-25 22:02:21 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by NiiRoZz on 2026-11-25T21:46:20Z.


Small follow-up. Head f5b03039.

Changed

  • list_compute_root cleared compute_srv_bound and set compute_root_has_arguments twice. The second copy came from our merge of the second #1974 snapshot; it is gone now. Thanks @MasterDomino for spotting it.
  • The RTX teardown fix is unchanged: @RavenCurseBurg's 7a8d9c89 is on the branch as c821b4b2, with its author and identical content. Their DllMain sets the flag only when DLL_PROCESS_DETACH comes with a non-null reserved argument, which means the process is terminating. The CRT calls DllMain before it runs the static destructors, so the cache detaches its PSO and root only during process exit. An explicit unload still releases both.
  • Nothing from #1803, #1974 or #1975 has landed yet, so the branch is not trimmed and main was not merged in again.

Measured (Windows 11 build 26300.10075, debug layer on, no error or corruption message)

cmake --build --preset dev --target startup_stream_consumer
ctest --preset dev --no-tests=error -j1 -R "^startup_compute_dispatch_" -V
  • startup_compute_dispatch_warp: passed, Microsoft Basic Render Driver 10.0.26100.10068.
  • startup_compute_dispatch_hardware: passed, NVIDIA GeForce RTX 5090, driver 32.0.16.2135.
  • No skips.
  • startup_compute_dispatch_hardware was also run 10 times in a row, and all 10 passed. Each run starts 10 consumer processes and checks that each one exits with 0, so 100 of 100 processes exited 0. This adapter never showed the exit fault, so this only shows the fix causes no regression here. The evidence that it fixes the fault is still @RavenCurseBurg's RTX 4060 runs.

Not rerun

  • The wider neighbour filter. The change only deletes a repeated assignment.
  • No executable run.

Still open

  • Trimming the branch to its own delta and rerunning the shared fixtures after the prerequisites land, as @R0Y00 asked.
  • The description still names the old snapshots and aca6e895. It will be refreshed with the trim.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7175518122 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2470#issuecomment-7175518122). Originally posted by [NiiRoZz](https://github.com/NiiRoZz) on 2026-11-25T21:46:20Z. --- Small follow-up. Head `f5b03039`. **Changed** - `list_compute_root` cleared `compute_srv_bound` and set `compute_root_has_arguments` twice. The second copy came from our merge of the second #1974 snapshot; it is gone now. Thanks @MasterDomino for spotting it. - The RTX teardown fix is unchanged: @RavenCurseBurg's `7a8d9c89` is on the branch as `c821b4b2`, with its author and identical content. Their `DllMain` sets the flag only when `DLL_PROCESS_DETACH` comes with a non-null reserved argument, which means the process is terminating. The CRT calls `DllMain` before it runs the static destructors, so the cache detaches its PSO and root only during process exit. An explicit unload still releases both. - Nothing from #1803, #1974 or #1975 has landed yet, so the branch is not trimmed and `main` was not merged in again. **Measured** (Windows 11 build 26300.10075, debug layer on, no error or corruption message) ```powershell cmake --build --preset dev --target startup_stream_consumer ctest --preset dev --no-tests=error -j1 -R "^startup_compute_dispatch_" -V ``` - `startup_compute_dispatch_warp`: passed, Microsoft Basic Render Driver 10.0.26100.10068. - `startup_compute_dispatch_hardware`: passed, NVIDIA GeForce RTX 5090, driver 32.0.16.2135. - No skips. - `startup_compute_dispatch_hardware` was also run 10 times in a row, and all 10 passed. Each run starts 10 consumer processes and checks that each one exits with 0, so 100 of 100 processes exited 0. This adapter never showed the exit fault, so this only shows the fix causes no regression here. The evidence that it fixes the fault is still @RavenCurseBurg's RTX 4060 runs. **Not rerun** - The wider neighbour filter. The change only deletes a repeated assignment. - No executable run. **Still open** - Trimming the branch to its own delta and rerunning the shared fixtures after the prerequisites land, as @R0Y00 asked. - The description still names the old snapshots and `aca6e895`. It will be refreshed with the trim.
MasterDomino commented 2026-11-25 22:02:21 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-25T21:47:23Z.


Thanks, @NiiRoZz. I checked f5b03039 against my reviewed head 1f5fb5e4. The only change is the 3-line deletion in list_compute_root (d3d12_xs_device.cpp), which drops the second copy of the compute_srv_bound / compute_root_has_arguments reset. The code between the two copies only touches the binding trace, so behaviour is the same and my P3 is resolved. I didn't rebuild for a pure deletion of a repeated assignment.

What's left is unchanged: land #1803, #1974 and #1975 first, then trim this branch, rerun the shared fixtures, and do an executable run on the trimmed candidate, per @R0Y00's 21:15 note.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7175540955 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2470#issuecomment-7175540955). Originally posted by [MasterDomino](https://github.com/MasterDomino) on 2026-11-25T21:47:23Z. --- Thanks, @NiiRoZz. I checked `f5b03039` against my reviewed head `1f5fb5e4`. The only change is the 3-line deletion in `list_compute_root` (`d3d12_xs_device.cpp`), which drops the second copy of the `compute_srv_bound` / `compute_root_has_arguments` reset. The code between the two copies only touches the binding trace, so behaviour is the same and my P3 is resolved. I didn't rebuild for a pure deletion of a repeated assignment. What's left is unchanged: land #1803, #1974 and #1975 first, then trim this branch, rerun the shared fixtures, and do an executable run on the trimmed candidate, per @R0Y00's 21:15 note. AI-assisted.
MasterDomino commented 2026-11-25 23:02:05 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-25T22:29:17Z.


@NiiRoZz: #1803 has landed. In approving it, @R0Y00 added one requirement for this PR before it lands: an end-to-end control for the slot-35 table offset and its invalidation at the real Dispatch. My #1803 mutants show why the current fixtures miss it. A dropped descriptor offset, a missing clear on a compute root change and a missing clear on a view heap change all pass startup_compute_dispatch_*:

  • the table is bound at the heap start;
  • the root-change and reset controls bind slot 35 again, and refuse on the entry values before the tables are read;
  • no mode changes the view heap.

What would close it:

  • Nonzero descriptor index: write the descriptors at index ≥1 and pass gpu + k*increment to slot 35. A dropped offset then reads the wrong table.
  • Root change: set slot 35, change the compute root, set the constants again without slot 35 and Dispatch. Expected: refused with "a table descriptor is not bound" and the output untouched.
  • View heap change: the same, with slot 32 set to a different view heap.

Worth adding with the trim. I can rerun the mutants against the new fixture once it's pushed.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7176422678 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2470#issuecomment-7176422678). Originally posted by [MasterDomino](https://github.com/MasterDomino) on 2026-11-25T22:29:17Z. --- @NiiRoZz: #1803 has landed. In approving it, @R0Y00 added one requirement for this PR before it lands: an end-to-end control for the slot-35 table offset and its invalidation at the real Dispatch. My #1803 mutants show why the current fixtures miss it. A dropped descriptor offset, a missing clear on a compute root change and a missing clear on a view heap change all pass `startup_compute_dispatch_*`: - the table is bound at the heap start; - the root-change and reset controls bind slot 35 again, and refuse on the entry values before the tables are read; - no mode changes the view heap. What would close it: - **Nonzero descriptor index:** write the descriptors at index ≥1 and pass `gpu + k*increment` to slot 35. A dropped offset then reads the wrong table. - **Root change:** set slot 35, change the compute root, set the constants again **without** slot 35 and Dispatch. Expected: refused with "a table descriptor is not bound" and the output untouched. - **View heap change:** the same, with slot 32 set to a different view heap. Worth adding with the trim. I can rerun the mutants against the new fixture once it's pushed. AI-assisted.
chasegrindy commented 2026-11-25 23:02:08 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chasegrindy on 2026-11-25T22:57:36Z.


I tried the three slot-35 controls suggested in the review against f5b0303944b8697f763e54978e25ddf986382ebb. The heap-change case exposed an existing failure on both RX 7900 XTX and WARP: with two ordinary shader-visible CBV/SRV/UAV heaps, switching heaps after slot 35 still ran the translated Dispatch through the old table. 288 of 320 output words changed; all 320 should have stayed at the sentinel.

The slot 32 recorder only recognized the view heap for invalidation when its logical capacity exceeded the desktop capacity. The fix tracks the compute view-heap identity independently for ordinary and oversized heaps, keeps the old graphics lookup policy, and preserves slot 35 when the same heap is set again. No changes to shader translation or the #2470 dependency chain.

Check through real translated Dispatch Without the relevant behavior With the fix
Nonzero index 2, swapped descriptors at index 0 Ignoring the offset: 288 words differ All 320 match the CPU reference
Switch compute root and back; restore constants, not slot 35 Disabling invalidation: 288 words change Exact a table descriptor is not bound refusal; all 320 unchanged
Switch ordinary view heap; do not rebind slot 35 Unmodified runtime: 288 words change on both adapters Same exact refusal; all 320 unchanged

Release on Windows 26300.9974, MSVC 19.44.35229 / SDK 10.0.26100.0: the stacked run passed 9/9 (RX 7900 XTX 32.0.32015.7029 and WARP 10.0.26100.9818, debug layer initialization reported in the translated baseline; no error/corruption messages in the new cases). All three one-at-a-time mutations failed their intended assertion on WARP; the restored build passed again. The separate recorder patch builds against main at 2a14c0d7cb38d2e6653515d16e386241453e62c1 and passes both CPU tests there. The end-to-end consumer is on #2470, not main.

Retest on the updated head 5e185ab7: the same source-built fixture reproduced the 288-word write on both adapters without the fix. With the same patch applied, startup_compute_dispatch_warp and startup_compute_dispatch_hardware both passed (2/2, no skips). The 9/9 run and the mutation results above refer to the earlier head.

cmake --build <build> --config Release --target startup_stream_consumer offscreen_check startup_compute_root startup_logical_view_table_check
$env:XBOX2WINDOWS_ADAPTER = 'AMD Radeon RX 7900 XTX'
ctest --test-dir <build> -C Release --no-tests=error -j 1 -R '^startup_(compute_dispatch_(warp|hardware)|compute_root|logical_view_table|compute_translate_(requests|e2e_(warp|hardware)|e2e_wrong_group_(warp|hardware)))$' -V

I’m posting here rather than opening a competing PR because this is already a review requirement for #2470, and the translated Dispatch fixture depends on this branch. I have the recorder fix and the test in separate patches. Would you prefer the recorder fix against main, with the fixture carried in the trimmed #2470? All inputs are synthetic and compiled from source.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7176984089 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2470#issuecomment-7176984089). Originally posted by [chasegrindy](https://github.com/chasegrindy) on 2026-11-25T22:57:36Z. --- I tried the three slot-35 controls suggested in [the review](https://github.com/R0Y00/Xbox2Windows/pull/2470#issuecomment-7176422678) against `f5b0303944b8697f763e54978e25ddf986382ebb`. The heap-change case exposed an existing failure on both RX 7900 XTX and WARP: with two ordinary shader-visible CBV/SRV/UAV heaps, switching heaps after slot 35 still ran the translated Dispatch through the old table. **288 of 320 output words changed**; all 320 should have stayed at the sentinel. The slot 32 recorder only recognized the view heap for invalidation when its logical capacity exceeded the desktop capacity. The fix tracks the compute view-heap identity independently for ordinary and oversized heaps, keeps the old graphics lookup policy, and preserves slot 35 when the same heap is set again. No changes to shader translation or the #2470 dependency chain. | Check through real translated Dispatch | Without the relevant behavior | With the fix | | --- | --- | --- | | Nonzero index 2, swapped descriptors at index 0 | Ignoring the offset: 288 words differ | All 320 match the CPU reference | | Switch compute root and back; restore constants, not slot 35 | Disabling invalidation: 288 words change | Exact `a table descriptor is not bound` refusal; all 320 unchanged | | Switch ordinary view heap; do not rebind slot 35 | Unmodified runtime: 288 words change on both adapters | Same exact refusal; all 320 unchanged | Release on Windows 26300.9974, MSVC 19.44.35229 / SDK 10.0.26100.0: the stacked run passed 9/9 (RX 7900 XTX `32.0.32015.7029` and WARP `10.0.26100.9818`, debug layer initialization reported in the translated baseline; no error/corruption messages in the new cases). All three one-at-a-time mutations failed their intended assertion on WARP; the restored build passed again. The separate recorder patch builds against `main` at `2a14c0d7cb38d2e6653515d16e386241453e62c1` and passes both CPU tests there. The end-to-end consumer is on #2470, not `main`. Retest on the updated head [`5e185ab7`](https://github.com/NiiRoZz/Xbox2Windows/commit/5e185ab7df261b7574e92eca77df063b69bb0ba5): the same source-built fixture reproduced the 288-word write on both adapters without the fix. With the same patch applied, `startup_compute_dispatch_warp` and `startup_compute_dispatch_hardware` both passed (2/2, no skips). The 9/9 run and the mutation results above refer to the earlier head. ```powershell cmake --build <build> --config Release --target startup_stream_consumer offscreen_check startup_compute_root startup_logical_view_table_check $env:XBOX2WINDOWS_ADAPTER = 'AMD Radeon RX 7900 XTX' ctest --test-dir <build> -C Release --no-tests=error -j 1 -R '^startup_(compute_dispatch_(warp|hardware)|compute_root|logical_view_table|compute_translate_(requests|e2e_(warp|hardware)|e2e_wrong_group_(warp|hardware)))$' -V ``` I’m posting here rather than opening a competing PR because this is already a review requirement for #2470, and the translated Dispatch fixture depends on this branch. I have the recorder fix and the test in separate patches. Would you prefer the recorder fix against `main`, with the fixture carried in the trimmed #2470? All inputs are synthetic and compiled from source. AI-assisted.
tedin7 commented 2026-11-25 23:02:09 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T22:58:21Z.


@MasterDomino @NiiRoZz: the prerequisite chain is ready, each with a fresh head, green CI and a Win2025 WARP dev+release receipt on that exact head:

  • #1803: landed on main (4ce2931d).
  • #1974: head d2c7782f.
  • #1975: head cc2b5e35.

#2470 can proceed once #1974 and #1975 are merged in that order.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7176998234 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2470#issuecomment-7176998234). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T22:58:21Z. --- @MasterDomino @NiiRoZz: the prerequisite chain is ready, each with a fresh head, green CI and a Win2025 WARP dev+release receipt on that exact head: - #1803: landed on `main` (`4ce2931d`). - #1974: head `d2c7782f`. - #1975: head `cc2b5e35`. #2470 can proceed once #1974 and #1975 are merged in that order. AI-assisted; commands listed were executed locally.
MasterDomino commented 2026-11-26 00:01:09 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-25T23:07:00Z.


Thanks, @chasegrindy, that's a real gap, and it fits what I saw on #1803: the mutant that removes the heap-change clear in slot 32 survived every fixture. Now that #1803 is on main, the bug is in main.

On where it goes, I'd say:

  • The recorder fix as its own PR against main, with its CPU tests. It fixes code that's already merged, so it doesn't have to wait for this chain. It should keep the graphics lookup policy as it is, track the compute view heap's identity for both ordinary and oversized heaps, and keep slot 35 when the same heap is set again, as you describe.
  • The three Dispatch controls carried in the trimmed #2470, since that's where the real consumer is: the nonzero index with swapped descriptors, root change and back, and the ordinary view-heap switch. That's the end-to-end requirement @R0Y00 set before #2470 lands. If @NiiRoZz agrees, your fixture patch could go onto his branch once the recorder fix is on main.

@R0Y00, does that split work for you? Once both are up, I can rerun the mutants on the RX 9070 XT.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7177164883 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2470#issuecomment-7177164883). Originally posted by [MasterDomino](https://github.com/MasterDomino) on 2026-11-25T23:07:00Z. --- Thanks, @chasegrindy, that's a real gap, and it fits what I saw on #1803: the mutant that removes the heap-change clear in slot 32 survived every fixture. Now that #1803 is on `main`, the bug is in `main`. On where it goes, I'd say: - **The recorder fix as its own PR against `main`**, with its CPU tests. It fixes code that's already merged, so it doesn't have to wait for this chain. It should keep the graphics lookup policy as it is, track the compute view heap's identity for both ordinary and oversized heaps, and keep slot 35 when the same heap is set again, as you describe. - **The three Dispatch controls carried in the trimmed #2470**, since that's where the real consumer is: the nonzero index with swapped descriptors, root change and back, and the ordinary view-heap switch. That's the end-to-end requirement @R0Y00 set before #2470 lands. If @NiiRoZz agrees, your fixture patch could go onto his branch once the recorder fix is on `main`. @R0Y00, does that split work for you? Once both are up, I can rerun the mutants on the RX 9070 XT. AI-assisted.
R0Y00 commented 2026-11-26 00:01:11 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T23:21:13Z.


Yes, please use that split. The recorder fix can go directly against main and keep graphics lookup unchanged. Its controls should cover ordinary and oversized view heaps, preserving slot 35 when the same heap is rebound and invalidating it when another heap is selected. In the trimmed #2470 consumer, keep the fenced nonzero/swapped descriptor readbacks plus root-change-and-back and ordinary heap-change cases that restore constants without restoring the table. Please coordinate the fixture commit with @NiiRoZz and preserve its authorship. #1974’s native forwarding fixture and the existing merge order still apply.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7177445088 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2470#issuecomment-7177445088). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-25T23:21:13Z. --- Yes, please use that split. The recorder fix can go directly against `main` and keep graphics lookup unchanged. Its controls should cover ordinary and oversized view heaps, preserving slot 35 when the same heap is rebound and invalidating it when another heap is selected. In the trimmed #2470 consumer, keep the fenced nonzero/swapped descriptor readbacks plus root-change-and-back and ordinary heap-change cases that restore constants without restoring the table. Please coordinate the fixture commit with @NiiRoZz and preserve its authorship. #1974’s native forwarding fixture and the existing merge order still apply.
chasegrindy commented 2026-11-26 00:01:14 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chasegrindy on 2026-11-25T23:58:04Z.


Thanks, @R0Y00 and @MasterDomino. The recorder fix and its CPU tests are in #2636; the Dispatch tests are separate.

@NiiRoZz, are you already working on the three slot-35 Dispatch checks? If not, I can send a test-only commit for you to cherry-pick after the recorder fix lands on main. On 9caf8fd5, the three checks passed on RX 7900 XTX and WARP with the recorder fix applied. The fixture does not touch #1974’s forwarding path.

AI-assisted (GPT-6.2-sol). Tests ran locally with synthetic inputs.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7178251949 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2470#issuecomment-7178251949). Originally posted by [chasegrindy](https://github.com/chasegrindy) on 2026-11-25T23:58:04Z. --- Thanks, @R0Y00 and @MasterDomino. The recorder fix and its CPU tests are in [#2636](https://github.com/R0Y00/Xbox2Windows/pull/2636); the Dispatch tests are separate. @NiiRoZz, are you already working on the three slot-35 Dispatch checks? If not, I can send a test-only commit for you to cherry-pick after the recorder fix lands on `main`. On `9caf8fd5`, the three checks passed on RX 7900 XTX and WARP with the recorder fix applied. The fixture does not touch #1974’s forwarding path. AI-assisted (GPT-6.2-sol). Tests ran locally with synthetic inputs.
tedin7 commented 2026-11-26 00:31:37 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T00:31:37Z.

Review: COMMENTED


Review of head 206749e4 (code and fixture tests only).

Result: no merge from this review. The merge stays with @MasterDomino or @R0Y00. This change claims to move startup forward, and the matched title run on the exact head is still pending. We have no title to run it here.

What I checked:

  • The diff against main is now only the compute delta (8 files, +496/-9). The snapshot copies of #1803, #1974 and #1975 are gone.
  • publish_compute_request now returns the key. Every refusal path returns 0, so a refused request leaves no key on the wrapper.
  • list_dispatch calls dispatch_translated first. The desktop decision of #1974 is untouched for every pipeline that is not a slot 67 placeholder.
  • list_compute_root now clears compute_srv_bound and sets compute_root_has_arguments, so a root change drops stale state.
  • The fixture covers dispatch, dispatch-none and dispatch-swapped (output descriptor without unordered access), so the refusal path has a control that must fail.

Still missing, as @MasterDomino listed above:

  • @chasegrindy's three slot 35 Dispatch controls (fenced nonzero-index readback with swapped descriptors, root change and back, ordinary view heap change).
  • A slot 86 desktop compute PSO case in startup_compute_dispatch_*, to show the translated path leaves it alone.
  • The matched executable run on this exact head.

Commands run on Linux in a worktree at this head:

  • git diff --check origin/main...HEAD (clean)
  • python3 tests/docs_links_check.py (19 files, 507 links)
  • python3 tests/bidi_controls_check.py (clean)
  • python3 tests/startup_compute_dispatch_check.py prints usage only: it needs the Windows-built consumer and dxc. I did not run the mutations.

The head is 3 commits behind main. No Win2025 run was done for this review.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6066932678 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2470#pullrequestreview-6066932678). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-26T00:31:37Z. **Review:** COMMENTED --- Review of head `206749e4` (code and fixture tests only). **Result: no merge from this review. The merge stays with @MasterDomino or @R0Y00.** This change claims to move startup forward, and the matched title run on the exact head is still pending. We have no title to run it here. What I checked: - The diff against `main` is now only the compute delta (8 files, +496/-9). The snapshot copies of #1803, #1974 and #1975 are gone. - `publish_compute_request` now returns the key. Every refusal path returns 0, so a refused request leaves no key on the wrapper. - `list_dispatch` calls `dispatch_translated` first. The desktop decision of #1974 is untouched for every pipeline that is not a slot 67 placeholder. - `list_compute_root` now clears `compute_srv_bound` and sets `compute_root_has_arguments`, so a root change drops stale state. - The fixture covers `dispatch`, `dispatch-none` and `dispatch-swapped` (output descriptor without unordered access), so the refusal path has a control that must fail. Still missing, as @MasterDomino listed above: - @chasegrindy's three slot 35 Dispatch controls (fenced nonzero-index readback with swapped descriptors, root change and back, ordinary view heap change). - A slot 86 desktop compute PSO case in `startup_compute_dispatch_*`, to show the translated path leaves it alone. - The matched executable run on this exact head. Commands run on Linux in a worktree at this head: - `git diff --check origin/main...HEAD` (clean) - `python3 tests/docs_links_check.py` (19 files, 507 links) - `python3 tests/bidi_controls_check.py` (clean) - `python3 tests/startup_compute_dispatch_check.py` prints usage only: it needs the Windows-built consumer and `dxc`. I did not run the mutations. The head is 3 commits behind `main`. No Win2025 run was done for this review. AI-assisted; commands listed were executed locally.
R0Y00 commented 2026-11-26 01:02:09 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-26T00:02:42Z.


The separate slot 35 recorder fix #2636 is on main at 1cd73d3a. The recorder checks passed on WARP and RTX 4060 Laptop, and restoring the old oversized-only filter failed the ordinary-to-ordinary invalidation check. The recorder dependency is ready for the Dispatch fixture handoff in this PR. Please keep the author’s commit when bringing the three controls over. #1974 and #1975 still precede the trimmed #2470 production diff.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7178333977 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2470#issuecomment-7178333977). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-26T00:02:42Z. --- The separate slot 35 recorder fix [#2636](https://github.com/R0Y00/Xbox2Windows/pull/2636) is on `main` at `1cd73d3a`. The recorder checks passed on WARP and RTX 4060 Laptop, and restoring the old oversized-only filter failed the ordinary-to-ordinary invalidation check. The recorder dependency is ready for the Dispatch fixture handoff in this PR. Please keep the author’s commit when bringing the three controls over. #1974 and #1975 still precede the trimmed #2470 production diff.
MasterDomino commented 2026-11-26 01:02:10 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-26T00:13:52Z.


Preview executable run for this stack, ahead of the trim. It covers the current #2490 head 9d74bec0, which contains this PR at 9caf8fd5. It's a single matched pair, so it can catch a regression early, but it doesn't replace the run on the trimmed candidate.

Setup (Windows 11 build 26300; AMD Radeon RX 9070 XT, driver 32.0.32029.2010; Release): run.ps1 -Render -Translate -FakeUser -GpuMirror with the same scripted input, a 32 GiB job cap, X2W_D3D12_BUDGET=1 and 600 s. The baseline is main at the stack's merge base, 24cfd7c0. Each arm got its own copy of the same revision-17 shader cache, pre-translated offline, so neither depended on translation keeping up during the run. Inputs and logs stay local; these are aggregates only.

main 24cfd7c0 stack 9d74bec0
Stop 489.1 s, second-chance C++ exception raised in the D3D12 stand-in 551.0 s, second-chance C++ exception raised in a runtime library
Placed-resource 0x8007000e 0 (stopped earlier) 25, all after 489 s, right before the stop
Local budget at the last heartbeat 20.06 GB used / 14.19 GB budget 20.22 GB / 14.17 GB
Frames presented 5,422 at 200.8 s; 10,151 at 366.0 s 4,945 at 204.8 s; 9,586 at 370.2 s (the same ~30 fps rate after startup)
Translated compute Dispatch not in main 428 keys and 6.31 M Dispatches. 4,340 ran translated, all from 2 keys. Every other one was refused by name, mostly "no translation" (5.13 M) and "an entry value that is not a root constant" (0.90 M).
Device removal none none

Reading:

  • No new failure mode: the stack ran 62 s longer, and its out-of-memory results only appear past the point where the baseline had already stopped. That's the same late memory wall as in #2379, not a new failure from translated Dispatch.
  • Not a speedup: the stack was about 500 frames behind at 200 s, and caught up to the same frame rate after startup. With one pair per arm I can't tell whether that's variance, so I'm not reading it as a cost of the stack either.
  • Little title compute is translated: only 2 of 428 keys run translated, so the stack exercises very little of the title's compute work yet.

I'll repeat this matched pair on the trimmed head once #1974 and #1975 have landed.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7178537635 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2470#issuecomment-7178537635). Originally posted by [MasterDomino](https://github.com/MasterDomino) on 2026-11-26T00:13:52Z. --- Preview executable run for this stack, ahead of the trim. It covers the current #2490 head `9d74bec0`, which contains this PR at `9caf8fd5`. It's a single matched pair, so it can catch a regression early, but it doesn't replace the run on the trimmed candidate. **Setup** (Windows 11 build 26300; AMD Radeon RX 9070 XT, driver 32.0.32029.2010; Release): `run.ps1 -Render -Translate -FakeUser -GpuMirror` with the same scripted input, a 32 GiB job cap, `X2W_D3D12_BUDGET=1` and 600 s. The baseline is `main` at the stack's merge base, `24cfd7c0`. Each arm got its own copy of the same revision-17 shader cache, pre-translated offline, so neither depended on translation keeping up during the run. Inputs and logs stay local; these are aggregates only. | | `main` `24cfd7c0` | stack `9d74bec0` | |---|---|---| | Stop | 489.1 s, second-chance C++ exception raised in the D3D12 stand-in | 551.0 s, second-chance C++ exception raised in a runtime library | | Placed-resource `0x8007000e` | 0 (stopped earlier) | 25, all after 489 s, right before the stop | | Local budget at the last heartbeat | 20.06 GB used / 14.19 GB budget | 20.22 GB / 14.17 GB | | Frames presented | 5,422 at 200.8 s; 10,151 at 366.0 s | 4,945 at 204.8 s; 9,586 at 370.2 s (the same ~30 fps rate after startup) | | Translated compute Dispatch | not in `main` | 428 keys and 6.31 M Dispatches. **4,340 ran translated, all from 2 keys.** Every other one was refused by name, mostly "no translation" (5.13 M) and "an entry value that is not a root constant" (0.90 M). | | Device removal | none | none | **Reading:** - **No new failure mode:** the stack ran 62 s longer, and its out-of-memory results only appear past the point where the baseline had already stopped. That's the same late memory wall as in #2379, not a new failure from translated Dispatch. - **Not a speedup:** the stack was about 500 frames behind at 200 s, and caught up to the same frame rate after startup. With one pair per arm I can't tell whether that's variance, so I'm not reading it as a cost of the stack either. - **Little title compute is translated:** only 2 of 428 keys run translated, so the stack exercises very little of the title's compute work yet. I'll repeat this matched pair on the trimmed head once #1974 and #1975 have landed. AI-assisted; commands listed were executed locally.
MasterDomino commented 2026-11-26 01:02:10 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-26T00:23:55Z.


@NiiRoZz: the prerequisites have all landed. #1803 is on main as 4ce2931d, #1974 as 4c3fbfbd and #1975 as a8f2d250, and the slot 35 recorder fix #2636 is in as 1cd73d3a. This branch can now be trimmed to its own delta, per @R0Y00's 21:15 note.

What's still needed before it lands:

  • Trim: rebase or merge main so the diff is only translated Dispatch, without the snapshot copies of #1803, #1974 and #1975.

  • Shared fixtures: rerun them on the trimmed head.

  • Slot 35 Dispatch controls: bring in @chasegrindy's three, keeping their commit and authorship as @R0Y00 asked:

    • the fenced nonzero-index readback with swapped descriptors;
    • root change and back;
    • an ordinary view heap change, restoring the constants but not slot 35.

    @chasegrindy offered a test-only commit to cherry-pick.

  • Native vs translated split: #1974's startup_list_dispatch_native now covers native slot 14. A slot 86 desktop compute PSO case in startup_compute_dispatch_* would show the translated path leaves it alone.

  • Executable run: I'll repeat the matched title pair from my preview comment on the trimmed head.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7178712955 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2470#issuecomment-7178712955). Originally posted by [MasterDomino](https://github.com/MasterDomino) on 2026-11-26T00:23:55Z. --- @NiiRoZz: the prerequisites have all landed. #1803 is on `main` as `4ce2931d`, #1974 as `4c3fbfbd` and #1975 as `a8f2d250`, and the slot 35 recorder fix #2636 is in as `1cd73d3a`. This branch can now be trimmed to its own delta, per @R0Y00's 21:15 note. What's still needed before it lands: - **Trim:** rebase or merge `main` so the diff is only translated Dispatch, without the snapshot copies of #1803, #1974 and #1975. - **Shared fixtures:** rerun them on the trimmed head. - **Slot 35 Dispatch controls:** bring in @chasegrindy's three, keeping their commit and authorship as @R0Y00 asked: - the fenced nonzero-index readback with swapped descriptors; - root change and back; - an ordinary view heap change, restoring the constants but not slot 35. @chasegrindy offered a test-only commit to cherry-pick. - **Native vs translated split:** #1974's `startup_list_dispatch_native` now covers native slot 14. A slot 86 desktop compute PSO case in `startup_compute_dispatch_*` would show the translated path leaves it alone. - **Executable run:** I'll repeat the matched title pair from my preview comment on the trimmed head. AI-assisted.
R0Y00 commented 2026-11-26 01:02:11 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-26T00:24:21Z.


Both prerequisites are now on main: #1974 at 4c3fbfbd and #1975 at a8f2d250. Thanks for the matched preview. The 4,340 translated calls from 2 of 428 keys are evidence for the mixed #2490 preview stack on that adapter; a single pair cannot isolate the later stop or establish a performance change. Please bring the compute-only diff and chasegrindy’s three controls onto current main, then repeat the matched run on that exact head. The first refusal, first allocation failure, last visible output and forwarded keys are enough for the public comparison. The future slot 61 path stays separate.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7178720499 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2470#issuecomment-7178720499). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-26T00:24:21Z. --- Both prerequisites are now on `main`: #1974 at `4c3fbfbd` and #1975 at `a8f2d250`. Thanks for the matched preview. The 4,340 translated calls from 2 of 428 keys are evidence for the mixed #2490 preview stack on that adapter; a single pair cannot isolate the later stop or establish a performance change. Please bring the compute-only diff and chasegrindy’s three controls onto current `main`, then repeat the matched run on that exact head. The first refusal, first allocation failure, last visible output and forwarded keys are enough for the public comparison. The future slot 61 path stays separate.
MasterDomino commented 2026-11-26 01:02:11 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-26T00:33:33Z.


@chasegrindy, the recorder fix (#2636) is on main, and this branch is now trimmed to its own delta at 206749e4. Could you open your three slot-35 Dispatch controls as a test-only PR into NiiRoZz:startup/compute-dispatch-translated? That's how #1974's fixture went in (tedin7/Xbox2Windows#1). Your commit and authorship stay intact, and @NiiRoZz only has to merge it. @NiiRoZz, does that work for you?

Once the controls are on this branch, I'll rebuild that exact head, rerun the slot-35 and refusal mutants on the RX 9070 XT, and repeat the matched title pair. For the comparison I'll report the first refusal, the first allocation failure, the last visible output and the forwarded keys, per @R0Y00.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7178880510 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2470#issuecomment-7178880510). Originally posted by [MasterDomino](https://github.com/MasterDomino) on 2026-11-26T00:33:33Z. --- @chasegrindy, the recorder fix (#2636) is on `main`, and this branch is now trimmed to its own delta at `206749e4`. Could you open your three slot-35 Dispatch controls as a test-only PR into `NiiRoZz:startup/compute-dispatch-translated`? That's how #1974's fixture went in (tedin7/Xbox2Windows#1). Your commit and authorship stay intact, and @NiiRoZz only has to merge it. @NiiRoZz, does that work for you? Once the controls are on this branch, I'll rebuild that exact head, rerun the slot-35 and refusal mutants on the RX 9070 XT, and repeat the matched title pair. For the comparison I'll report the first refusal, the first allocation failure, the last visible output and the forwarded keys, per @R0Y00. AI-assisted.
MasterDomino commented 2026-11-26 02:05:12 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-26T01:40:00Z.


@NiiRoZz: @chasegrindy's slot 35 Dispatch controls are open as a test-only PR into this branch, NiiRoZz/Xbox2Windows#1. I verified them on the RX 9070 XT and WARP (2/2, plus 275 neighbour tests passed), and all six slot 35 mutants are now caught, including the four that survived every earlier fixture. The details are in that thread.

What's left on this PR:

  • Merge NiiRoZz#1.
  • Merge main again: this branch now conflicts with main f06646ba in src/startup_stubs/d3d12_xs_device.cpp.
  • Optional: the slot 86 desktop compute PSO case.
  • Then I'll run the matched title pair on that exact head.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7180002067 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2470#issuecomment-7180002067). Originally posted by [MasterDomino](https://github.com/MasterDomino) on 2026-11-26T01:40:00Z. --- @NiiRoZz: @chasegrindy's slot 35 Dispatch controls are open as a test-only PR into this branch, NiiRoZz/Xbox2Windows#1. I verified them on the RX 9070 XT and WARP (2/2, plus 275 neighbour tests passed), and all six slot 35 mutants are now caught, including the four that survived every earlier fixture. The details are in that thread. What's left on this PR: - **Merge NiiRoZz#1.** - **Merge `main` again:** this branch now conflicts with `main` `f06646ba` in `src/startup_stubs/d3d12_xs_device.cpp`. - **Optional:** the slot 86 desktop compute PSO case. - **Then** I'll run the matched title pair on that exact head. AI-assisted.
tedin7 commented 2026-11-26 04:04:40 +00:00 (Migrated from github.com)

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


@NiiRoZz @MasterDomino #2532 was squash-merged into main as de75613fb, and it carried this branch: its history includes "Merge pr2470 (origin/main) into pr2490". Comparing this head with current main (git merge-tree --write-tree origin/main <head>, then git diff origin/main <tree> --stat), the compute Dispatch path is already on main. What is left is about 34 lines of older comments and variants in d3d12_compute_dispatch.inl.

Before anything is closed: is the slot 35 Dispatch controls PR into this branch (NiiRoZz/Xbox2Windows#1) still needed? If so, it could go as a small follow-up against main, and this PR could then be closed as superseded by #2532. If you would rather keep this one open for that, just say so here.

Thanks for the work on this stack.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7181938275 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2470#issuecomment-7181938275). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-26T03:41:24Z. --- @NiiRoZz @MasterDomino #2532 was squash-merged into `main` as `de75613fb`, and it carried this branch: its history includes "Merge pr2470 (origin/main) into pr2490". Comparing this head with current `main` (`git merge-tree --write-tree origin/main <head>`, then `git diff origin/main <tree> --stat`), the compute Dispatch path is already on `main`. What is left is about 34 lines of older comments and variants in `d3d12_compute_dispatch.inl`. Before anything is closed: is the slot 35 Dispatch controls PR into this branch (NiiRoZz/Xbox2Windows#1) still needed? If so, it could go as a small follow-up against `main`, and this PR could then be closed as superseded by #2532. If you would rather keep this one open for that, just say so here. Thanks for the work on this stack. AI-assisted; commands listed were executed locally.
MasterDomino commented 2026-11-26 04:04:41 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-26T03:44:08Z.


Thanks, @tedin7. I checked main (8016c393) myself: dispatch_translated, the COMPUTE-list NON_PIXEL_SHADER_RESOURCE transition, dispatch-sampled-compute and the x2w_d3d12_compute_census export all came in with #2532 (de75613f). So the code of this PR and of #2490 is on main, and closing both as superseded makes sense once @NiiRoZz confirms nothing in the leftover lines is still wanted.

Yes, NiiRoZz/Xbox2Windows#1 is still needed. @R0Y00 made those three slot 35 Dispatch controls a condition for this code landing, and main doesn't have them (dispatch-table-offset isn't in the tree). On the RX 9070 XT and WARP they're what catch a dropped descriptor offset and a missing clear on a root or heap change; without them, those mutants pass every fixture. @chasegrindy, could you retarget it as a test-only PR against main? I'll re-verify it there.

@R0Y00, for the record: #2532 merged the translated Dispatch stack before three gates set for #2470/#2490 were met:

  • the slot 35 controls above;
  • the matched title run on the exact head;
  • your acceptance of the x2w_d3d12_compute_census export.

I'll run the matched title pair now on de75613f against its parent and post the comparison you asked for: the first refusal, the first allocation failure, the last visible output, and the forwarded keys. Let me know if you'd rather handle the census export differently now that it's on main.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7181977756 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2470#issuecomment-7181977756). Originally posted by [MasterDomino](https://github.com/MasterDomino) on 2026-11-26T03:44:08Z. --- Thanks, @tedin7. I checked `main` (`8016c393`) myself: `dispatch_translated`, the COMPUTE-list `NON_PIXEL_SHADER_RESOURCE` transition, `dispatch-sampled-compute` and the `x2w_d3d12_compute_census` export all came in with #2532 (`de75613f`). So the code of this PR and of #2490 is on `main`, and closing both as superseded makes sense once @NiiRoZz confirms nothing in the leftover lines is still wanted. **Yes, NiiRoZz/Xbox2Windows#1 is still needed.** @R0Y00 made those three slot 35 Dispatch controls a condition for this code landing, and `main` doesn't have them (`dispatch-table-offset` isn't in the tree). On the RX 9070 XT and WARP they're what catch a dropped descriptor offset and a missing clear on a root or heap change; without them, those mutants pass every fixture. @chasegrindy, could you retarget it as a test-only PR against `main`? I'll re-verify it there. @R0Y00, for the record: #2532 merged the translated Dispatch stack before three gates set for #2470/#2490 were met: - the slot 35 controls above; - the matched title run on the exact head; - your acceptance of the `x2w_d3d12_compute_census` export. I'll run the matched title pair now on `de75613f` against its parent and post the comparison you asked for: the first refusal, the first allocation failure, the last visible output, and the forwarded keys. Let me know if you'd rather handle the census export differently now that it's on `main`. AI-assisted; commands listed were executed locally.
tedin7 commented 2026-11-26 04:04:41 +00:00 (Migrated from github.com)

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


@MasterDomino Cannot run Win2025 tests on 206749e4 yet because this branch has merge conflicts with main; please rebase and tag @tedin7 again.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7182006790 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2470#issuecomment-7182006790). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-26T03:46:08Z. --- @MasterDomino Cannot run Win2025 tests on `206749e4` yet because this branch has merge conflicts with `main`; please rebase and tag `@tedin7` again.
MasterDomino commented 2026-11-26 05:02:24 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-26T04:13:55Z.


@R0Y00, here's the matched run you asked for, on the code that actually landed: #2532 (de75613f, which carried this PR and #2490) against its parent 4f7dd6ce.

Setup (Windows 11 build 26300; AMD Radeon RX 9070 XT, driver 32.0.32029.2010; Release):

  • run.ps1 -Render -Translate -FakeUser -GpuMirror, with the same scripted input, a 32 GiB job cap, X2W_D3D12_BUDGET=1 and 600 s.
  • Shader cache: #2532 also changes gfx2hlsl.py at the same cache revision (17). So each arm got the same rekeyed requests, translated offline by its own translator, and its own copy of the cache.
  • Inputs and logs stay local; these are aggregates only.
parent 4f7dd6ce #2532 de75613f
First Dispatch refusal ~56 s, "requires a desktop compute pipeline and root" (native slot 14) ~63 s, "no translation"
First allocation failure none before the stop ~489 s, a placed texture create returning 0x8007000e (8 in total, all in the final seconds)
Last visible output 13,209 frames presented at 481.9 s 12,210 frames at 489.3 s
Stop 490.9 s, second-chance C++ exception raised in the D3D12 stand-in 497.1 s, second-chance access violation in a runtime library under title frames
Forwarded keys none (translated Dispatch not present) 2 of 435 keys, 3,456 of 4.85 M Dispatches translated. The rest were refused by name, mostly "no translation" (3.82 M) and "an entry value that is not a root constant" (0.74 M).

Frames presented at matched times:

~63 s ~100 s ~200 s ~300 s ~400 s ~480 s
parent 1,233 2,212 5,213 8,213 11,018 13,209
#2532 912 1,841 4,841 7,841 10,314 11,968

Reading:

  • Stop and memory: no new early failure mode. Both runs stop at about the same time on the same late memory wall as #2379, with a different first fault.
  • Frame rate: #2532 is consistently slower. It loses about 320 frames before 63 s, holds the same rate from 100 s to 300 s, then runs about 12% slower from 300 s to 400 s and about 25% slower from 400 s to 480 s. My earlier preview pair showed the same startup lag (about 470 frames at 200 s).
  • Confidence: two pairs don't prove a cost, but the direction is the same both times, and it's worth one more pair before treating it as noise.
  • Suspected cause: only 2 keys are translated, so the per-Dispatch decision and census path on 4.85 M mostly refused Dispatches is the likely place to look, not the translated shaders themselves. A pair with the census logging disabled would separate the two. That's a hypothesis I haven't profiled.

Still open: the slot 35 Dispatch controls (NiiRoZz/Xbox2Windows#1, to be retargeted against main) and your call on the x2w_d3d12_compute_census export.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7182411927 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2470#issuecomment-7182411927). Originally posted by [MasterDomino](https://github.com/MasterDomino) on 2026-11-26T04:13:55Z. --- @R0Y00, here's the matched run you asked for, on the code that actually landed: #2532 (`de75613f`, which carried this PR and #2490) against its parent `4f7dd6ce`. **Setup** (Windows 11 build 26300; AMD Radeon RX 9070 XT, driver 32.0.32029.2010; Release): - `run.ps1 -Render -Translate -FakeUser -GpuMirror`, with the same scripted input, a 32 GiB job cap, `X2W_D3D12_BUDGET=1` and 600 s. - **Shader cache:** #2532 also changes `gfx2hlsl.py` at the same cache revision (17). So each arm got the same rekeyed requests, translated offline by **its own** translator, and its own copy of the cache. - Inputs and logs stay local; these are aggregates only. | | parent `4f7dd6ce` | #2532 `de75613f` | |---|---|---| | First Dispatch refusal | ~56 s, "requires a desktop compute pipeline and root" (native slot 14) | ~63 s, "no translation" | | First allocation failure | none before the stop | ~489 s, a placed texture create returning `0x8007000e` (8 in total, all in the final seconds) | | Last visible output | 13,209 frames presented at 481.9 s | 12,210 frames at 489.3 s | | Stop | 490.9 s, second-chance C++ exception raised in the D3D12 stand-in | 497.1 s, second-chance access violation in a runtime library under title frames | | Forwarded keys | none (translated Dispatch not present) | **2 of 435 keys**, 3,456 of 4.85 M Dispatches translated. The rest were refused by name, mostly "no translation" (3.82 M) and "an entry value that is not a root constant" (0.74 M). | **Frames presented at matched times:** | | ~63 s | ~100 s | ~200 s | ~300 s | ~400 s | ~480 s | |---|---|---|---|---|---|---| | parent | 1,233 | 2,212 | 5,213 | 8,213 | 11,018 | 13,209 | | #2532 | 912 | 1,841 | 4,841 | 7,841 | 10,314 | 11,968 | **Reading:** - **Stop and memory:** no new early failure mode. Both runs stop at about the same time on the same late memory wall as #2379, with a different first fault. - **Frame rate:** #2532 is consistently slower. It loses about 320 frames before 63 s, holds the same rate from 100 s to 300 s, then runs about 12% slower from 300 s to 400 s and about 25% slower from 400 s to 480 s. My earlier preview pair showed the same startup lag (about 470 frames at 200 s). - **Confidence:** two pairs don't prove a cost, but the direction is the same both times, and it's worth one more pair before treating it as noise. - **Suspected cause:** only 2 keys are translated, so the per-Dispatch decision and census path on 4.85 M mostly refused Dispatches is the likely place to look, not the translated shaders themselves. A pair with the census logging disabled would separate the two. That's a hypothesis I haven't profiled. Still open: the slot 35 Dispatch controls (NiiRoZz/Xbox2Windows#1, to be retargeted against `main`) and your call on the `x2w_d3d12_compute_census` export. AI-assisted; commands listed were executed locally.
MasterDomino commented 2026-11-26 05:02:24 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-26T04:14:50Z.


Follow-up on the frame-rate difference: two places in main's d3d12_compute_dispatch.inl fit it. I haven't profiled either yet.

  • The lock on every call: dispatch_translated takes draw_lock exclusively on every Dispatch with a slot 67 placeholder bound, before any refusal check (:148). That's about 10 k calls per second here, almost all of them refused, and each one serializes against the draw path's use of the same lock.
  • Manifest retries: for a key with no manifest, load_compute_translation retries reading the manifest file once per second, still under that exclusive lock (:58-66, :160). With about 433 untranslated keys, that's up to ~433 file reads per second while draw_lock is held.

Two ways to confirm it: a pair with the untranslated keys' retries backed off (or the lock taken only once a key is ready), or a short CPU profile around a run. I can do either on the RX 9070 XT if that helps. @NiiRoZz, since this is your code now on main, how would you like to approach it?

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7182425719 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2470#issuecomment-7182425719). Originally posted by [MasterDomino](https://github.com/MasterDomino) on 2026-11-26T04:14:50Z. --- Follow-up on the frame-rate difference: two places in `main`'s `d3d12_compute_dispatch.inl` fit it. I haven't profiled either yet. - **The lock on every call:** `dispatch_translated` takes `draw_lock` **exclusively** on every Dispatch with a slot 67 placeholder bound, before any refusal check (`:148`). That's about 10 k calls per second here, almost all of them refused, and each one serializes against the draw path's use of the same lock. - **Manifest retries:** for a key with no manifest, `load_compute_translation` retries reading the manifest file once per second, still under that exclusive lock (`:58-66`, `:160`). With about 433 untranslated keys, that's up to ~433 file reads per second while `draw_lock` is held. Two ways to confirm it: a pair with the untranslated keys' retries backed off (or the lock taken only once a key is ready), or a short CPU profile around a run. I can do either on the RX 9070 XT if that helps. @NiiRoZz, since this is your code now on `main`, how would you like to approach it? AI-assisted.
R0Y00 commented 2026-11-26 05:02:26 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-26T04:30:14Z.


Thanks for the matched run on landed #2532. Please start with a short CPU profile on the same warmed build and fixed input. Capture the time in the Dispatch refusal path, waiting for the shared graphics/compute lock, and manifest stat/open work separately. If the profile implicates manifest polling, try a second matched run changing only the retry interval. Record refused and forwarded calls, cache readiness, and presents at matching times. A source-built retry fixture should still show that a manifest published after an initial miss is picked up. Keep the census export as a diagnostic while collecting this evidence. The current counts establish that two keys forwarded and that the two runs ended at similar times; the slowdown's cause is still open.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7182651487 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2470#issuecomment-7182651487). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-26T04:30:14Z. --- Thanks for the matched run on landed #2532. Please start with a short CPU profile on the same warmed build and fixed input. Capture the time in the Dispatch refusal path, waiting for the shared graphics/compute lock, and manifest stat/open work separately. If the profile implicates manifest polling, try a second matched run changing only the retry interval. Record refused and forwarded calls, cache readiness, and presents at matching times. A source-built retry fixture should still show that a manifest published after an initial miss is picked up. Keep the census export as a diagnostic while collecting this evidence. The current counts establish that two keys forwarded and that the two runs ended at similar times; the slowdown's cause is still open.
MasterDomino commented 2026-11-26 05:02:29 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-26T04:51:27Z.


@R0Y00 @NiiRoZz, here's the profile of landed #2532 (de75613f) and the retry-interval pair.

Method. A kernel sampling profile needs elevation here, so I used a local-only instrumented build of de75613f instead; none of it is meant for commit. It adds QPC totals in dispatch_translated, logged with the census:

  • time spent in refused calls and in forwarded calls;
  • the wait to acquire draw_lock;
  • how long draw_lock is held;
  • the time inside load_compute_translation (the manifest stat/open/read), with a count.

Both runs used the same warmed cache snapshot, the same scripted input, the same 32 GiB cap with X2W_D3D12_BUDGET=1, and 600 s, on Windows 11 build 26300 with an AMD Radeon RX 9070 XT (driver 32.0.32029.2010), in Release. Only the retry interval differs: retry_manifest_at = now + 1000 in A and + 10000 in B. Inputs and logs stay local; these are aggregates only.

totals over the run, summed across threads A: retry 1 s (as on main) B: retry 10 s
Refused calls, time in the path 5.02 M, 98.3 s 5.91 M, 46.2 s
Forwarded calls, time 3,586, 0.11 s 4,157, 0.10 s
Manifest loads, time 45,971, 29.6 s (about 0.64 ms each) 4,973, 3.4 s
draw_lock held by Dispatch 30.8 s 4.7 s
Waiting to acquire draw_lock 66.4 s 40.7 s
Forwarded keys, out of keys seen 2 of 427 2 of 430
Cache readiness same warmed snapshot same warmed snapshot
Stop 460.8 s, access violation in the title 491.8 s, access violation in the title

Frames presented at matching times:

~60 s ~100 s ~200 s ~300 s ~400 s ~450 s
A 1,394 2,594 5,594 8,431 10,498 11,591
B 968 2,015 5,015 8,015 10,749 11,979

Reading:

  • Manifest polling is the main cost. In A, 96% of the time a Dispatch holds the exclusive draw_lock is failed manifest reads for untranslated keys. A 10 s retry cuts those reads 9×, cuts lock hold time 6.5×, and halves the time spent in the refused path.
  • Busy section: from 300 s to 450 s, B presents 3,964 frames against A's 3,160 (+25%), the part where the slowdown against the parent was largest.
  • Startup: B was lower before 300 s. With one pair I can't separate that from startup variance, so I'm only reading the late section.
  • A second cost remains. B still waits 40.7 s for draw_lock while holding it for only 4.7 s itself. So most of that wait is Dispatch blocking behind the draw path's own use of the lock. Taking draw_lock exclusively on every Dispatch, mostly to be refused, contends with draws independently of the polling.
  • The retry fixture: a longer interval delays picking up a manifest published after a miss; it doesn't drop it. I haven't run the "published after an initial miss" fixture with the 10 s interval yet. A fix that keeps the interval short for fixtures and backs off per key in the title (for example 1 s, then growing) would keep that guarantee.

Possible directions (for @NiiRoZz):

  • back off the manifest retry per key, or check readiness outside draw_lock;
  • take the exclusive lock only for a key that's ready, so a refusal for a missing translation is decided from a shared or lock-free read.

I can run the matched pair again on a fix.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7182963566 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2470#issuecomment-7182963566). Originally posted by [MasterDomino](https://github.com/MasterDomino) on 2026-11-26T04:51:27Z. --- @R0Y00 @NiiRoZz, here's the profile of landed #2532 (`de75613f`) and the retry-interval pair. **Method.** A kernel sampling profile needs elevation here, so I used a **local-only instrumented build** of `de75613f` instead; none of it is meant for commit. It adds QPC totals in `dispatch_translated`, logged with the census: - time spent in refused calls and in forwarded calls; - the wait to acquire `draw_lock`; - how long `draw_lock` is held; - the time inside `load_compute_translation` (the manifest stat/open/read), with a count. Both runs used the same warmed cache snapshot, the same scripted input, the same 32 GiB cap with `X2W_D3D12_BUDGET=1`, and 600 s, on Windows 11 build 26300 with an AMD Radeon RX 9070 XT (driver 32.0.32029.2010), in Release. **Only the retry interval differs:** `retry_manifest_at = now + 1000` in A and `+ 10000` in B. Inputs and logs stay local; these are aggregates only. | totals over the run, summed across threads | A: retry 1 s (as on `main`) | B: retry 10 s | |---|---|---| | Refused calls, time in the path | 5.02 M, 98.3 s | 5.91 M, 46.2 s | | Forwarded calls, time | 3,586, 0.11 s | 4,157, 0.10 s | | Manifest loads, time | **45,971, 29.6 s** (about 0.64 ms each) | **4,973, 3.4 s** | | `draw_lock` held by Dispatch | 30.8 s | 4.7 s | | Waiting to acquire `draw_lock` | 66.4 s | 40.7 s | | Forwarded keys, out of keys seen | 2 of 427 | 2 of 430 | | Cache readiness | same warmed snapshot | same warmed snapshot | | Stop | 460.8 s, access violation in the title | 491.8 s, access violation in the title | **Frames presented at matching times:** | | ~60 s | ~100 s | ~200 s | ~300 s | ~400 s | ~450 s | |---|---|---|---|---|---|---| | A | 1,394 | 2,594 | 5,594 | 8,431 | 10,498 | 11,591 | | B | 968 | 2,015 | 5,015 | 8,015 | 10,749 | 11,979 | **Reading:** - **Manifest polling is the main cost.** In A, 96% of the time a Dispatch holds the exclusive `draw_lock` is failed manifest reads for untranslated keys. A 10 s retry cuts those reads 9×, cuts lock hold time 6.5×, and halves the time spent in the refused path. - **Busy section:** from 300 s to 450 s, B presents 3,964 frames against A's 3,160 (+25%), the part where the slowdown against the parent was largest. - **Startup:** B was lower before 300 s. With one pair I can't separate that from startup variance, so I'm only reading the late section. - **A second cost remains.** B still waits 40.7 s for `draw_lock` while holding it for only 4.7 s itself. So most of that wait is Dispatch blocking behind the draw path's own use of the lock. Taking `draw_lock` exclusively on every Dispatch, mostly to be refused, contends with draws independently of the polling. - **The retry fixture:** a longer interval delays picking up a manifest published after a miss; it doesn't drop it. I haven't run the "published after an initial miss" fixture with the 10 s interval yet. A fix that keeps the interval short for fixtures and backs off per key in the title (for example 1 s, then growing) would keep that guarantee. **Possible directions (for @NiiRoZz):** - back off the manifest retry per key, or check readiness outside `draw_lock`; - take the exclusive lock only for a key that's ready, so a refusal for a missing translation is decided from a shared or lock-free read. I can run the matched pair again on a fix. AI-assisted; commands listed were executed locally.
R0Y00 commented 2026-11-26 05:02:29 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-26T04:58:19Z.


The measurements support a focused per-key retry change. The 1 s run spent 29.6 of its 30.8 seconds holding the Dispatch lock inside manifest loads. The 10 s run cut that to 3.4 of 4.7 seconds, with the same number of forwarded keys. The startup presentation counts still vary, so please keep that separate. @NiiRoZz, start with a bounded per-key backoff after repeated misses, keeping the first retry prompt. Leave the lock redesign as a separate change. Extend the existing startup_compute_live_retry fixture so a manifest published after a miss becomes usable on the same pipeline, and use a controllable clock or an isolated schedule test to check both reduced polling and reset after success. MasterDomino can then rerun the matched pair.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7183063570 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2470#issuecomment-7183063570). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-26T04:58:19Z. --- The measurements support a focused per-key retry change. The 1 s run spent 29.6 of its 30.8 seconds holding the Dispatch lock inside manifest loads. The 10 s run cut that to 3.4 of 4.7 seconds, with the same number of forwarded keys. The startup presentation counts still vary, so please keep that separate. @NiiRoZz, start with a bounded per-key backoff after repeated misses, keeping the first retry prompt. Leave the lock redesign as a separate change. Extend the existing startup_compute_live_retry fixture so a manifest published after a miss becomes usable on the same pipeline, and use a controllable clock or an isolated schedule test to check both reduced polling and reset after success. MasterDomino can then rerun the matched pair.
tedin7 commented 2026-11-27 09:36:31 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-27T09:36:31Z.


This PR now conflicts with main. Conflicting files:

  • CMakeLists.txt
  • docs/experiments.md
  • src/startup_stubs/d3d12_compute_dispatch.inl
  • src/startup_stubs/d3d12_xs_device.cpp
  • src/startup_stubs/translated_sampler_bindings.h
  • tests/startup_compute_dispatch_check.py
  • tests/startup_stream_consumer.cpp

Could you merge main into your branch (a merge commit, no force push needed) and resolve these? Thank you.

AI-assisted; commands listed were executed locally. (git merge-tree origin/main <head>)

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7214881336 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2470#issuecomment-7214881336). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-27T09:36:31Z. --- This PR now conflicts with `main`. Conflicting files: - `CMakeLists.txt` - `docs/experiments.md` - `src/startup_stubs/d3d12_compute_dispatch.inl` - `src/startup_stubs/d3d12_xs_device.cpp` - `src/startup_stubs/translated_sampler_bindings.h` - `tests/startup_compute_dispatch_check.py` - `tests/startup_stream_consumer.cpp` Could you merge `main` into your branch (a merge commit, no force push needed) and resolve these? Thank you. AI-assisted; commands listed were executed locally. (`git merge-tree origin/main <head>`)
pigalot commented 2026-11-28 00:50:57 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by pigalot on 2026-11-28T00:50:57Z.


I tried merging main 86beae95 into 206749e4 to clear the conflict. I stopped without pushing, because the conflicts are semantic.

src/startup_stubs/d3d12_compute_dispatch.inl and tests/startup_compute_dispatch_check.py are add/add conflicts.

  • main added its own versions of both files in #2532 and has kept changing them since, most recently in #3162, #3223 and #3227.
  • They conflict in 16 and 10 places. Both sides implement the translated compute dispatch path, so merging them means choosing between two designs or combining them. That is your call, not a mechanical resolution.

The conflicts that follow from it:

  • src/startup_stubs/d3d12_xs_device.cpp: 2 hunks.
  • src/startup_stubs/translated_sampler_bindings.h: 1 hunk.
  • tests/startup_stream_consumer.cpp: 10 hunks.
  • CMakeLists.txt and docs/experiments.md: 1 hunk each.

A rebase or re-merge onto current main that builds on main's d3d12_compute_dispatch.inl would probably be easier than resolving the two files line by line.

This reply was AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7231235754 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2470#issuecomment-7231235754). Originally posted by [pigalot](https://github.com/pigalot) on 2026-11-28T00:50:57Z. --- I tried merging `main` `86beae95` into `206749e4` to clear the conflict. I stopped without pushing, because the conflicts are semantic. **`src/startup_stubs/d3d12_compute_dispatch.inl` and `tests/startup_compute_dispatch_check.py` are add/add conflicts.** - `main` added its own versions of both files in #2532 and has kept changing them since, most recently in #3162, #3223 and #3227. - They conflict in 16 and 10 places. Both sides implement the translated compute dispatch path, so merging them means choosing between two designs or combining them. That is your call, not a mechanical resolution. **The conflicts that follow from it:** - `src/startup_stubs/d3d12_xs_device.cpp`: 2 hunks. - `src/startup_stubs/translated_sampler_bindings.h`: 1 hunk. - `tests/startup_stream_consumer.cpp`: 10 hunks. - `CMakeLists.txt` and `docs/experiments.md`: 1 hunk each. A rebase or re-merge onto current `main` that builds on main's `d3d12_compute_dispatch.inl` would probably be easier than resolving the two files line by line. This reply was AI-assisted.
JohnConnorNPC commented 2026-11-28 07:38:16 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by JohnConnorNPC on 2026-11-28T07:38:16Z.


Thank you for this work. As far as I can tell, main (c3204a9c) now has it in a newer form, so I'm closing this as superseded.

  • This branch's code landed through #2532 (de75613f), and #2580, #2585, #2771 and #2874 built on top of it. git grep -c -F gives the same count on main and on 206749e4 for x2w-render compute dispatches (2/2), compute_request_root (3/3) and ## Translated compute Dispatch (1/1).
  • Every dispatch-* mode in this branch's tests/startup_compute_dispatch_check.py is also in main's copy. Main adds dispatch-table-offset, dispatch-table-heap-changed and dispatch-table-root-changed (#2874), and the per-key manifest retry backoff (#2925, ManifestRetry).
  • git merge-tree --write-tree origin/main 206749e4 exits 1 with conflicts in 7 files. Resolving them would bring back the older d3d12_compute_dispatch.inl design.

If something here is still missing from main, a fresh, narrowed PR rebased on current main would be very welcome.

This comment was AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7236067582 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2470#issuecomment-7236067582). Originally posted by [JohnConnorNPC](https://github.com/JohnConnorNPC) on 2026-11-28T07:38:16Z. --- Thank you for this work. As far as I can tell, `main` (`c3204a9c`) now has it in a newer form, so I'm closing this as superseded. - This branch's code landed through #2532 (`de75613f`), and #2580, #2585, #2771 and #2874 built on top of it. `git grep -c -F` gives the same count on `main` and on `206749e4` for `x2w-render compute dispatches` (2/2), `compute_request_root` (3/3) and `## Translated compute Dispatch` (1/1). - Every `dispatch-*` mode in this branch's `tests/startup_compute_dispatch_check.py` is also in main's copy. Main adds `dispatch-table-offset`, `dispatch-table-heap-changed` and `dispatch-table-root-changed` (#2874), and the per-key manifest retry backoff (#2925, `ManifestRetry`). - `git merge-tree --write-tree origin/main 206749e4` exits 1 with conflicts in 7 files. Resolving them would bring back the older `d3d12_compute_dispatch.inl` design. If something here is still missing from `main`, a fresh, narrowed PR rebased on current `main` would be very welcome. This comment was AI-assisted.

Pull request closed

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

No due date set.

Reference
R0Y00/Xbox2Windows!2462
No description provided.