startup-d3d12: run compute pipelines that are already desktop DXIL #1434

Open
triggered02 wants to merge 4 commits from upstream-pr/1441 into main
triggered02 commented 2026-11-24 11:33:45 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-11-24T11:33:45Z.


First slice of #1412: compute pipelines whose bytecode is publishable to the desktop become real, and Dispatch records them behind an explicit gate.

Today compute is inert twice over — the bound compute pipeline is a placeholder and command-list slot 14 is a no-op — so every dispatch is dropped. This change adds the publication path and the recording path, and leaves both inert unless a validated module exists and the gate is on.

What changed

  • tools/startup/compute_cache.py — publishes a validated compute module under the key the runtime looks it up by (<key>.cs.cso), so the offline retarget/sign/gate step decides usability and the runtime does no bytecode inspection.
  • src/startup_stubs/d3d12_xs_device.cpp, device slot 62 — with render mode on, a validated module is loaded from the shader cache for the container's hash and a real CreateComputePipelineState is created from it (pRootSignature unwrapped from the console handle, CachedPSO cleared so a console cached-PSO blob never reaches the desktop runtime). Without a module the result stays a placeholder PipelineState, exactly as before, and the log line says which reason applied.
  • Command-list slot 14 (Dispatch) — recorded on the desktop list when X2W_COMPUTE_DISPATCH=1 and the bound pipeline is a real desktop compute pipeline; otherwise slot 14 stays the no-op it has always been.
  • tests/startup_compute_cache_check.py (CTest startup_compute_cache) — nine checks over the publisher and the key/manifest behaviour.

Verified on e133bf6a (rebased onto origin/main b976e8bc)

  • cmake --preset dev + cmake --build --preset dev --target d3d12_xs_shim (MSVC) → exit 0, d3d12_xs.dll links.
  • tests/startup_compute_cache_check.py → PASS; docs_links_check.py (469 links), bidi_controls_check.py (1739 files), startup_tools_lint_check.py (10 files), dependency_paths_check.py → exit 0; git diff --check clean.

Not established

  • No device-level fixture in this slice: real slot-62 PSO creation from <key>.cs.cso and slot-14 recording with X2W_COMPUTE_DISPATCH=1 are compile-checked by CI, not measured. startup_compute_binding_trace_warp covers slot-14 observation with the gate off.
  • Compute root SRVs stay upload-page-backed only: the graphics slot-44 readable_window / upload_from_title fallback has no compute equivalent, so a title-memory window read is refused where graphics accepts it.
  • X2W_COMPUTE_DISPATCH is undocumented and sampled once in build_tables() at device creation.
  • No AMD or console hardware measurement.

The fixture shader built from checked-in HLSL through DXC_EXECUTABLE, published with the existing validator/signer (tools/dxil_retarget.py::sign_container → root_probe --sign), plus the two-arm readback (zero forwarded dispatches and an unchanged UAV after the fence; exact words including untouched sentinels) is the next change, not this one.

Refs #1412, #1975.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:5471338655 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1441). Originally posted by [triggered02](https://github.com/triggered02) on 2026-11-24T11:33:45Z. --- First slice of #1412: **compute pipelines whose bytecode is publishable to the desktop become real, and `Dispatch` records them behind an explicit gate.** Today compute is inert twice over — the bound compute pipeline is a placeholder and command-list slot 14 is a no-op — so every dispatch is dropped. This change adds the publication path and the recording path, and leaves both inert unless a validated module exists and the gate is on. ### What changed - **`tools/startup/compute_cache.py`** — publishes a validated compute module under the key the runtime looks it up by (`<key>.cs.cso`), so the offline retarget/sign/gate step decides usability and the runtime does no bytecode inspection. - **`src/startup_stubs/d3d12_xs_device.cpp`, device slot 62** — with render mode on, a validated module is loaded from the shader cache for the container's hash and a real `CreateComputePipelineState` is created from it (`pRootSignature` unwrapped from the console handle, `CachedPSO` cleared so a console cached-PSO blob never reaches the desktop runtime). Without a module the result stays a placeholder `PipelineState`, exactly as before, and the log line says which reason applied. - **Command-list slot 14 (`Dispatch`)** — recorded on the desktop list when `X2W_COMPUTE_DISPATCH=1` and the bound pipeline is a real desktop compute pipeline; otherwise slot 14 stays the no-op it has always been. - **`tests/startup_compute_cache_check.py`** (CTest `startup_compute_cache`) — nine checks over the publisher and the key/manifest behaviour. ### Verified on `e133bf6a` (rebased onto `origin/main` `b976e8bc`) - `cmake --preset dev` + `cmake --build --preset dev --target d3d12_xs_shim` (MSVC) → exit 0, `d3d12_xs.dll` links. - `tests/startup_compute_cache_check.py` → PASS; `docs_links_check.py` (469 links), `bidi_controls_check.py` (1739 files), `startup_tools_lint_check.py` (10 files), `dependency_paths_check.py` → exit 0; `git diff --check` clean. ### Not established - **No device-level fixture in this slice:** real slot-62 PSO creation from `<key>.cs.cso` and slot-14 recording with `X2W_COMPUTE_DISPATCH=1` are compile-checked by CI, not measured. `startup_compute_binding_trace_warp` covers slot-14 observation with the gate off. - Compute root SRVs stay upload-page-backed only: the graphics slot-44 `readable_window` / `upload_from_title` fallback has no compute equivalent, so a title-memory window read is refused where graphics accepts it. - `X2W_COMPUTE_DISPATCH` is undocumented and sampled once in `build_tables()` at device creation. - No AMD or console hardware measurement. The fixture shader built from checked-in HLSL through `DXC_EXECUTABLE`, published with the existing validator/signer (`tools/dxil_retarget.py::sign_container` → `root_probe --sign`), plus the two-arm readback (zero forwarded dispatches and an unchanged UAV after the fence; exact words including untouched sentinels) is the next change, not this one. Refs #1412, #1975. AI-assisted.
R0Y00 commented 2026-11-24 11:36:20 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T11:36:20Z.

Review: CHANGES_REQUESTED


Please keep the production dispatch path pending the source-built GPU readback already called out in the PR. The classifier checks only that the initial signature is readable, then reads the whole scan range, so it must validate the entire inspected range before touching it. The byte scan also accepts incidental DXIL text and rejects incidental xbox. metadata, and it can miss names outside the fixed prefix. Use a structurally checked container and the existing validated final-module path from #584. Keep the bound-pipeline check specific to compute, and exercise an unresolved/invalid artifact with zero recorded desktop dispatches followed by a normal accepted dispatch with nonzero UAV readback.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6038485384 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1441#pullrequestreview-6038485384). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T11:36:20Z. **Review:** CHANGES_REQUESTED --- Please keep the production dispatch path pending the source-built GPU readback already called out in the PR. The classifier checks only that the initial signature is readable, then reads the whole scan range, so it must validate the entire inspected range before touching it. The byte scan also accepts incidental DXIL text and rejects incidental xbox. metadata, and it can miss names outside the fixed prefix. Use a structurally checked container and the existing validated final-module path from #584. Keep the bound-pipeline check specific to compute, and exercise an unresolved/invalid artifact with zero recorded desktop dispatches followed by a normal accepted dispatch with nonzero UAV readback.
chatgpt-codex-connector[bot] commented 2026-11-24 11:38:15 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T11:38:15Z.

Review: COMMENTED


💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dbebfbc6b8

ℹ️ About Codex in GitHub

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

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

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

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

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6038509152 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1441#pullrequestreview-6038509152). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/apps/chatgpt-codex-connector) on 2026-11-24T11:38:15Z. **Review:** COMMENTED --- <!-- codex-review-receipt:v1 --> ### 💡 Codex Review Here are some automated review suggestions for this pull request. **Reviewed commit:** `dbebfbc6b8` <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". </details>
tedin7 commented 2026-11-24 11:52:43 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T11:52:43Z.

Review: COMMENTED


Reviewed commit 94731520e15f4f90587b22a44ef1597a9827ae74 (git diff origin/main...HEAD).

Checks

  • Linux: python3 tests/docs_links_check.py, python3 tests/bidi_controls_check.py, and git diff --check origin/main..HEAD passed. Title-neutrality clean.
  • Win2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP):
    • Debug (--preset dev): startup_compute_dxil_check, d3d12_xs_shim, startup_stub_consumer built (26.61s); ctest -R '^(startup_compute_dxil|startup_stubs)$' 2/2 passed (startup_compute_dxil 0.02s, startup_stubs 0.52s).
    • Release /O2 (--preset release): built (39.27s); 2/2 passed (startup_compute_dxil 0.01s, startup_stubs 0.37s).

Findings

  1. Incomplete readability probe in src/startup_stubs/compute_dxil.h:48: if (readable && !readable(code, 4)) return false; only checks the first 4 bytes, while the loop reads up to limit = bytes < 0x40000 ? bytes : 0x40000. If a caller passes a buffer readable for 4 bytes but unmapped/shorter before limit, std::memcmp will read past the readable region. Checking readable(code, limit) (after computing limit) fixes this, and tests/startup_compute_dxil_check.cpp can cover it with a callback that accepts 4 bytes and rejects limit.
  2. Byte-scan boundary in src/startup_stubs/compute_dxil.h:51-56: Scanning raw bytes up to 0x40000 means a container larger than 256 KiB with "xbox." past 0x40000 will pass desktop_dxil (and fall back via CreateComputePipelineState failure), and a non-DXIL payload containing "DXIL" or "xbox." could false-positive/false-negative. Worth either parsing the DXBC part table or noting the 0x40000 bound as a pre-filter.
  3. CachedPSO forwarding in src/startup_stubs/d3d12_xs_device.cpp: compute.CachedPSO = desc->CachedPSO; forwards any title-supplied cached PSO blob to desktop CreateComputePipelineState. Zeroing CachedPSO ({}) avoids passing a console cached blob to the desktop runtime.
  4. Coverage note: startup_compute_dxil and startup_stubs verify the classifier and DLL exports; device_create_compute_pipeline_x's CreateComputePipelineState path itself is not exercised by an end-to-end test here (as noted in the PR description).
<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6038693877 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1441#pullrequestreview-6038693877). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-24T11:52:43Z. **Review:** COMMENTED --- Reviewed commit `94731520e15f4f90587b22a44ef1597a9827ae74` (`git diff origin/main...HEAD`). ### Checks - **Linux**: `python3 tests/docs_links_check.py`, `python3 tests/bidi_controls_check.py`, and `git diff --check origin/main..HEAD` passed. Title-neutrality clean. - **Win2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP)**: - **Debug (`--preset dev`)**: `startup_compute_dxil_check`, `d3d12_xs_shim`, `startup_stub_consumer` built (`26.61s`); `ctest -R '^(startup_compute_dxil|startup_stubs)$'` **2/2 passed** (`startup_compute_dxil` `0.02s`, `startup_stubs` `0.52s`). - **Release `/O2` (`--preset release`)**: built (`39.27s`); **2/2 passed** (`startup_compute_dxil` `0.01s`, `startup_stubs` `0.37s`). ### Findings 1. **Incomplete readability probe in `src/startup_stubs/compute_dxil.h:48`**: `if (readable && !readable(code, 4)) return false;` only checks the first 4 bytes, while the loop reads up to `limit = bytes < 0x40000 ? bytes : 0x40000`. If a caller passes a buffer readable for 4 bytes but unmapped/shorter before `limit`, `std::memcmp` will read past the readable region. Checking `readable(code, limit)` (after computing `limit`) fixes this, and `tests/startup_compute_dxil_check.cpp` can cover it with a callback that accepts `4` bytes and rejects `limit`. 2. **Byte-scan boundary in `src/startup_stubs/compute_dxil.h:51-56`**: Scanning raw bytes up to `0x40000` means a container larger than 256 KiB with `"xbox."` past `0x40000` will pass `desktop_dxil` (and fall back via `CreateComputePipelineState` failure), and a non-DXIL payload containing `"DXIL"` or `"xbox."` could false-positive/false-negative. Worth either parsing the DXBC part table or noting the `0x40000` bound as a pre-filter. 3. **`CachedPSO` forwarding in `src/startup_stubs/d3d12_xs_device.cpp`**: `compute.CachedPSO = desc->CachedPSO;` forwards any title-supplied cached PSO blob to desktop `CreateComputePipelineState`. Zeroing `CachedPSO` (`{}`) avoids passing a console cached blob to the desktop runtime. 4. **Coverage note**: `startup_compute_dxil` and `startup_stubs` verify the classifier and DLL exports; `device_create_compute_pipeline_x`'s `CreateComputePipelineState` path itself is not exercised by an end-to-end test here (as noted in the PR description).
upstream-sync closed this pull request 2026-11-24 12:03:02 +00:00
chatgpt-codex-connector[bot commented 2026-11-24 12:03:17 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T11:33:53Z.


Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-24T11:38:18.084010Z dbebfbc PR opened
ℹ️ About Codex in GitHub

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

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

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

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7130258856 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1441#issuecomment-7130258856). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-24T11:33:53Z. --- <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"dbebfbc6b8b68d02f69ac46dd84814c1c07ef2ae","has_any_findings":true,"has_unresolved_findings":true,"status":"completed"},"security_review":{"commit_sha":null,"has_any_findings":null,"has_unresolved_findings":null,"status":null}} --> <details> <summary><strong>Codex Review Summary</strong>: ✅ Completed</summary> This comment shows the latest Codex review activity on this pull request. | Review | Status | Commit | Review trigger | | --- | --- | --- | --- | | 📝 **Code Review** | ✅ **Completed** <relative-time datetime="2026-11-24T11:38:18.084010Z">2026-11-24T11:38:18.084010Z</relative-time> | `dbebfbc` | PR opened | <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@codex review" or "@codex security review". Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. </details> </details>
triggered02 commented 2026-11-24 12:03:17 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-11-24T11:38:35Z.


Taken, and the first part is already pushed as 94731520: the production dispatch path is now inert — the slot 14 installation and the handler are removed, so placeholder compute behaviour is exactly what it was. I will not re-add it until the source-built GPU readback exists and shows a dispatch landing.

On the classifier you are right on all three counts, and the byte scan was the weak part:

  • it checks only the first four bytes are readable and then reads up to bytes — so it must validate the whole inspected range before touching it, which it does not;
  • it accepts any incidental DXIL text and rejects any incidental xbox. text, so a string in metadata decides the outcome;
  • the fixed 5-byte prefix misses names that are not spelled with that prefix.

Replacement I intend to build, in this order:

  1. No runtime byte classification at all. The runtime should not be deciding whether a module is valid — that belongs to the offline path that already exists. Device slot 62 will look up the validated artifact for the container's key (the X2W_SHADER_CACHE layout graphics already uses, <key>.cs.cso), build a real pipeline only when that artifact is present, and otherwise keep the placeholder with the reason "no validated module". The structural check then happens once, in the tool, not per run in a hot path.
  2. Offline producer reusing the #584 path: parse the container structurally (header plus part table with bounds checks, tools/probe_roots.py already does this), run the module through the existing validated-module path, and emit the artifact only for modules that pass — no byte scanning anywhere.
  3. Compute-specific bound check. When the dispatch comes back, it must test that the bound pipeline is a compute pipeline created through slot 62, not the shared graphics pipeline_real flag I used.
  4. The two-arm fixture you asked for: an unresolved/invalid artifact must produce zero recorded desktop dispatches, then a normal accepted artifact must produce a nonzero UAV readback. That ordering is the point — the negative arm proves the placeholder path did not quietly dispatch.

I have removed the unsound classifier from this branch's runtime path rather than leaving it in with a note, because leaving it would keep the objection open. The classifier test file goes with it until it tests the structural path instead.

I will report back with the artifact layout, the structural-check results and the fixture's two arms; if the cache-based design is not what you want for the runtime side, say so before I build the tool, since that choice decides where the validation lives.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7130360490 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1441#issuecomment-7130360490). Originally posted by [triggered02](https://github.com/triggered02) on 2026-11-24T11:38:35Z. --- Taken, and the first part is already pushed as `94731520`: **the production dispatch path is now inert** — the slot 14 installation and the handler are removed, so placeholder compute behaviour is exactly what it was. I will not re-add it until the source-built GPU readback exists and shows a dispatch landing. On the classifier you are right on all three counts, and the byte scan was the weak part: - it checks only the first four bytes are readable and then reads up to `bytes` — so it must validate the whole inspected range before touching it, which it does not; - it accepts any incidental `DXIL` text and rejects any incidental `xbox.` text, so a string in metadata decides the outcome; - the fixed 5-byte prefix misses names that are not spelled with that prefix. **Replacement I intend to build**, in this order: 1. **No runtime byte classification at all.** The runtime should not be deciding whether a module is valid — that belongs to the offline path that already exists. Device slot 62 will look up the validated artifact for the container's key (the `X2W_SHADER_CACHE` layout graphics already uses, `<key>.cs.cso`), build a real pipeline only when that artifact is present, and otherwise keep the placeholder with the reason "no validated module". The structural check then happens once, in the tool, not per run in a hot path. 2. **Offline producer reusing the #584 path**: parse the container structurally (header plus part table with bounds checks, `tools/probe_roots.py` already does this), run the module through the existing validated-module path, and emit the artifact only for modules that pass — no byte scanning anywhere. 3. **Compute-specific bound check.** When the dispatch comes back, it must test that the bound pipeline is a *compute* pipeline created through slot 62, not the shared graphics `pipeline_real` flag I used. 4. **The two-arm fixture** you asked for: an unresolved/invalid artifact must produce **zero** recorded desktop dispatches, then a normal accepted artifact must produce a **nonzero UAV readback**. That ordering is the point — the negative arm proves the placeholder path did not quietly dispatch. I have removed the unsound classifier from this branch's runtime path rather than leaving it in with a note, because leaving it would keep the objection open. The classifier test file goes with it until it tests the structural path instead. I will report back with the artifact layout, the structural-check results and the fixture's two arms; if the cache-based design is not what you want for the runtime side, say so before I build the tool, since that choice decides where the validation lives.
triggered02 commented 2026-11-24 12:03:18 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-11-24T11:42:34Z.


Both findings are correct; here is where each stands after the rework.

P1 — bind compute root state before recording dispatch. Correct and not covered by this branch: a real compute PSO still needs SetComputeRootSignature and the SetComputeRoot* slots, which are separate from the graphics setters mapped in build_tables() and currently fall through to trap_slot (or are dropped under X2W_D3D12_LIST_NOOP=1). Since the dispatch installation is reverted in 94731520, nothing can currently reach that state — but the point stands for the follow-up: the compute root setters have to be mapped and forwarded before a dispatch can be recorded, otherwise the pipeline builds and the dispatch still cannot run. I am treating it as a prerequisite for re-adding slot 14, not as a separate issue.

P2 — probe the full bytecode span before scanning. Correct, and it is why the byte-scan classifier is gone rather than patched: a 4-byte probe followed by raw memcmp across up to 256 KiB can fault on a descriptor whose declared length runs into an unmapped page. The replacement design removes the scan entirely — device slot 62 will look up an offline-validated artifact for the container key and either build from those bytes (which came from a validated file, bounded by its own length) or keep the placeholder. No runtime byte inspection, so no scan span to validate.

Both are recorded against the rework: compute root bindings first, then the validated-artifact lookup, then the two-arm readback fixture (invalid artifact → zero recorded dispatches, then accepted artifact → nonzero UAV readback).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7130445270 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1441#issuecomment-7130445270). Originally posted by [triggered02](https://github.com/triggered02) on 2026-11-24T11:42:34Z. --- Both findings are correct; here is where each stands after the rework. **P1 — bind compute root state before recording dispatch.** Correct and not covered by this branch: a real compute PSO still needs `SetComputeRootSignature` and the `SetComputeRoot*` slots, which are separate from the graphics setters mapped in `build_tables()` and currently fall through to `trap_slot` (or are dropped under `X2W_D3D12_LIST_NOOP=1`). Since the dispatch installation is reverted in `94731520`, nothing can currently reach that state — but the point stands for the follow-up: the compute root setters have to be mapped and forwarded before a dispatch can be recorded, otherwise the pipeline builds and the dispatch still cannot run. I am treating it as a prerequisite for re-adding slot 14, not as a separate issue. **P2 — probe the full bytecode span before scanning.** Correct, and it is why the byte-scan classifier is gone rather than patched: a 4-byte probe followed by raw `memcmp` across up to 256 KiB can fault on a descriptor whose declared length runs into an unmapped page. The replacement design removes the scan entirely — device slot 62 will look up an offline-validated artifact for the container key and either build from those bytes (which came from a validated file, bounded by its own length) or keep the placeholder. No runtime byte inspection, so no scan span to validate. Both are recorded against the rework: compute root bindings first, then the validated-artifact lookup, then the two-arm readback fixture (invalid artifact → zero recorded dispatches, then accepted artifact → nonzero UAV readback).
triggered02 commented 2026-11-24 12:03:19 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-11-24T11:53:40Z.


The branch is now at parity with main on purpose: 493404c4 withdrew the byte-scan classifier and its test, and device slot 62 is back to a placeholder, so the approach you objected to is fully gone rather than left in place with a note.

Converting this to draft rather than leaving an empty change under review. The rework I will build on this branch, in the order you set:

  1. offline producer — structural container parse plus the validated final-module path from #584; emits a validated artifact per compute container, no runtime byte scanning anywhere;
  2. runtime slot 62 — loads that validated artifact for the container key and builds the real pipeline, otherwise keeps the placeholder with reason "no validated module";
  3. compute root bindings — SetComputeRootSignature and the SetComputeRoot* slots forwarded to the desktop list (the Codex P1 point: without these a built PSO still cannot dispatch);
  4. dispatch + the two-arm fixture — unresolved/invalid artifact must record zero desktop dispatches, then an accepted artifact must produce a nonzero UAV readback. Slot 14 only comes back with that fixture.

Marking ready for review when step 4 exists, so the dispatch path is never live without the readback that proves it.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7130687630 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1441#issuecomment-7130687630). Originally posted by [triggered02](https://github.com/triggered02) on 2026-11-24T11:53:40Z. --- The branch is now at parity with `main` on purpose: `493404c4` withdrew the byte-scan classifier and its test, and device slot 62 is back to a placeholder, so the approach you objected to is fully gone rather than left in place with a note. Converting this to draft rather than leaving an empty change under review. The rework I will build on this branch, in the order you set: 1. **offline producer** — structural container parse plus the validated final-module path from #584; emits a validated artifact per compute container, no runtime byte scanning anywhere; 2. **runtime slot 62** — loads that validated artifact for the container key and builds the real pipeline, otherwise keeps the placeholder with reason "no validated module"; 3. **compute root bindings** — `SetComputeRootSignature` and the `SetComputeRoot*` slots forwarded to the desktop list (the Codex P1 point: without these a built PSO still cannot dispatch); 4. **dispatch + the two-arm fixture** — unresolved/invalid artifact must record **zero** desktop dispatches, then an accepted artifact must produce a **nonzero** UAV readback. Slot 14 only comes back with that fixture. Marking ready for review when step 4 exists, so the dispatch path is never live without the readback that proves it.
chatgpt-codex-connector[bot commented 2026-11-24 12:03:22 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T11:38:15Z.

Code review location: src/startup_stubs/d3d12_xs_device.cpp; line 1701

@@ -1690,6 +1691,18 @@ void __stdcall list_pipeline(Wrapper* self, void* pipeline)
     InterlockedIncrement(pass.pipeline_real ? &render_pipelines_real : &render_pipelines_missing);
     if (auto* list = recording(self); list && pass.pipeline_real) list->SetPipelineState(static_cast<ID3D12PipelineState*>(w->own().real));
 }
+// List slot 14 (desktop 10 + 4), Dispatch(x, y, z). With a placeholder compute pipeline this stays the
+// no-op it has always been; with a real one the dispatch is recorded so the desktop list actually runs
+// it. Keeping the placeholder path a no-op means nothing changes for console bytecode that cannot run.
+void __stdcall list_dispatch(Wrapper* self, UINT x, UINT y, UINT z)
+{
+    if (!pass_of(self).pipeline_real) return;
+    if (auto* list = recording(self)) {
+        list->Dispatch(x, y, z);

P1 Badge Bind compute root state before recording dispatch

In render_mode, a real compute PSO still needs SetComputeRootSignature and any used SetComputeRoot* resources or constants set on the command list before dispatch; these methods are separate from the graphics root setters mapped in build_tables(), so their slots still hit trap_slot by default or are dropped when X2W_D3D12_LIST_NOOP=1. A normal compute pass therefore traps before reaching this call or reaches it without valid compute bindings, so this path cannot run real work; route the compute-root methods before forwarding Dispatch.

Useful? React with 👍 / 👎.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review-comment:4679421167 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1441#discussion_r4679421167). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-24T11:38:15Z. **Code review location:** `src/startup_stubs/d3d12_xs_device.cpp`; line 1701 ~~~~diff @@ -1690,6 +1691,18 @@ void __stdcall list_pipeline(Wrapper* self, void* pipeline) InterlockedIncrement(pass.pipeline_real ? &render_pipelines_real : &render_pipelines_missing); if (auto* list = recording(self); list && pass.pipeline_real) list->SetPipelineState(static_cast<ID3D12PipelineState*>(w->own().real)); } +// List slot 14 (desktop 10 + 4), Dispatch(x, y, z). With a placeholder compute pipeline this stays the +// no-op it has always been; with a real one the dispatch is recorded so the desktop list actually runs +// it. Keeping the placeholder path a no-op means nothing changes for console bytecode that cannot run. +void __stdcall list_dispatch(Wrapper* self, UINT x, UINT y, UINT z) +{ + if (!pass_of(self).pipeline_real) return; + if (auto* list = recording(self)) { + list->Dispatch(x, y, z); ~~~~ --- **<sub><sub>![P1 Badge](https://img.shields.io/badge/P1-orange?style=flat)</sub></sub> Bind compute root state before recording dispatch** In `render_mode`, a real compute PSO still needs `SetComputeRootSignature` and any used `SetComputeRoot*` resources or constants set on the command list before dispatch; these methods are separate from the graphics root setters mapped in `build_tables()`, so their slots still hit `trap_slot` by default or are dropped when `X2W_D3D12_LIST_NOOP=1`. A normal compute pass therefore traps before reaching this call or reaches it without valid compute bindings, so this path cannot run real work; route the compute-root methods before forwarding `Dispatch`. Useful? React with 👍 / 👎. <!-- codex-code-review-finding:v1 -->
chatgpt-codex-connector[bot commented 2026-11-24 12:03:22 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T11:38:15Z.

Code review location: src/startup_stubs/compute_dxil.h; line 19

@@ -0,0 +1,31 @@
+// Classifier for compute bytecode handed to the desktop compute-pipeline path (issue #1412).
+//
+// A container can be desktop DXIL and still be unusable on the desktop: modules that name a console
+// intrinsic fail validation with "External function 'xbox.…' is not a DXIL function", so the pipeline
+// must not be built from them. Keeping the decision in one pure function lets a source-built control
+// check the classifier without a D3D12 device.
+#pragma once
+
+#include <cstddef>
+#include <cstring>
+
+namespace x2w_compute {
+
+// Bounded scan of a DXBC container. True only when it carries a DXIL part and names no console
+// intrinsic. `bytes` is the declared container length; a buffer shorter than that is not trusted.
+inline bool desktop_dxil(const void* code, std::size_t bytes, bool (*readable)(const void*, std::size_t) = nullptr)
+{
+    if (!code || bytes < 8) return false;
+    if (readable && !readable(code, 4)) return false;

P2 Badge Probe the full bytecode span before scanning

For a malformed or truncated descriptor whose first 32 bytes are mapped but whose declared BytecodeLength extends into an unmapped or guard page, this 4-byte probe passes and the loop below uses raw memcmp reads across up to 256 KiB. The shim can therefore fault instead of retaining the placeholder; check the entire scanned prefix or probe each read window before scanning.

Useful? React with 👍 / 👎.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review-comment:4679421182 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1441#discussion_r4679421182). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-24T11:38:15Z. **Code review location:** `src/startup_stubs/compute_dxil.h`; line 19 ~~~~diff @@ -0,0 +1,31 @@ +// Classifier for compute bytecode handed to the desktop compute-pipeline path (issue #1412). +// +// A container can be desktop DXIL and still be unusable on the desktop: modules that name a console +// intrinsic fail validation with "External function 'xbox.…' is not a DXIL function", so the pipeline +// must not be built from them. Keeping the decision in one pure function lets a source-built control +// check the classifier without a D3D12 device. +#pragma once + +#include <cstddef> +#include <cstring> + +namespace x2w_compute { + +// Bounded scan of a DXBC container. True only when it carries a DXIL part and names no console +// intrinsic. `bytes` is the declared container length; a buffer shorter than that is not trusted. +inline bool desktop_dxil(const void* code, std::size_t bytes, bool (*readable)(const void*, std::size_t) = nullptr) +{ + if (!code || bytes < 8) return false; + if (readable && !readable(code, 4)) return false; ~~~~ --- **<sub><sub>![P2 Badge](https://img.shields.io/badge/P2-yellow?style=flat)</sub></sub> Probe the full bytecode span before scanning** For a malformed or truncated descriptor whose first 32 bytes are mapped but whose declared `BytecodeLength` extends into an unmapped or guard page, this 4-byte probe passes and the loop below uses raw `memcmp` reads across up to 256 KiB. The shim can therefore fault instead of retaining the placeholder; check the entire scanned prefix or probe each read window before scanning. Useful? React with 👍 / 👎. <!-- codex-code-review-finding:v1 -->
upstream-sync reopened this pull request 2026-11-24 13:00:27 +00:00
triggered02 commented 2026-11-24 13:00:53 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-11-24T12:23:24Z.


Thanks — and apologies for the churn you reviewed against 94731520: I closed this PR by mistake at 11:54 and have reopened it. The branch has moved on since your review; here is where each finding stands.

1. Incomplete readability probe (compute_dxil.h:48) — fixed by removal. The whole byte-scan classifier and its test are withdrawn (493404c4), not patched: the runtime no longer inspects bytecode at all, so there is no partial probe to widen.

2. Byte-scan boundary / 0x40000 pre-filter — same answer. Your point that a "DXIL" or "xbox." string anywhere in the payload decides the outcome is exactly why it is gone rather than bounded.

The replacement is the design R0Y00 asked for: device slot 62 hashes the container the same way the graphics path does (fnv_bytes, 16 hex digits) and loads <key>.cs.cso from X2W_SHADER_CACHE (d2f05ba0); tools/startup/compute_cache.py produces those files by delegating retarget/gate/validate/sign to tools/dxil_retarget.py (eca9a67e), so the structural check happens once, offline. startup_compute_cache pins the key in both directions and the refusal path (9/9).

3. CachedPSO forwarding — you were right, and it was still live in the new code. Fixed in 6dcb79eb: the compute description now zeroes CachedPSO with a comment saying why. A console cached blob must not be handed to desktop CreateComputePipelineState.

4. No end-to-end coverage of the CreateComputePipelineState path — still true, and it is the remaining work rather than something I am claiming. The production dispatch path stays inert (slot 14 is not installed) until the two-arm fixture exists: an unresolved/invalid artifact must record zero desktop dispatches, then a normal accepted artifact must produce a nonzero UAV readback. Compute root bindings (SetComputeRootSignature and SetComputeRoot*) have to be forwarded first, since a built PSO still cannot dispatch without them — that is the Codex P1 on this PR and the next thing I am wiring.

One note that may matter for the review: the fnv_bytes seed in d3d12_draw.inl is 1469598103934665603, one digit short of the canonical FNV-1a 64 basis (14695981039346656037). The cache is keyed by whatever the runtime computes, so the publisher matches the runtime instead of the spec; worth a deliberate decision some time, since correcting it would invalidate existing cached translations.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7131370389 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1441#issuecomment-7131370389). Originally posted by [triggered02](https://github.com/triggered02) on 2026-11-24T12:23:24Z. --- Thanks — and apologies for the churn you reviewed against `94731520`: I closed this PR by mistake at 11:54 and have reopened it. The branch has moved on since your review; here is where each finding stands. **1. Incomplete readability probe (compute_dxil.h:48)** — fixed by removal. The whole byte-scan classifier and its test are withdrawn (`493404c4`), not patched: the runtime no longer inspects bytecode at all, so there is no partial probe to widen. **2. Byte-scan boundary / 0x40000 pre-filter** — same answer. Your point that a `"DXIL"` or `"xbox."` string anywhere in the payload decides the outcome is exactly why it is gone rather than bounded. The replacement is the design R0Y00 asked for: device slot 62 hashes the container the same way the graphics path does (`fnv_bytes`, 16 hex digits) and loads `<key>.cs.cso` from `X2W_SHADER_CACHE` (`d2f05ba0`); `tools/startup/compute_cache.py` produces those files by delegating retarget/gate/validate/sign to `tools/dxil_retarget.py` (`eca9a67e`), so the structural check happens once, offline. `startup_compute_cache` pins the key in both directions and the refusal path (9/9). **3. `CachedPSO` forwarding** — you were right, and it was still live in the new code. Fixed in `6dcb79eb`: the compute description now zeroes `CachedPSO` with a comment saying why. A console cached blob must not be handed to desktop `CreateComputePipelineState`. **4. No end-to-end coverage of the `CreateComputePipelineState` path** — still true, and it is the remaining work rather than something I am claiming. The production dispatch path stays inert (slot 14 is not installed) until the two-arm fixture exists: an unresolved/invalid artifact must record **zero** desktop dispatches, then a normal accepted artifact must produce a **nonzero** UAV readback. Compute root bindings (`SetComputeRootSignature` and `SetComputeRoot*`) have to be forwarded first, since a built PSO still cannot dispatch without them — that is the Codex P1 on this PR and the next thing I am wiring. One note that may matter for the review: the `fnv_bytes` seed in `d3d12_draw.inl` is `1469598103934665603`, one digit short of the canonical FNV-1a 64 basis (`14695981039346656037`). The cache is keyed by whatever the runtime computes, so the publisher matches the runtime instead of the spec; worth a deliberate decision some time, since correcting it would invalidate existing cached translations.
triggered02 commented 2026-11-24 13:00:54 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-11-24T12:32:27Z.


Progress summary, and the fixture design I intend to build next — flagging it before I write it, since the two-arm shape is the condition on this PR.

Landed since your review

  • d2f05ba0 — slot 62 hashes the container with fnv_bytes (same helper and %016llx format as the graphics path) and loads <key>.cs.cso from X2W_SHADER_CACHE; a hit builds a real CreateComputePipelineState, a miss keeps the placeholder and logs no validated module. No byte inspection anywhere.
  • eca9a67e — tools/startup/compute_cache.py publishes those files by delegating retarget/gate/validate/sign to tools/dxil_retarget.py; startup_compute_cache pins the key in both directions plus the refusal path (9/9).
  • 6dcb79eb — tedin7's finding: CachedPSO is zeroed instead of forwarding a console cached blob to desktop CreateComputePipelineState.
  • c9e185a3 — compute root bindings. The slot numbers are measured, not inferred: a title run's per-frame command-list census is … 13:35 14:1 … 33:1 34:25 35:2 36:37 … 44:2 …, so the title calls Dispatch (slot 14) once per frame, and slots 33/35 sit one below the known graphics twins 34 (SetGraphicsRootSignature) and 36 (descriptor table). Slot 33 → SetComputeRootSignature and slot 43 → SetComputeRootShaderResourceView are forwarded. Slot 35 is left unwired because its graphics twin at 36 is not forwarded either — I'd rather ask than invent a convention.

Fixture design (the condition for marking this ready)

Two arms, in one test, in that order:

  1. Unresolved/invalid arm — a pending directory containing something that is not a valid module. The publisher writes <key>.fail and no .cs.cso; with X2W_SHADER_CACHE pointed at that directory the stand-in builds no compute pipeline, and the fixture asserts zero recorded desktop dispatches. This is the arm that proves the placeholder path does not quietly dispatch.
  2. Accepted arm — a trivial compute shader compiled with DXC into a container, published through compute_cache.py so the module goes through the real validated path, then bound and dispatched through the stand-in; the fixture copies the UAV to a readback buffer and asserts a nonzero result.

I would drive it the way tests/startup_stream_consumer.cpp + startup_stream_draw_check.py drive the graphics path (device via D3D12XboxCreateDevice, list through the stand-in, python-side orchestration and assertions).

Two things I want your call on before I build:

  • Is publishing through compute_cache.py the right "accepted" arm, or would you rather the fixture write <key>.cs.cso directly and keep the publisher out of the GPU test?
  • Slot 35 (SetComputeRootDescriptorTable): mirror the graphics side (which does not forward tables) or forward compute tables only? The census says the title calls it twice per frame, so silence here is a guess either way.

Dispatch itself stays uninstalled until arm 2 passes, so nothing can dispatch in production before the readback proves it.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7131580851 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1441#issuecomment-7131580851). Originally posted by [triggered02](https://github.com/triggered02) on 2026-11-24T12:32:27Z. --- Progress summary, and the fixture design I intend to build next — flagging it before I write it, since the two-arm shape is the condition on this PR. ## Landed since your review - `d2f05ba0` — slot 62 hashes the container with `fnv_bytes` (same helper and `%016llx` format as the graphics path) and loads `<key>.cs.cso` from `X2W_SHADER_CACHE`; a hit builds a real `CreateComputePipelineState`, a miss keeps the placeholder and logs `no validated module`. No byte inspection anywhere. - `eca9a67e` — `tools/startup/compute_cache.py` publishes those files by delegating retarget/gate/validate/sign to `tools/dxil_retarget.py`; `startup_compute_cache` pins the key in both directions plus the refusal path (9/9). - `6dcb79eb` — tedin7's finding: `CachedPSO` is zeroed instead of forwarding a console cached blob to desktop `CreateComputePipelineState`. - `c9e185a3` — compute root bindings. The slot numbers are measured, not inferred: a title run's per-frame command-list census is `… 13:35 14:1 … 33:1 34:25 35:2 36:37 … 44:2 …`, so **the title calls `Dispatch` (slot 14) once per frame**, and slots 33/35 sit one below the known graphics twins 34 (`SetGraphicsRootSignature`) and 36 (descriptor table). Slot 33 → `SetComputeRootSignature` and slot 43 → `SetComputeRootShaderResourceView` are forwarded. Slot 35 is left unwired because its graphics twin at 36 is not forwarded either — I'd rather ask than invent a convention. ## Fixture design (the condition for marking this ready) Two arms, in one test, in that order: 1. **Unresolved/invalid arm** — a pending directory containing something that is not a valid module. The publisher writes `<key>.fail` and no `.cs.cso`; with `X2W_SHADER_CACHE` pointed at that directory the stand-in builds no compute pipeline, and the fixture asserts **zero** recorded desktop dispatches. This is the arm that proves the placeholder path does not quietly dispatch. 2. **Accepted arm** — a trivial compute shader compiled with DXC into a container, published through `compute_cache.py` so the module goes through the real validated path, then bound and dispatched through the stand-in; the fixture copies the UAV to a readback buffer and asserts a **nonzero** result. I would drive it the way `tests/startup_stream_consumer.cpp` + `startup_stream_draw_check.py` drive the graphics path (device via `D3D12XboxCreateDevice`, list through the stand-in, python-side orchestration and assertions). Two things I want your call on before I build: - Is publishing through `compute_cache.py` the right "accepted" arm, or would you rather the fixture write `<key>.cs.cso` directly and keep the publisher out of the GPU test? - Slot 35 (`SetComputeRootDescriptorTable`): mirror the graphics side (which does not forward tables) or forward compute tables only? The census says the title calls it twice per frame, so silence here is a guess either way. `Dispatch` itself stays uninstalled until arm 2 passes, so nothing can dispatch in production before the readback proves it.
ChazY11 commented 2026-11-24 14:03:24 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by ChazY11 on 2026-11-24T13:18:34Z.


The three hard-coded keys check out against the runtime helper — and one thing worth a comment

Independent reviewer, not the author. Reviewed 14352e25; nothing pushed to the branch.

Environment: Windows 11 build 26300.9974, MSVC 14.44.35207, SDK 10.0.26100, Python from out/pe-env.

cmake --preset dev
cmake --build --preset dev
ctest --preset dev --no-tests=error -R '^(startup_compute_cache|cpu_shim_compute_(warp|hardware))$' -V

3 of 3 pass, and the two shim compute cases are unchanged (they still report the size=18446744073709551615 attr=0xa8004000
refusal path and exit 17 in that probe, as before this change).

I recomputed the three keys independently

Writing FNV-1a myself with the seed and prime taken from fnv_bytes in src/startup_stubs/d3d12_draw.inl:

seed = 1469598103934665603, prime = 1099511628211

b""     -> 14650fb0739d0383      test expects 0x14650FB0739D0383
b"a"    -> 44bd8ad473cd9906      test expects "44bd8ad473cd9906"
b"abc"  -> e16801510db89efd      test expects "e16801510db89efd"

All three match, so the fixture's hard-coded oracle is the same function the pipeline lookup uses, which is the property
that makes the file name correct rather than merely plausible.

One observation, worth one line of comment

That seed is not the canonical FNV-1a 64 offset basis. Canonical is 14695981039346656037; fnv_bytes uses
1469598103934665603, i.e. one digit shorter, and tools/startup/compute_cache.py inherits it deliberately. It works
fine as an internal key, but it is exactly the kind of constant someone later "corrects" after checking it against a
reference implementation — which would silently invalidate every .cs.cso and .fail file already on disk.

A comment on the C++ default argument saying the value is intentional and shared with the Python tool would remove that
risk. I am not asking for it in this PR; it is equally fine as a follow-up if you prefer.

Verdict

Reviewed 14352e25. Builds clean, the new case passes, the shim compute cases are unaffected, and the key constants are
verifiably the runtime's own function rather than a copy of a reference implementation. No objection from me.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7132644131 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1441#issuecomment-7132644131). Originally posted by [ChazY11](https://github.com/ChazY11) on 2026-11-24T13:18:34Z. --- ## The three hard-coded keys check out against the runtime helper — and one thing worth a comment Independent reviewer, not the author. Reviewed `14352e25`; nothing pushed to the branch. Environment: Windows 11 build 26300.9974, MSVC 14.44.35207, SDK 10.0.26100, Python from `out/pe-env`. ```powershell cmake --preset dev cmake --build --preset dev ctest --preset dev --no-tests=error -R '^(startup_compute_cache|cpu_shim_compute_(warp|hardware))$' -V ``` 3 of 3 pass, and the two shim compute cases are unchanged (they still report the `size=18446744073709551615 attr=0xa8004000` refusal path and exit 17 in that probe, as before this change). ### I recomputed the three keys independently Writing FNV-1a myself with the seed and prime taken from `fnv_bytes` in `src/startup_stubs/d3d12_draw.inl`: ```text seed = 1469598103934665603, prime = 1099511628211 b"" -> 14650fb0739d0383 test expects 0x14650FB0739D0383 b"a" -> 44bd8ad473cd9906 test expects "44bd8ad473cd9906" b"abc" -> e16801510db89efd test expects "e16801510db89efd" ``` All three match, so the fixture's hard-coded oracle is the same function the pipeline lookup uses, which is the property that makes the file name correct rather than merely plausible. ### One observation, worth one line of comment That seed is **not** the canonical FNV-1a 64 offset basis. Canonical is `14695981039346656037`; `fnv_bytes` uses `1469598103934665603`, i.e. one digit shorter, and `tools/startup/compute_cache.py` inherits it deliberately. It works fine as an internal key, but it is exactly the kind of constant someone later "corrects" after checking it against a reference implementation — which would silently invalidate every `.cs.cso` and `.fail` file already on disk. A comment on the C++ default argument saying the value is intentional and shared with the Python tool would remove that risk. I am not asking for it in this PR; it is equally fine as a follow-up if you prefer. ### Verdict Reviewed `14352e25`. Builds clean, the new case passes, the shim compute cases are unaffected, and the key constants are verifiably the runtime's own function rather than a copy of a reference implementation. No objection from me.
triggered02 commented 2026-11-24 15:02:22 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-11-24T14:23:12Z.


Taking the readback arm you asked for. Two design points I want to pin down before I build it, because they decide what the fixture can honestly prove on this machine.

What I plan to do. A fixture that drives the shim's console-side objects (not the desktop D3D12 API directly), in two arms on WARP:

  1. Unresolved artifact arm. X2W_SHADER_CACHE points at a directory with no <key>.cs.cso for the container, so slot 62 takes the placeholder path. Bind that pipeline and dispatch, then assert zero desktop dispatches were recorded and that the UAV buffer still reads as the initial contents.
  2. Accepted artifact arm. Publish the validated module under the same key, rebuild the whole chain from origin/main, create the pipeline again (real CreateComputePipelineState), bind, dispatch, and assert nonzero UAV readback with the expected pattern.

Question 1 — how should "zero recorded desktop dispatches" be observable? I can add a small counter to the shim and export it (x2w_d3d12_dispatch_count(), incremented only where the forward to ID3D12GraphicsCommandList::Dispatch actually happens). That is direct evidence rather than inferring from the trap log. It adds one export that exists only for this check — is that acceptable, or would you rather the fixture read the existing X2W_TRAP_LOG/diagnostic counters and I infer from those?

Question 2 — the accepted arm needs a real accepted module. tools/startup/compute_cache.py publishes one by shelling out to dxil_retarget.py with retarget + intrinsic gate + validation + signing. Can the fixture call that tool at test time (it needs the dxc/validator environment the build already sets up), or should the fixture embed a fixed pre-validated .cs.cso as a checked-in test asset? The second is hermetic but means a binary blob in the tree; the first proves the published path end to end but makes the test depend on the toolchain being present.

What this will not establish. That the title's own compute shader dispatches correctly, or anything about the game's compute workload — only that this shim refuses an unrecognised artifact without dispatching, and forwards a validated one that writes a UAV. Those are the two behaviours tied to the dispatch gate.

The production dispatch path stays gated on X2W_COMPUTE_DISPATCH=1 and on the bound pipeline having come through slot 62, as it is in this branch.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7134289099 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1441#issuecomment-7134289099). Originally posted by [triggered02](https://github.com/triggered02) on 2026-11-24T14:23:12Z. --- Taking the readback arm you asked for. Two design points I want to pin down before I build it, because they decide what the fixture can honestly prove on this machine. **What I plan to do.** A fixture that drives the shim's console-side objects (not the desktop D3D12 API directly), in two arms on WARP: 1. **Unresolved artifact arm.** `X2W_SHADER_CACHE` points at a directory with no `<key>.cs.cso` for the container, so slot 62 takes the placeholder path. Bind that pipeline and dispatch, then assert **zero desktop dispatches were recorded** and that the UAV buffer still reads as the initial contents. 2. **Accepted artifact arm.** Publish the validated module under the same key, rebuild the whole chain from `origin/main`, create the pipeline again (real `CreateComputePipelineState`), bind, dispatch, and assert **nonzero UAV readback** with the expected pattern. **Question 1 — how should "zero recorded desktop dispatches" be observable?** I can add a small counter to the shim and export it (`x2w_d3d12_dispatch_count()`, incremented only where the forward to `ID3D12GraphicsCommandList::Dispatch` actually happens). That is direct evidence rather than inferring from the trap log. It adds one export that exists only for this check — is that acceptable, or would you rather the fixture read the existing `X2W_TRAP_LOG`/diagnostic counters and I infer from those? **Question 2 — the accepted arm needs a real accepted module.** `tools/startup/compute_cache.py` publishes one by shelling out to `dxil_retarget.py` with retarget + intrinsic gate + validation + signing. Can the fixture call that tool at test time (it needs the dxc/validator environment the build already sets up), or should the fixture embed a fixed pre-validated `.cs.cso` as a checked-in test asset? The second is hermetic but means a binary blob in the tree; the first proves the published path end to end but makes the test depend on the toolchain being present. **What this will not establish.** That the title's own compute shader dispatches correctly, or anything about the game's compute workload — only that this shim refuses an unrecognised artifact without dispatching, and forwards a validated one that writes a UAV. Those are the two behaviours tied to the dispatch gate. The production dispatch path stays gated on `X2W_COMPUTE_DISPATCH=1` and on the bound pipeline having come through slot 62, as it is in this branch.
R0Y00 commented 2026-11-24 23:03:39 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T22:35:24Z.


Please build the fixture shader from checked-in HLSL with the existing DXC dependency, then run the normal compute-cache publication path using the validator and signer. This covers the deployed artifact path and keeps the fixture source-built. Reuse the existing dispatch accounting or add a counter only in a test build of the shim if the existing diagnostic cannot distinguish a recorded call. The negative arm should assert both zero forwarded dispatches and an unchanged UAV after the fence. The positive arm should compare the exact output, including untouched sentinel words.

Keep the existing opt-in dispatch and slot 62 provenance checks. #1974/#1975 are working on the command-list state and root constants. Please link the fixture or its interface there so we can reuse the same two-arm readback instead of adding a second production slot 14 handler.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7146411522 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1441#issuecomment-7146411522). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T22:35:24Z. --- Please build the fixture shader from checked-in HLSL with the existing DXC dependency, then run the normal compute-cache publication path using the validator and signer. This covers the deployed artifact path and keeps the fixture source-built. Reuse the existing dispatch accounting or add a counter only in a test build of the shim if the existing diagnostic cannot distinguish a recorded call. The negative arm should assert both zero forwarded dispatches and an unchanged UAV after the fence. The positive arm should compare the exact output, including untouched sentinel words. Keep the existing opt-in dispatch and slot 62 provenance checks. #1974/#1975 are working on the command-list state and root constants. Please link the fixture or its interface there so we can reuse the same two-arm readback instead of adding a second production slot 14 handler.
triggered02 commented 2026-11-25 18:01:22 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-11-25T17:59:52Z.


Understood — the fixture has to exercise the deployed artifact path, not a hand-placed .cso. Plan for the fixture, keeping your constraints:

  1. Shader from checked-in HLSL, built by the existing DXC dependency. The fixture shader source is checked in and compiled by DXC_EXECUTABLE in the build (no prebuilt blob, no game data), so ps_6_0/cs_6_0 bytecode is produced by the same toolchain the build already requires.
  2. Normal compute-cache publication, with the validator and signer. The compiled container goes through the cache's own publication path — the key/manifest/.cso write the slot 67 compute request path uses — and the container is validated and signed the way the tree already does it: tools/dxil_retarget.py::sign_container, which calls root_probe --sign (dxil.dll) after validation, instead of copying a bytecode file into the cache directory. If any part of the manifest must be hand-built for a fixture-only key, I will say so explicitly in the fixture header rather than hide it.
  3. Negative arm: assert both zero forwarded dispatches and an unchanged UAV after the fence. I will check the accounting that #1974 landed in main first — if it distinguishes a recorded dispatch, reuse it; if it cannot, add a counter in a test build of the shim only, never in the shipping path.
  4. Positive arm: compare the exact output words, including untouched sentinel words, so a partial write cannot pass.
  5. Keep the existing opt-in dispatch and slot 62 provenance checks unchanged.

Two things about the state of this PR:

  • Current head bcf24db8 is CONFLICTING with main (the conflict list in the review is against cf97bee1; origin/main is now 1a0e506d). First step is re-creating the branch as one clean commit on current main, then building the fixture on top — I will not keep a merge chain in the history.
  • #1974 is closed and the slot 14 handler accounts for dispatches in main now, while #1975 is still open. For "link the fixture or its interface there so we can reuse the same two-arm readback": I will expose the two-arm readback (UAV sentinel words + forwarded-dispatch count, with the fence) as one reusable helper in the fixture, and link it from #1975. If the intent is instead to hang it off the slot 14 handler's accounting, point me at the symbol you want referenced and I will link that instead of a second interface.

I will post the re-created sha here, then the fixture sha with the arm results. If you would rather this wait until #1975 lands the root-constant path, say so and I will hold the rebase until then.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7170293370 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1441#issuecomment-7170293370). Originally posted by [triggered02](https://github.com/triggered02) on 2026-11-25T17:59:52Z. --- Understood — the fixture has to exercise the deployed artifact path, not a hand-placed `.cso`. Plan for the fixture, keeping your constraints: 1. **Shader from checked-in HLSL, built by the existing DXC dependency.** The fixture shader source is checked in and compiled by `DXC_EXECUTABLE` in the build (no prebuilt blob, no game data), so `ps_6_0`/`cs_6_0` bytecode is produced by the same toolchain the build already requires. 2. **Normal compute-cache publication, with the validator and signer.** The compiled container goes through the cache's own publication path — the key/manifest/`.cso` write the slot 67 compute request path uses — and the container is validated and signed the way the tree already does it: `tools/dxil_retarget.py::sign_container`, which calls `root_probe --sign` (dxil.dll) after validation, instead of copying a bytecode file into the cache directory. If any part of the manifest must be hand-built for a fixture-only key, I will say so explicitly in the fixture header rather than hide it. 3. **Negative arm:** assert both zero forwarded dispatches and an unchanged UAV after the fence. I will check the accounting that #1974 landed in `main` first — if it distinguishes a recorded dispatch, reuse it; if it cannot, add a counter in a test build of the shim only, never in the shipping path. 4. **Positive arm:** compare the exact output words, including untouched sentinel words, so a partial write cannot pass. 5. **Keep** the existing opt-in dispatch and slot 62 provenance checks unchanged. Two things about the state of this PR: - Current head `bcf24db8` is CONFLICTING with `main` (the conflict list in the review is against `cf97bee1`; `origin/main` is now `1a0e506d`). First step is re-creating the branch as one clean commit on current `main`, then building the fixture on top — I will not keep a merge chain in the history. - #1974 is closed and the slot 14 handler accounts for dispatches in `main` now, while #1975 is still open. For "link the fixture or its interface there so we can reuse the same two-arm readback": I will expose the two-arm readback (UAV sentinel words + forwarded-dispatch count, with the fence) as one reusable helper in the fixture, and link it from #1975. If the intent is instead to hang it off the slot 14 handler's accounting, point me at the symbol you want referenced and I will link that instead of a second interface. I will post the re-created sha here, then the fixture sha with the arm results. If you would rather this wait until #1975 lands the root-constant path, say so and I will hold the rebase until then.
triggered02 commented 2026-11-25 19:04:16 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-11-25T18:53:59Z.


Correction to my previous comment, and the rebase result.

My earlier reply described the wrong code. I described a compute_dxil.h classifier and a tests/startup_compute_dxil_check.cpp boundary fixture — neither exists at this branch head (bcf24db8) or in any ref in the fork. This PR's head is the earlier slice: a publisher for <key>.cs.cso, real slot-62 compute-PSO creation from that published module, and slot-14 Dispatch behind X2W_COMPUTE_DISPATCH=1; its own CTest is startup_compute_cache (tests/startup_compute_cache_check.py + tools/startup/compute_cache.py). The PR body described a revision that was never pushed; I have updated the body to describe this head instead of leaving it wrong. Sorry for the noise.

Rebased onto main b976e8bc, head is now e133bf6a (was bcf24db8), MERGEABLE. Four commits replayed:

e133bf6a startup-d3d12: add the compute dispatch path behind an explicit gate
b5a90bc9 startup-d3d12: do not forward a console cached-PSO blob to the desktop runtime
4d196f2d startup-d3d12: publish compute modules under the key the runtime looks them up by
edd1f35b startup-d3d12: load validated compute modules by key from the shader cache

One commit was dropped because main superseded it: e9ef89af ("forward the compute root signature and compute root SRV") replayed empty. main now has a richer slot 33 (deferred heap-indexed root + binding trace) and a slot 43 that binds upload-page-backed compute root SRVs after indexed-indirect validation. The PR version also read pass.root (the graphics root set at slot 34) rather than the compute root, so replaying it verbatim would have been a defect. I did not replace it.

Conflict resolutions (all in src/startup_stubs/d3d12_xs_device.cpp plus CMake): slot 62 keeps main's note_pipeline/note_compute_binding_pipeline calls and adds the cache load, wrapping real_pipeline instead of nullptr and setting own().compute_pipeline; the PR's parallel compute_pipeline_real was dropped because main's compute_pipeline covers it; slot 14 keeps main's barrier/root handlers and adds list_dispatch gated on pass.compute_pipeline; the PR's duplicate list_typed[33]/[43] registrations were removed because main already registers both. The CachedPSO = {} fix replayed cleanly. CMakeLists.txt keeps main's startup_live_view block and inserts the startup_compute_cache CTest beside it.

Verified on e133bf6a: cmake --preset dev + cmake --build --preset dev --target d3d12_xs_shim with MSVC → exit 0, d3d12_xs.dll links, so the rebased slot-62/14 code compiles against current main. tests/startup_compute_cache_check.py → PASS (9 checks), docs_links_check.py (469 links), bidi_controls_check.py (1739 files), startup_tools_lint_check.py (10 files), dependency_paths_check.py → all exit 0; git diff --check clean.

What CI can and cannot prove here. CI can compile the shim and run ctest -R '^startup_compute_cache$' (pure Python). There is no device-level fixture in this head for the runtime path — real slot-62 PSO creation from <key>.cs.cso and slot-14 recording with X2W_COMPUTE_DISPATCH=1 are unmeasured. startup_compute_binding_trace_warp still covers slot-14 observation with the gate off.

Two real gaps this head leaves, stated rather than hidden: (1) compute root SRVs are limited to upload-page pointers; the graphics slot-44 readable_window/upload_from_title fallback has no compute equivalent, so a title-memory window read would be refused where graphics accepts it; (2) X2W_COMPUTE_DISPATCH is undocumented and sampled once in build_tables() at device creation.

What I plan next, unless you want it differently: implement the DXC-built fixture shader and the two-arm readback you asked for (checked-in HLSL compiled by DXC_EXECUTABLE, published through the normal compute-cache path with tools/dxil_retarget.py::sign_container validating and signing via root_probe --sign, negative arm zero forwarded dispatches plus unchanged UAV after the fence, positive arm exact words including untouched sentinels), and expose that readback as one reusable helper for #1975. That is what turns this from compile-checked into evidenced. Say if you want the compute root SRV fallback (1) folded into the same change or handled separately.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7171553843 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1441#issuecomment-7171553843). Originally posted by [triggered02](https://github.com/triggered02) on 2026-11-25T18:53:59Z. --- Correction to my previous comment, and the rebase result. **My earlier reply described the wrong code.** I described a `compute_dxil.h` classifier and a `tests/startup_compute_dxil_check.cpp` boundary fixture — neither exists at this branch head (`bcf24db8`) or in any ref in the fork. This PR's head is the earlier slice: a publisher for `<key>.cs.cso`, real slot-62 compute-PSO creation from that published module, and slot-14 `Dispatch` behind `X2W_COMPUTE_DISPATCH=1`; its own CTest is `startup_compute_cache` (`tests/startup_compute_cache_check.py` + `tools/startup/compute_cache.py`). The PR body described a revision that was never pushed; I have updated the body to describe this head instead of leaving it wrong. Sorry for the noise. **Rebased onto `main` `b976e8bc`, head is now `e133bf6a`** (was `bcf24db8`), MERGEABLE. Four commits replayed: ``` e133bf6a startup-d3d12: add the compute dispatch path behind an explicit gate b5a90bc9 startup-d3d12: do not forward a console cached-PSO blob to the desktop runtime 4d196f2d startup-d3d12: publish compute modules under the key the runtime looks them up by edd1f35b startup-d3d12: load validated compute modules by key from the shader cache ``` **One commit was dropped because `main` superseded it:** `e9ef89af` ("forward the compute root signature and compute root SRV") replayed empty. `main` now has a richer slot 33 (deferred heap-indexed root + binding trace) and a slot 43 that binds upload-page-backed compute root SRVs after indexed-indirect validation. The PR version also read `pass.root` (the graphics root set at slot 34) rather than the compute root, so replaying it verbatim would have been a defect. I did not replace it. **Conflict resolutions** (all in `src/startup_stubs/d3d12_xs_device.cpp` plus CMake): slot 62 keeps `main`'s `note_pipeline`/`note_compute_binding_pipeline` calls and adds the cache load, wrapping `real_pipeline` instead of `nullptr` and setting `own().compute_pipeline`; the PR's parallel `compute_pipeline_real` was dropped because `main`'s `compute_pipeline` covers it; slot 14 keeps `main`'s barrier/root handlers and adds `list_dispatch` gated on `pass.compute_pipeline`; the PR's duplicate `list_typed[33]`/`[43]` registrations were removed because `main` already registers both. The `CachedPSO = {}` fix replayed cleanly. `CMakeLists.txt` keeps `main`'s `startup_live_view` block and inserts the `startup_compute_cache` CTest beside it. **Verified on `e133bf6a`:** `cmake --preset dev` + `cmake --build --preset dev --target d3d12_xs_shim` with MSVC → exit 0, `d3d12_xs.dll` links, so the rebased slot-62/14 code compiles against current `main`. `tests/startup_compute_cache_check.py` → PASS (9 checks), `docs_links_check.py` (469 links), `bidi_controls_check.py` (1739 files), `startup_tools_lint_check.py` (10 files), `dependency_paths_check.py` → all exit 0; `git diff --check` clean. **What CI can and cannot prove here.** CI can compile the shim and run `ctest -R '^startup_compute_cache$'` (pure Python). There is **no device-level fixture in this head** for the runtime path — real slot-62 PSO creation from `<key>.cs.cso` and slot-14 recording with `X2W_COMPUTE_DISPATCH=1` are unmeasured. `startup_compute_binding_trace_warp` still covers slot-14 observation with the gate off. **Two real gaps this head leaves, stated rather than hidden:** (1) compute root SRVs are limited to upload-page pointers; the graphics slot-44 `readable_window`/`upload_from_title` fallback has no compute equivalent, so a title-memory window read would be refused where graphics accepts it; (2) `X2W_COMPUTE_DISPATCH` is undocumented and sampled once in `build_tables()` at device creation. **What I plan next, unless you want it differently:** implement the DXC-built fixture shader and the two-arm readback you asked for (checked-in HLSL compiled by `DXC_EXECUTABLE`, published through the normal compute-cache path with `tools/dxil_retarget.py::sign_container` validating and signing via `root_probe --sign`, negative arm zero forwarded dispatches plus unchanged UAV after the fence, positive arm exact words including untouched sentinels), and expose that readback as one reusable helper for #1975. That is what turns this from compile-checked into evidenced. Say if you want the compute root SRV fallback (1) folded into the same change or handled separately.
triggered02 commented 2026-11-26 04:04:38 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-11-26T03:30:48Z.


Rebased onto current main (e46d336c); head is now c7a6ed3a (was e133bf6a). Clean replay.

Verified on c7a6ed3a: startup_compute_cache_check PASS; docs_links_check 523 links; startup_tools_lint_check 11 files; dependency_paths_check; git diff --check clean; diff vs main is the PR's own 4 files (+241/-9). Main's newer slot-14 Dispatch (#1974) is kept and the PR's duplicate registration stays dropped, pipeline_root interop is in place, and the .cs.cso load plus X2W_COMPUTE_DISPATCH gate survive.

CI can compile-check this head; the runtime half (real slot-62 PSO from a published module, slot-14 recording) still has no device-level fixture, which the description lists as outstanding.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7181784095 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1441#issuecomment-7181784095). Originally posted by [triggered02](https://github.com/triggered02) on 2026-11-26T03:30:48Z. --- Rebased onto current main (e46d336c); head is now c7a6ed3a (was e133bf6a). Clean replay. Verified on c7a6ed3a: startup_compute_cache_check PASS; docs_links_check 523 links; startup_tools_lint_check 11 files; dependency_paths_check; git diff --check clean; diff vs main is the PR's own 4 files (+241/-9). Main's newer slot-14 Dispatch (#1974) is kept and the PR's duplicate registration stays dropped, pipeline_root interop is in place, and the <key>.cs.cso load plus X2W_COMPUTE_DISPATCH gate survive. CI can compile-check this head; the runtime half (real slot-62 PSO from a published module, slot-14 recording) still has no device-level fixture, which the description lists as outstanding.
triggered02 commented 2026-11-26 04:04:39 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-11-26T03:32:03Z.


Answering the two Codex findings and @R0Y00's change request against the current head c7a6ed3a, because the reviewed revision is no longer what this branch contains.

P1 � "Bind compute root state before recording dispatch": no longer applies to this head. This branch no longer records a dispatch at all. Main landed #1974 (src/startup_stubs/list_dispatch.h, decide_dispatch) while this PR was in flight, and the rebase dropped this PR's list_dispatch and its list_typed[14] registration as a duplicate � main installs slot 14 unconditionally and its handler already forwards compute-root state. What this PR keeps is the PSO side: it builds the real compute pipeline and sets both own().compute_pipeline and own().pipeline_root, so decide_dispatch's pipeline-root match (pass.compute_pipeline_root, set from slot 33 list_compute_root) has a root to compare. Verifying: grep -n 'list_dispatch|list_compute_root|pipeline_root' src/startup_stubs/d3d12_xs_device.cpp shows one list_dispatch definition (main's), one list_typed[14], and the slot-62 pipeline_root assignment.

P2 � "Probe the full bytecode span before scanning": that file is not in this head. src/startup_stubs/compute_dxil.h does not exist on this branch � the DXIL-classifier design was never pushed here; the head is the earlier cache-publisher slice ( ools/startup/compute_cache.py, .cs.cso load at slot 62). The P2 is a real finding for that future classifier revision, and I have not marked it fixed; it simply has no code to apply to in c7a6ed3a.

@R0Y00's change request � keep the production dispatch path pending the source-built GPU readback: satisfied by construction on this head. Dispatch recording is main's, not this PR's, and the only new runtime behavior is gated: without X2W_COMPUTE_DISPATCH=1 the slot-62 path keeps the placeholder pipeline and no module is loaded, so nothing can dispatch from this PR's change until the readback fixture turns it on. The description's "not established" section lists that fixture as still outstanding.

Verified on c7a6ed3a: startup_compute_cache_check PASS, docs 523 links, translator/lint/dependency-path checks clean, git diff --check clean; diff vs main is the PR's 4 files (+241/-9).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7181802474 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1441#issuecomment-7181802474). Originally posted by [triggered02](https://github.com/triggered02) on 2026-11-26T03:32:03Z. --- Answering the two Codex findings and @R0Y00's change request against the **current** head c7a6ed3a, because the reviewed revision is no longer what this branch contains. **P1 � "Bind compute root state before recording dispatch": no longer applies to this head.** This branch no longer records a dispatch at all. Main landed #1974 (src/startup_stubs/list_dispatch.h, decide_dispatch) while this PR was in flight, and the rebase dropped this PR's list_dispatch and its list_typed[14] registration as a duplicate � main installs slot 14 unconditionally and its handler already forwards compute-root state. What this PR keeps is the PSO side: it builds the real compute pipeline and sets both own().compute_pipeline and own().pipeline_root, so decide_dispatch's pipeline-root match (pass.compute_pipeline_root, set from slot 33 list_compute_root) has a root to compare. Verifying: grep -n 'list_dispatch\|list_compute_root\|pipeline_root' src/startup_stubs/d3d12_xs_device.cpp shows one list_dispatch definition (main's), one list_typed[14], and the slot-62 pipeline_root assignment. **P2 � "Probe the full bytecode span before scanning": that file is not in this head.** src/startup_stubs/compute_dxil.h does not exist on this branch � the DXIL-classifier design was never pushed here; the head is the earlier cache-publisher slice ( ools/startup/compute_cache.py, <key>.cs.cso load at slot 62). The P2 is a real finding for that future classifier revision, and I have not marked it fixed; it simply has no code to apply to in c7a6ed3a. **@R0Y00's change request � keep the production dispatch path pending the source-built GPU readback:** satisfied by construction on this head. Dispatch recording is main's, not this PR's, and the only new runtime behavior is gated: without X2W_COMPUTE_DISPATCH=1 the slot-62 path keeps the placeholder pipeline and no module is loaded, so nothing can dispatch from this PR's change until the readback fixture turns it on. The description's "not established" section lists that fixture as still outstanding. Verified on c7a6ed3a: startup_compute_cache_check PASS, docs 523 links, translator/lint/dependency-path checks clean, git diff --check clean; diff vs main is the PR's 4 files (+241/-9).
Leyukaka commented 2026-12-01 16:14:55 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-12-01T16:14:55Z.


Taking this over since there has been no activity for 48 h; will hand back if you resume. Your commits stay as they are and keep your authorship; I will rebase onto current main, address the open review points and report the test results here.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7317283979 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1441#issuecomment-7317283979). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-12-01T16:14:55Z. --- Taking this over since there has been no activity for 48 h; will hand back if you resume. Your commits stay as they are and keep your authorship; I will rebase onto current `main`, address the open review points and report the test results here.
Leyukaka commented 2026-12-01 17:42:35 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-12-01T17:42:35Z.


Continued in #3768 (rebased onto main, review points addressed, local test results in the description). Your commits are kept with your authorship; if you resume, say so there and I will hand it back.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7319726639 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1441#issuecomment-7319726639). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-12-01T17:42:35Z. --- Continued in #3768 (rebased onto `main`, review points addressed, local test results in the description). Your commits are kept with your authorship; if you resume, say so there and I will hand it back.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1441:upstream-pr/1441'
git switch 'upstream-pr/1441'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/1441'
git switch 'upstream-pr/1441'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1441'
git switch 'upstream-pr/1441'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1441'
git switch 'main'
git merge --squash 'upstream-pr/1441'
git switch 'main'
git merge --ff-only 'upstream-pr/1441'
git switch 'main'
git merge 'upstream-pr/1441'
git push origin 'main'
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!1434
No description provided.