runtime: bind published typed buffer inputs with 32-bit components #3386

Merged
Not-Saii merged 8 commits from upstream-pr/3386 into main 2026-11-29 14:39:24 +00:00
Not-Saii commented 2026-11-28 18:06:17 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Not-Saii on 2026-11-28T18:06:17Z.


Refs #3224

Behavior

In the #3224 census, SRV kind typed_buffer_srv is the largest gap between compiling a compute program and publishing its manifest. These are programs that read with buffer_load_format_x to _xyzw (MUBUF, element index only), which the direct compiler reads as a Buffer<uint4>.

  • Manifest (src/direct_compute_cache.cpp): format_compute_runtime_manifest writes srv <register> typed table <parameter> <byte> bytes <n>. n is 4 bytes per component of the widest load on that binding; required_bytes is already the maximum over the binding's loads.
  • Stand-in (src/startup_stubs/d3d12_compute_dispatch.inl): the dispatch path resolves the table entry with the existing indirect_table_buffer range rules and binds a UINT buffer view (R32_UINT to R32G32B32A32_UINT) over it. A UINT view returns the same bits as the guest format unit only for 32-bit UINT, SINT and FLOAT components, so only those are bound:
    • Hardware descriptor: FORMAT 20-22, 62-64, 72-74 or 75-77, stride equal to the element size, identity DST_SEL over the components read, unified FORMAT, structured bounds (OOB_SELECT 0), and no swizzle, index stride or ADD_TID.
    • Slot 18 typed buffer view token: read with token_view, so content tokens decode as in the other buffer readers, then checked with JB2WIN's typed_dword_channels / typed_dword_uint_format from the heap contract (#3042).
    • All four words zero: a null buffer that reads zeros, as raw inputs already do.
  • Every other shape is refused before a dispatch is recorded, with one reason per check (listed in docs/experiments/compute-typed-buffer-inputs.md). A typed input on an indirect Dispatch is refused.

Manifest route only. Since #3449 the launchers set X2W_NATIVE_SHADERS_ONLY=1, and load_compute_translation returns before it reads <key>.txt. A default run therefore does not use this binding: the in-process route (translate_compute_natively) is unchanged and still refuses typed_buffer_srv with view kind 1 is not bound for a natively translated program. The binding applies to runs with X2W_NATIVE_SHADERS_ONLY=0 and compile_dxil manifests. Binding the kind on the in-process route is a separate change.

Not in this PR:

  • 8- and 16-bit formats, UNORM, SNORM and 16-bit FLOAT need a conversion that a UINT view does not do. They are refused by name.
  • This PR publishes the manifest and binds 32-bit typed buffers. It does not establish that the cohort's typed-buffer programs now dispatch. How many have a 32-bit FORMAT is for the census re-measure, and a published manifest can still stop at the placed-buffer input check of #2860 / #2862.
  • No overlap with the other claims on #3224: JB2WIN has non-2D texture SRVs, RonLogic has the half UAVs (#3302, #3305) and SimSalabimse's packed_d16_x_uav (#3389) is merged; this branch merges main after it.

Tests

tests/startup_compute_typed_buffer_srv_check.py (tests/cmake/startup_compute_typed_buffer_srv.cmake) uses the published route: compile_dxil --requests → <key>.txt → slot 14 Dispatch on the stand-in.

  • _controls (no GPU): source-built programs for 1 to 4 components publish srv 0 typed table 1 0 bytes 4n.
  • _warp / _hardware: for each width, a 32-bit FLOAT descriptor of 50 elements.
    • The 384 lanes store what they read, so the words past element 49 must be zero.
    • The 4-component case also reads through a slot 18 R32G32B32A32_FLOAT view token (new consumer mode dispatch-srv-token-typed).
    • Each width also reads through its UINT and SINT FORMATs, and through a descriptor based one element into the buffer (new consumer mode dispatch-records32-input-at-<bytes>); the words read shift by one element.
    • An all-zero descriptor reads zeros (new consumer mode dispatch-records32-input-null).
    • Refusal controls, each with the output untouched: an 8_8_8_8_UNORM FORMAT, a wrong stride, word 1 bit 30 or 31, word 3 INDEX_STRIDE or ADD_TID, OOB_SELECT 3, a legacy (RESOURCE_LEVEL 0) FORMAT, swapped X/Y DST_SEL, fewer channels than read, a base 4 bytes in (2 or more components), and an R8G8B8A8_UNORM token.
    • Before publication the dispatch reports no translation.
  • tests/native_compute_manifest_reasons.cpp: a typed_buffer_srv of 20 bytes or of 6 bytes gets no manifest (SRV kind typed_buffer_srv).
  • tests/startup_slot67_indirect_dispatch_check.py: with its manifest line replaced by srv 0 typed table 1 0 bytes 4, the indirect Dispatch is refused with requires fixed-table raw buffers.

Verification

Branch head 4cd38c90 = da4fe59c (review cases) + a merge of main e3f9a64f (d2acde2b) + a3854d64 (review fixes) + 0663f6ed (measurements) + a merge of main 8a30428a (4cd38c90). Measured at 0663f6ed and again at 4cd38c90. Windows 11 build 26300, MSVC x64 Debug, Windows SDK 10.0.26100 DXC, D3D12 debug layer enabled.

.\tools\dev.ps1
cmake --preset dev
cmake --build --preset dev --target compile_dxil d3d12_xs_shim startup_stream_consumer offscreen_check native_compute_manifest_reasons
ctest --preset dev --no-tests=error -V -R "^(startup_compute_typed_buffer_srv_(controls|warp|hardware)|native_compute_manifest_reasons|startup_slot67_indirect_dispatch_hardware)$"
  • _controls, native_compute_manifest_reasons (38 cases) and startup_slot67_indirect_dispatch_hardware: passed.
  • _hardware, NVIDIA GeForce RTX 4090, driver 32.0.16.1088: passed. 1, 2, 3 and 4 components read 50 elements and then zeros, the UINT and SINT FORMATs read the same words, a base one element in shifts them, an all-zero descriptor reads zeros, the token reads the same elements, and 8, 11, 11 and 12 refusal controls passed. No debug layer errors.
  • Mutations, each applied alone with the shim rebuilt, then reverted. Each fails its check:
    • Leyukaka's four from the first review (at da4fe59c): FirstElement → 0, the dropped whole-element check, each FORMAT row, and the dropped word 1 bits.
    • The new cases (on the #3397 tree, which shares these lines): word 3 mask 0xfff80000 → 0xff000000 fails at INDEX_STRIDE; (words[1] >> 30) → ((words[1] >> 30) & 1) fails at bit 31; dropping the all-zero branch fails the null input (expected 00000000, read c5c5c5c5); dropping || slot.typed_bytes from the indirect refusal fails startup_slot67_indirect_dispatch_hardware.
  • _warp, Microsoft Basic Render Driver: capability skip (77). WARP reports 4-lane waves and the direct module needs 32.
  • Negative control (at da4fe59c): with the stand-in's parse of the typed line disabled, _hardware fails at word 0 (expected 8b02a7f1, read c5c5c5c5).
  • Not covered by a test: a content token (X2W_D3D12_VIEW_CONTENT_TOKENS=1) through token_view.

AI-assisted.

🤖 Generated with Claude Code

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:5543129662 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3386). Originally posted by [Not-Saii](https://github.com/Not-Saii) on 2026-11-28T18:06:17Z. --- Refs #3224 ## Behavior In the #3224 census, `SRV kind typed_buffer_srv` is the largest gap between compiling a compute program and publishing its manifest. These are programs that read with `buffer_load_format_x` to `_xyzw` (MUBUF, element index only), which the direct compiler reads as a `Buffer<uint4>`. - **Manifest** (`src/direct_compute_cache.cpp`): `format_compute_runtime_manifest` writes `srv <register> typed table <parameter> <byte> bytes <n>`. `n` is 4 bytes per component of the widest load on that binding; `required_bytes` is already the maximum over the binding's loads. - **Stand-in** (`src/startup_stubs/d3d12_compute_dispatch.inl`): the dispatch path resolves the table entry with the existing `indirect_table_buffer` range rules and binds a UINT buffer view (`R32_UINT` to `R32G32B32A32_UINT`) over it. A UINT view returns the same bits as the guest format unit only for 32-bit UINT, SINT and FLOAT components, so only those are bound: - **Hardware descriptor:** FORMAT 20-22, 62-64, 72-74 or 75-77, stride equal to the element size, identity DST_SEL over the components read, unified FORMAT, structured bounds (OOB_SELECT 0), and no swizzle, index stride or ADD_TID. - **Slot 18 typed buffer view token:** read with `token_view`, so content tokens decode as in the other buffer readers, then checked with JB2WIN's `typed_dword_channels` / `typed_dword_uint_format` from the heap contract (#3042). - **All four words zero:** a null buffer that reads zeros, as raw inputs already do. - Every other shape is refused before a dispatch is recorded, with one reason per check (listed in `docs/experiments/compute-typed-buffer-inputs.md`). A typed input on an indirect Dispatch is refused. **Manifest route only.** Since #3449 the launchers set `X2W_NATIVE_SHADERS_ONLY=1`, and `load_compute_translation` returns before it reads `<key>.txt`. A default run therefore does not use this binding: the in-process route (`translate_compute_natively`) is unchanged and still refuses `typed_buffer_srv` with `view kind 1 is not bound for a natively translated program`. The binding applies to runs with `X2W_NATIVE_SHADERS_ONLY=0` and `compile_dxil` manifests. Binding the kind on the in-process route is a separate change. Not in this PR: - 8- and 16-bit formats, UNORM, SNORM and 16-bit FLOAT need a conversion that a UINT view does not do. They are refused by name. - This PR publishes the manifest and binds 32-bit typed buffers. It does not establish that the cohort's typed-buffer programs now dispatch. How many have a 32-bit FORMAT is for the census re-measure, and a published manifest can still stop at the placed-buffer input check of #2860 / #2862. - No overlap with the other claims on #3224: JB2WIN has non-2D texture SRVs, RonLogic has the half UAVs (#3302, #3305) and SimSalabimse's `packed_d16_x_uav` (#3389) is merged; this branch merges `main` after it. ## Tests `tests/startup_compute_typed_buffer_srv_check.py` (`tests/cmake/startup_compute_typed_buffer_srv.cmake`) uses the published route: `compile_dxil --requests` → `<key>.txt` → slot 14 Dispatch on the stand-in. - `_controls` (no GPU): source-built programs for 1 to 4 components publish `srv 0 typed table 1 0 bytes 4n`. - `_warp` / `_hardware`: for each width, a 32-bit FLOAT descriptor of 50 elements. - The 384 lanes store what they read, so the words past element 49 must be zero. - The 4-component case also reads through a slot 18 `R32G32B32A32_FLOAT` view token (new consumer mode `dispatch-srv-token-typed`). - Each width also reads through its UINT and SINT FORMATs, and through a descriptor based one element into the buffer (new consumer mode `dispatch-records32-input-at-<bytes>`); the words read shift by one element. - An all-zero descriptor reads zeros (new consumer mode `dispatch-records32-input-null`). - Refusal controls, each with the output untouched: an 8_8_8_8_UNORM FORMAT, a wrong stride, word 1 bit 30 or 31, word 3 INDEX_STRIDE or ADD_TID, OOB_SELECT 3, a legacy (RESOURCE_LEVEL 0) FORMAT, swapped X/Y DST_SEL, fewer channels than read, a base 4 bytes in (2 or more components), and an R8G8B8A8_UNORM token. - Before publication the dispatch reports `no translation`. - `tests/native_compute_manifest_reasons.cpp`: a `typed_buffer_srv` of 20 bytes or of 6 bytes gets no manifest (`SRV kind typed_buffer_srv`). - `tests/startup_slot67_indirect_dispatch_check.py`: with its manifest line replaced by `srv 0 typed table 1 0 bytes 4`, the indirect Dispatch is refused with `requires fixed-table raw buffers`. ## Verification Branch head `4cd38c90` = `da4fe59c` (review cases) + a merge of `main` `e3f9a64f` (`d2acde2b`) + `a3854d64` (review fixes) + `0663f6ed` (measurements) + a merge of `main` `8a30428a` (`4cd38c90`). Measured at `0663f6ed` and again at `4cd38c90`. Windows 11 build 26300, MSVC x64 Debug, Windows SDK 10.0.26100 DXC, D3D12 debug layer enabled. ```powershell .\tools\dev.ps1 cmake --preset dev cmake --build --preset dev --target compile_dxil d3d12_xs_shim startup_stream_consumer offscreen_check native_compute_manifest_reasons ctest --preset dev --no-tests=error -V -R "^(startup_compute_typed_buffer_srv_(controls|warp|hardware)|native_compute_manifest_reasons|startup_slot67_indirect_dispatch_hardware)$" ``` - `_controls`, `native_compute_manifest_reasons` (38 cases) and `startup_slot67_indirect_dispatch_hardware`: passed. - `_hardware`, NVIDIA GeForce RTX 4090, driver 32.0.16.1088: passed. 1, 2, 3 and 4 components read 50 elements and then zeros, the UINT and SINT FORMATs read the same words, a base one element in shifts them, an all-zero descriptor reads zeros, the token reads the same elements, and 8, 11, 11 and 12 refusal controls passed. No debug layer errors. - Mutations, each applied alone with the shim rebuilt, then reverted. Each fails its check: - Leyukaka's four from the first review (at `da4fe59c`): `FirstElement` → 0, the dropped whole-element check, each FORMAT row, and the dropped word 1 bits. - The new cases (on the #3397 tree, which shares these lines): word 3 mask `0xfff80000` → `0xff000000` fails at INDEX_STRIDE; `(words[1] >> 30)` → `((words[1] >> 30) & 1)` fails at bit 31; dropping the all-zero branch fails the null input (`expected 00000000, read c5c5c5c5`); dropping `|| slot.typed_bytes` from the indirect refusal fails `startup_slot67_indirect_dispatch_hardware`. - `_warp`, Microsoft Basic Render Driver: capability skip (77). WARP reports 4-lane waves and the direct module needs 32. - Negative control (at `da4fe59c`): with the stand-in's parse of the `typed` line disabled, `_hardware` fails at word 0 (`expected 8b02a7f1, read c5c5c5c5`). - Not covered by a test: a content token (`X2W_D3D12_VIEW_CONTENT_TOKENS=1`) through `token_view`. AI-assisted. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Leyukaka commented 2026-11-28 18:53:35 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-28T18:53:35Z.


Measured 4a2720e0 on the 878 untranslated requests of the 900 s census in #3224: compile_dxil <dxc dir> <cache> --jobs 8 gfx1013-direct-cs@0 --requests <request dir> <out dir>, built in a local integration of main f2972840 with this PR and 17 other open PRs (none of the others changes the manifest's SRV kinds). Baseline: the same requests on main d418f70e. Compile counts are unchanged (290 compiled, 588 refused); runtime manifests go from 124 to 146.

Of the 112 programs that stopped at SRV kind typed_buffer_srv:

Now Programs Dispatches
manifest published 22 163,511
UAV kind typed_buffer_uav 32 2,001,657
SRV kind comparison_texture_srv 2d 33 155,463
UAV kind indexed_atomic_uav 17 122,577
UAV kind unknown 4 18,843
UAV kind half_scalar_uav 4 14,141

No other program changed manifest state. Whether the 22 bind at Dispatch (the 32-bit FORMAT check) is not measured here; that needs a run.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7244132209 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3386#issuecomment-7244132209). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-28T18:53:35Z. --- Measured `4a2720e0` on the 878 untranslated requests of the 900 s census in #3224: `compile_dxil <dxc dir> <cache> --jobs 8 gfx1013-direct-cs@0 --requests <request dir> <out dir>`, built in a local integration of `main` `f2972840` with this PR and 17 other open PRs (none of the others changes the manifest's SRV kinds). Baseline: the same requests on `main` `d418f70e`. Compile counts are unchanged (290 compiled, 588 refused); runtime manifests go from 124 to 146. Of the 112 programs that stopped at `SRV kind typed_buffer_srv`: | Now | Programs | Dispatches | |---|---|---| | manifest published | 22 | 163,511 | | `UAV kind typed_buffer_uav` | 32 | 2,001,657 | | `SRV kind comparison_texture_srv 2d` | 33 | 155,463 | | `UAV kind indexed_atomic_uav` | 17 | 122,577 | | `UAV kind unknown` | 4 | 18,843 | | `UAV kind half_scalar_uav` | 4 | 14,141 | No other program changed manifest state. Whether the 22 bind at Dispatch (the 32-bit FORMAT check) is not measured here; that needs a run.
Leyukaka commented 2026-11-28 20:09:14 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-28T20:09:14Z.

Review: CHANGES_REQUESTED


Reviewed 4a2720e0.

Run on a release build of main f2972840 with this PR and 17 other open PRs merged locally, Windows Sandbox, network off, vGPU:

  • startup_compute_typed_buffer_srv_controls passes.
  • startup_compute_typed_buffer_srv_hardware passes on the hardware backend (the Sandbox's only GPU is the NVIDIA GeForce RTX 5080 vGPU). It covers 50 elements and then zeros for 1 to 4 components, the slot 18 token, and 4/6/6/7 refusals.
  • _warp skips (77): WARP has no 32-lane wave.

Test gaps. Each mutation below still passes _hardware:

  1. The input view always starts at element 0. In dispatch-records32 the descriptor addresses the first byte of the placed input buffer, and the slot 18 token view has FirstElement 0. Mutation: src/startup_stubs/d3d12_compute_dispatch.inl:160 view.Buffer.FirstElement = range.offset / element -> 0. Add a dispatch whose descriptor base is 4 * channels bytes into the input buffer, and expect the words shifted by one element.
  2. The whole-element check has no case. Mutation: :155 drop range.offset % element ||. Add, for 2 or more channels, a descriptor base 4 bytes into the input buffer. It should be refused with a typed input range does not start at a whole element and leave the output untouched.
  3. Only the FLOAT codes are dispatched (22, 64, 74, 77). Mutation: :111 case 20: case 21: case 22: return 1; -> case 22: return 1; (the same holds for the 62/72/75 rows). Add dispatches with FORMAT 20 (UINT) and 21 (SINT), expecting the same raw words.
  4. No case sets word 1 bit 30 or 31. Mutation: :145 drop (words[1] >> 30) ||. Add stride field 0x4000 | 4 * channels, which sets bit 30 and keeps the 14-bit stride equal to the element size. It should be refused with a typed input descriptor is swizzled or not bounds-checked by record.

Request changes for the test gaps above.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6099896991 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3386#pullrequestreview-6099896991). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-28T20:09:14Z. **Review:** CHANGES_REQUESTED --- Reviewed `4a2720e0`. Run on a release build of `main` `f2972840` with this PR and 17 other open PRs merged locally, Windows Sandbox, network off, vGPU: - `startup_compute_typed_buffer_srv_controls` passes. - `startup_compute_typed_buffer_srv_hardware` passes on the hardware backend (the Sandbox's only GPU is the NVIDIA GeForce RTX 5080 vGPU). It covers 50 elements and then zeros for 1 to 4 components, the slot 18 token, and 4/6/6/7 refusals. - `_warp` skips (77): WARP has no 32-lane wave. Test gaps. Each mutation below still passes `_hardware`: 1. The input view always starts at element 0. In `dispatch-records32` the descriptor addresses the first byte of the placed input buffer, and the slot 18 token view has `FirstElement` 0. Mutation: `src/startup_stubs/d3d12_compute_dispatch.inl:160` `view.Buffer.FirstElement = range.offset / element` -> `0`. Add a dispatch whose descriptor base is `4 * channels` bytes into the input buffer, and expect the words shifted by one element. 2. The whole-element check has no case. Mutation: `:155` drop `range.offset % element ||`. Add, for 2 or more channels, a descriptor base 4 bytes into the input buffer. It should be refused with `a typed input range does not start at a whole element` and leave the output untouched. 3. Only the FLOAT codes are dispatched (22, 64, 74, 77). Mutation: `:111` `case 20: case 21: case 22: return 1;` -> `case 22: return 1;` (the same holds for the 62/72/75 rows). Add dispatches with FORMAT 20 (UINT) and 21 (SINT), expecting the same raw words. 4. No case sets word 1 bit 30 or 31. Mutation: `:145` drop `(words[1] >> 30) ||`. Add stride field `0x4000 | 4 * channels`, which sets bit 30 and keeps the 14-bit stride equal to the element size. It should be refused with `a typed input descriptor is swizzled or not bounds-checked by record`. Request changes for the test gaps above.
Not-Saii commented 2026-11-28 20:28:10 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Not-Saii on 2026-11-28T20:28:10Z.


@Leyukaka Thanks. All four gaps were real, and each now has a case that fails under its mutation. Fixed in da4fe59c, which changes only tests and docs.

  1. Nonzero FirstElement. New consumer mode dispatch-records32-input-at-<bytes> puts the input descriptor's base that many bytes into the buffer. Each width reads once with its base at 4 * channels and expects the words shifted by one element.
    Mutation view.Buffer.FirstElement = range.offset / element → 0: fails, 1 channels, base one element in: word 0 expected 8b06bba2, read 8b02a7f1.

  2. Whole-element check. For 2 or more channels, a base 4 bytes in must be refused with a typed input range does not start at a whole element, leaving the output untouched.
    Mutation that drops range.offset % element ||: fails, {'mode': 'dispatch-records32-input-at-4'}: word 0 expected c5c5c5c5, read 8b02a7f1 (the dispatch reads from element 0 instead of being refused).

  3. Integer FORMATs. Each width also reads through its UINT and SINT codes (20/21, 62/63, 72/73, 75/76) and expects the same words. I ran each row's mutation separately (keep only the FLOAT code); each fails at that width's UINT case:

    • row 1, case 22 only: 1 channels, FORMAT 20: word 0 expected 8b02a7f1, read c5c5c5c5;
    • row 2, case 64 only: 2 channels, FORMAT 62: ...;
    • row 3, case 74 only: 3 channels, FORMAT 72: ...;
    • row 4, case 77 only: 4 channels, FORMAT 75: ....

    All four read the sentinel, because the dispatch was refused.

  4. Word 1 bits 30/31. A stride field of 0x4000 | 4 * channels must be refused with a typed input descriptor is swizzled or not bounds-checked by record.
    Mutation that drops (words[1] >> 30) ||: fails, {'stride': 16388}: word 0 expected c5c5c5c5, read 8b02a7f1.

Each mutation was applied on its own, the shim rebuilt, and startup_compute_typed_buffer_srv_hardware run, then reverted. Without mutations, _controls and _hardware pass on da4fe59c: 1 to 4 components, the UINT/SINT FORMATs, the shifted base, the token, and 5/8/8/9 refusals. The setup was the NVIDIA GeForce RTX 4090, driver 32.0.16.1088, Windows 11 build 26300, Debug, with the debug layer enabled.

#3397 (typed outputs, stacked on this PR) had the same four gaps, so I added the matching cases there: UINT/SINT stores, a base 8 bytes into the output (shifted for 1 and 2 components, refused as not element-aligned for 3 and 4), and word 1 bit 30. Under the same procedure, the output FirstElement → 0, the dropped alignment check, rows 1, 2 and 4, and the bit 30/31 mutation all fail its _hardware check. The row 3 mutation is caught only by this PR's check: the RTX 4090 has no typed UAV store for R32G32B32, so no 3-component store reaches that row.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7245308168 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3386#issuecomment-7245308168). Originally posted by [Not-Saii](https://github.com/Not-Saii) on 2026-11-28T20:28:10Z. --- @Leyukaka Thanks. All four gaps were real, and each now has a case that fails under its mutation. Fixed in `da4fe59c`, which changes only tests and docs. 1. **Nonzero `FirstElement`.** New consumer mode `dispatch-records32-input-at-<bytes>` puts the input descriptor's base that many bytes into the buffer. Each width reads once with its base at `4 * channels` and expects the words shifted by one element. Mutation `view.Buffer.FirstElement = range.offset / element` → `0`: **fails**, `1 channels, base one element in: word 0 expected 8b06bba2, read 8b02a7f1`. 2. **Whole-element check.** For 2 or more channels, a base 4 bytes in must be refused with `a typed input range does not start at a whole element`, leaving the output untouched. Mutation that drops `range.offset % element ||`: **fails**, `{'mode': 'dispatch-records32-input-at-4'}: word 0 expected c5c5c5c5, read 8b02a7f1` (the dispatch reads from element 0 instead of being refused). 3. **Integer FORMATs.** Each width also reads through its UINT and SINT codes (20/21, 62/63, 72/73, 75/76) and expects the same words. I ran each row's mutation separately (keep only the FLOAT code); each **fails** at that width's UINT case: - row 1, `case 22` only: `1 channels, FORMAT 20: word 0 expected 8b02a7f1, read c5c5c5c5`; - row 2, `case 64` only: `2 channels, FORMAT 62: ...`; - row 3, `case 74` only: `3 channels, FORMAT 72: ...`; - row 4, `case 77` only: `4 channels, FORMAT 75: ...`. All four read the sentinel, because the dispatch was refused. 4. **Word 1 bits 30/31.** A stride field of `0x4000 | 4 * channels` must be refused with `a typed input descriptor is swizzled or not bounds-checked by record`. Mutation that drops `(words[1] >> 30) ||`: **fails**, `{'stride': 16388}: word 0 expected c5c5c5c5, read 8b02a7f1`. Each mutation was applied on its own, the shim rebuilt, and `startup_compute_typed_buffer_srv_hardware` run, then reverted. Without mutations, `_controls` and `_hardware` pass on `da4fe59c`: 1 to 4 components, the UINT/SINT FORMATs, the shifted base, the token, and 5/8/8/9 refusals. The setup was the NVIDIA GeForce RTX 4090, driver 32.0.16.1088, Windows 11 build 26300, Debug, with the debug layer enabled. #3397 (typed outputs, stacked on this PR) had the same four gaps, so I added the matching cases there: UINT/SINT stores, a base 8 bytes into the output (shifted for 1 and 2 components, refused as not element-aligned for 3 and 4), and word 1 bit 30. Under the same procedure, the output `FirstElement` → 0, the dropped alignment check, rows 1, 2 and 4, and the bit 30/31 mutation all fail its `_hardware` check. The row 3 mutation is caught only by this PR's check: the RTX 4090 has no typed UAV store for R32G32B32, so no 3-component store reaches that row. AI-assisted.
KelboLive commented 2026-11-28 20:34:49 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by KelboLive on 2026-11-28T20:34:49Z.

Review: APPROVED


LGTM — clean input-side of typed buffer route.

Adds typed_dword_format_channels and typed_dword_input_view for published srv typed inputs. Manifest formatter emits srv <reg> typed table <param> <byte> bytes <n> lines; dispatch stub resolves table entries, binds UINT views of 32-bit components, and refuses invalid descriptors with precise reasons. Follows the same patterns as #3397 (typed outputs). Test fixture covers 1–4 components with comprehensive refusal controls.

Ready to land.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6099979652 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3386#pullrequestreview-6099979652). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-11-28T20:34:49Z. **Review:** APPROVED --- LGTM — clean input-side of typed buffer route. Adds `typed_dword_format_channels` and `typed_dword_input_view` for published `srv typed` inputs. Manifest formatter emits `srv <reg> typed table <param> <byte> bytes <n>` lines; dispatch stub resolves table entries, binds UINT views of 32-bit components, and refuses invalid descriptors with precise reasons. Follows the same patterns as #3397 (typed outputs). Test fixture covers 1–4 components with comprehensive refusal controls. Ready to land.
KelboLive commented 2026-11-28 21:57:06 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by KelboLive on 2026-11-28T21:57:06Z.

Review: APPROVED


LGTM — clean input-side of typed buffer route.

Adds typed_dword_format_channels and typed_dword_input_view for published srv typed inputs. Manifest formatter emits srv <reg> typed table <param> <byte> bytes <n> lines; dispatch stub resolves table entries, binds UINT views of 32-bit components, and refuses invalid descriptors with precise reasons. Follows the same patterns as #3397 (typed outputs). Test fixture covers 1–4 components with comprehensive refusal controls.

Ready to land.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6100253025 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3386#pullrequestreview-6100253025). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-11-28T21:57:06Z. **Review:** APPROVED --- LGTM — clean input-side of typed buffer route. Adds `typed_dword_format_channels` and `typed_dword_input_view` for published `srv typed` inputs. Manifest formatter emits `srv <reg> typed table <param> <byte> bytes <n>` lines; dispatch stub resolves table entries, binds UINT views of 32-bit components, and refuses invalid descriptors with precise reasons. Follows the same patterns as #3397 (typed outputs). Test fixture covers 1–4 components with comprehensive refusal controls. Ready to land.
Leyukaka commented 2026-11-29 02:14:07 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-29T02:14:07Z.

Review: APPROVED


Reviewed da4fe59c. It changes only tests and docs since 4a2720e0. The four test gaps from that review are covered in tests/startup_compute_typed_buffer_srv_check.py:

  1. Nonzero FirstElement (:128): each width dispatches dispatch-records32-input-at-<4n> and expects the words shifted by one element.
  2. Whole-element check (:143): for 2 or more components, a base 4 bytes in is refused with a typed input range does not start at a whole element and the output stays untouched.
  3. Integer FORMATs (:28, :126-127): 20/21, 62/63, 72/73 and 75/76 are dispatched and expect the same words.
  4. Word 1 bit 30 (:136): stride field 0x4000 | 4n is refused.

A local run, release build of main 212d4b5f with da4fe59c and five other pending changes merged:

  • startup_compute_typed_buffer_srv_controls and _hardware pass; _warp skips (77).
  • The only failure among the merged changes' tests is startup_compute_dispatch_output_warp, the existing failure on main that #3394 fixes.
  • Dropping range.offset % element || (src/startup_stubs/d3d12_compute_dispatch.inl:155) makes startup_compute_typed_buffer_srv_hardware fail.

Not covered: PR CI builds the change, but the pr test preset includes none of startup_compute_typed_buffer_srv_*, so CI does not run these checks.

#3397 is stacked on this PR, so this one should merge first.

Approve da4fe59c.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6101034116 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3386#pullrequestreview-6101034116). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-29T02:14:07Z. **Review:** APPROVED --- Reviewed `da4fe59c`. It changes only tests and docs since `4a2720e0`. The four test gaps from that review are covered in `tests/startup_compute_typed_buffer_srv_check.py`: 1. Nonzero `FirstElement` (`:128`): each width dispatches `dispatch-records32-input-at-<4n>` and expects the words shifted by one element. 2. Whole-element check (`:143`): for 2 or more components, a base 4 bytes in is refused with `a typed input range does not start at a whole element` and the output stays untouched. 3. Integer FORMATs (`:28`, `:126-127`): 20/21, 62/63, 72/73 and 75/76 are dispatched and expect the same words. 4. Word 1 bit 30 (`:136`): stride field `0x4000 | 4n` is refused. A local run, release build of `main` `212d4b5f` with `da4fe59c` and five other pending changes merged: - `startup_compute_typed_buffer_srv_controls` and `_hardware` pass; `_warp` skips (77). - The only failure among the merged changes' tests is `startup_compute_dispatch_output_warp`, the existing failure on `main` that #3394 fixes. - Dropping `range.offset % element ||` (`src/startup_stubs/d3d12_compute_dispatch.inl:155`) makes `startup_compute_typed_buffer_srv_hardware` fail. Not covered: PR CI builds the change, but the `pr` test preset includes none of `startup_compute_typed_buffer_srv_*`, so CI does not run these checks. #3397 is stacked on this PR, so this one should merge first. Approve `da4fe59c`.
Leyukaka commented 2026-11-29 12:06:49 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-29T12:06:49Z.


This branch conflicts with main 1990fead in src/direct_compute_cache.cpp and src/startup_stubs/d3d12_compute_dispatch.inl (one region each): main added an optional identity_dst_sel suffix to the srv N buf table line, in the writer and in the parser.

Resolution: keep main's buf table writer with the identity_dst_sel suffix and main's identity_dst_sel parser branch, then add this branch's typed table ... bytes branch after each.

#3397 is stacked on this head and conflicts in the same two files, so it needs the same merge afterwards. Nothing else is open from my review; the approval is on da4fe59c.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7255575907 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3386#issuecomment-7255575907). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-29T12:06:49Z. --- This branch conflicts with `main` `1990fead` in `src/direct_compute_cache.cpp` and `src/startup_stubs/d3d12_compute_dispatch.inl` (one region each): main added an optional `identity_dst_sel` suffix to the `srv N buf table` line, in the writer and in the parser. Resolution: keep main's `buf table` writer with the `identity_dst_sel` suffix and main's `identity_dst_sel` parser branch, then add this branch's `typed table ... bytes` branch after each. #3397 is stacked on this head and conflicts in the same two files, so it needs the same merge afterwards. Nothing else is open from my review; the approval is on `da4fe59c`.
JohnConnorNPC commented 2026-11-29 12:40:45 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by JohnConnorNPC on 2026-11-29T12:40:45Z.


Re-review of head da4fe59c against main 77d1ba4d (204 commits ahead of the merge-base). The binding logic reads correctly: FORMAT codes, stride, DST_SEL, the word3 0xfff80000 bound rule and NumElements = NUM_RECORDS all match the repo's decoder and indirect_table_buffer.

MUST

  1. Conflict with main. git merge-tree --write-tree --name-only origin/main da4fe59c exits 1 in src/direct_compute_cache.cpp and src/startup_stubs/d3d12_compute_dispatch.inl, one hunk each, against main's identity_dst_sel lines. The resolution posted at 12:06 is right: keep both branches. I also checked against main with #3398 merged, and the conflict is the same single hunk per file. #3398 adds nothing to it.

SHOULD

  1. No effect on the default launcher path. Since #3449, the launchers set X2W_NATIVE_SHADERS_ONLY=1. load_compute_translation then returns at if (native_shaders_only()) { before it reads <key>.txt, so the new srv <i> typed table line is never parsed in a default run. translate_compute_natively still throws view kind 1 is not bound for a natively translated program for typed_buffer_srv, because its supported test has no typed branch. The change helps only -Translate or X2W_NATIVE_SHADERS_ONLY=0 runs with compile_dxil manifests. Please say so in the body and doc. A native-route binding (or a follow-up issue for one) is what would remove these refusals by default.
  2. Content tokens. typed_dword_input_view reads view_records()[words[1]] directly (grep -n 'view_records()\[words\[1\]\]' on the merged tree → if (known) record = view_records()[words[1]];). main's buffer readers use token_view(words, record, &created), which #3377 added. With the opt-in X2W_D3D12_VIEW_CONTENT_TOKENS=1, word 1 carries view_content_bit (0x80000000u), so a valid typed slot-18 token is refused as "not a typed buffer view". That's safe, but the reason is wrong. Use token_view after the merge.
  3. Two claimed paths have no case. The null-descriptor branch (channels = 4; // the 16 zero bytes …): grep -cE 'null|indirect' tests/startup_compute_typed_buffer_srv_check.py → 0. The manifest guard (b.required_bytes <= 16 && % 4): grep -c typed_buffer_srv tests/native_compute_manifest_reasons.cpp → 0. A records32 null-input mode and one manifest-reasons row would pin them. The indirect-refusal gap is already listed on #3397.

NIT

  1. The doc's control counts (4, 6, 6 and 7) are stale. The check at the head runs 5/8/8/9.
  2. With the opt-in snapshot path, 12-byte elements refuse or bind depending on the ring slot. Reservations round to 512 bytes, and 512 % 12 = 8, so range.offset % element fails for about 2 in 3 slots. I reasoned this from the code and did not measure it.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7255985250 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3386#issuecomment-7255985250). Originally posted by [JohnConnorNPC](https://github.com/JohnConnorNPC) on 2026-11-29T12:40:45Z. --- Re-review of head `da4fe59c` against `main` `77d1ba4d` (204 commits ahead of the merge-base). The binding logic reads correctly: FORMAT codes, stride, DST_SEL, the word3 `0xfff80000` bound rule and `NumElements` = NUM_RECORDS all match the repo's decoder and `indirect_table_buffer`. **MUST** 1. **Conflict with `main`.** `git merge-tree --write-tree --name-only origin/main da4fe59c` exits 1 in `src/direct_compute_cache.cpp` and `src/startup_stubs/d3d12_compute_dispatch.inl`, one hunk each, against `main`'s `identity_dst_sel` lines. The resolution posted at 12:06 is right: keep both branches. I also checked against `main` with #3398 merged, and the conflict is the same single hunk per file. #3398 adds nothing to it. **SHOULD** 2. **No effect on the default launcher path.** Since #3449, the launchers set `X2W_NATIVE_SHADERS_ONLY=1`. `load_compute_translation` then returns at `if (native_shaders_only()) {` before it reads `<key>.txt`, so the new `srv <i> typed table` line is never parsed in a default run. `translate_compute_natively` still throws `view kind 1 is not bound for a natively translated program` for `typed_buffer_srv`, because its `supported` test has no typed branch. The change helps only `-Translate` or `X2W_NATIVE_SHADERS_ONLY=0` runs with `compile_dxil` manifests. Please say so in the body and doc. A native-route binding (or a follow-up issue for one) is what would remove these refusals by default. 3. **Content tokens.** `typed_dword_input_view` reads `view_records()[words[1]]` directly (`grep -n 'view_records()\[words\[1\]\]'` on the merged tree → `if (known) record = view_records()[words[1]];`). `main`'s buffer readers use `token_view(words, record, &created)`, which #3377 added. With the opt-in `X2W_D3D12_VIEW_CONTENT_TOKENS=1`, word 1 carries `view_content_bit` (`0x80000000u`), so a valid typed slot-18 token is refused as "not a typed buffer view". That's safe, but the reason is wrong. Use `token_view` after the merge. 4. **Two claimed paths have no case.** The null-descriptor branch (`channels = 4; // the 16 zero bytes …`): `grep -cE 'null|indirect' tests/startup_compute_typed_buffer_srv_check.py` → 0. The manifest guard (`b.required_bytes <= 16 && % 4`): `grep -c typed_buffer_srv tests/native_compute_manifest_reasons.cpp` → 0. A records32 null-input mode and one manifest-reasons row would pin them. The indirect-refusal gap is already listed on #3397. **NIT** 5. The doc's control counts (`4, 6, 6 and 7`) are stale. The check at the head runs 5/8/8/9. 6. With the opt-in snapshot path, 12-byte elements refuse or bind depending on the ring slot. Reservations round to 512 bytes, and 512 % 12 = 8, so `range.offset % element` fails for about 2 in 3 slots. I reasoned this from the code and did not measure it. AI-assisted.
Not-Saii commented 2026-11-29 14:24:19 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Not-Saii on 2026-11-29T14:24:19Z.


@Leyukaka @JohnConnorNPC Thanks. Head is now 4cd38c90.

Conflict. d2acde2b merges main with the resolution from 12:06: main's identity_dst_sel writer and parser branches are kept, and the typed table branch follows each. main then moved again, so 4cd38c90 merges 8a30428a too: the cube SRV reason rows and the dispatch-cube consumer modes go next to this branch's rows and modes. Both merges are clean against 8a30428a.

JohnConnorNPC's points:

  1. Default launcher path. Correct. The body and docs/experiments/compute-typed-buffer-inputs.md now say that this binding is on the manifest route only. With X2W_NATIVE_SHADERS_ONLY=1 (the default since #3449), <key>.txt is not read, and translate_compute_natively still refuses typed_buffer_srv as view kind 1 is not bound. Binding the kind on the in-process route is a separate change; it would reuse the same Slot.typed_bytes and dispatch path.
  2. Content tokens. typed_dword_input_view now reads the token with token_view (a3854d64). No test runs with X2W_D3D12_VIEW_CONTENT_TOKENS=1, so that path is checked by reading only.
  3. Unpinned paths. A new consumer mode, dispatch-records32-input-null, gives each width an all-zero input descriptor, which must read zeros. With the all-zero branch dropped, the check fails at null input: word 0 expected 00000000, read c5c5c5c5. native_compute_manifest_reasons has two new SRV kind typed_buffer_srv rows, 20 bytes and 6 bytes.
  4. Counts. Fixed. The check now runs 8, 11, 11 and 12 refusals per width.
  5. Snapshot path, 12-byte elements. Not changed and not measured. A 3-component input on the opt-in snapshot path may be refused as a typed input range does not start at a whole element, but it is refused by name, not misread. Removing that refusal would mean aligning snapshot reservations to the element size, which I left out of this PR.

Leyukaka's gaps 2–4 from the #3397 review are in lines from this PR, so the cases are here:

  • Word 3: INDEX_STRIDE (bit 21) and ADD_TID (bit 23) must be refused. With the mask 0xfff80000u → 0xff000000u, the check fails at the INDEX_STRIDE case.
  • Word 1 bit 31: a stride field of 0x8000 | 4n must be refused. With (words[1] >> 30) → ((words[1] >> 30) & 1), the check fails at {'stride': 32772}.
  • Indirect: startup_slot67_indirect_dispatch_check.py replaces its manifest line with srv 0 typed table 1 0 bytes 4 and expects requires fixed-table raw buffers. With || slot.typed_bytes dropped, that check fails.

Each mutation was applied alone, the shim rebuilt and the check run, then reverted. Without mutations, on 4cd38c90 (main 8a30428a), these pass: startup_compute_typed_buffer_srv_controls / _hardware, native_compute_manifest_reasons (38 cases) and startup_slot67_indirect_dispatch_hardware. The setup was the NVIDIA GeForce RTX 4090, driver 32.0.16.1088, Windows 11 build 26300, Debug, with the debug layer enabled.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7257277071 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3386#issuecomment-7257277071). Originally posted by [Not-Saii](https://github.com/Not-Saii) on 2026-11-29T14:24:19Z. --- @Leyukaka @JohnConnorNPC Thanks. Head is now `4cd38c90`. **Conflict.** `d2acde2b` merges `main` with the resolution from 12:06: main's `identity_dst_sel` writer and parser branches are kept, and the `typed table` branch follows each. `main` then moved again, so `4cd38c90` merges `8a30428a` too: the cube SRV reason rows and the `dispatch-cube` consumer modes go next to this branch's rows and modes. Both merges are clean against `8a30428a`. JohnConnorNPC's points: 2. **Default launcher path.** Correct. The body and `docs/experiments/compute-typed-buffer-inputs.md` now say that this binding is on the manifest route only. With `X2W_NATIVE_SHADERS_ONLY=1` (the default since #3449), `<key>.txt` is not read, and `translate_compute_natively` still refuses `typed_buffer_srv` as `view kind 1 is not bound`. Binding the kind on the in-process route is a separate change; it would reuse the same `Slot.typed_bytes` and dispatch path. 3. **Content tokens.** `typed_dword_input_view` now reads the token with `token_view` (`a3854d64`). No test runs with `X2W_D3D12_VIEW_CONTENT_TOKENS=1`, so that path is checked by reading only. 4. **Unpinned paths.** A new consumer mode, `dispatch-records32-input-null`, gives each width an all-zero input descriptor, which must read zeros. With the all-zero branch dropped, the check fails at `null input: word 0 expected 00000000, read c5c5c5c5`. `native_compute_manifest_reasons` has two new `SRV kind typed_buffer_srv` rows, 20 bytes and 6 bytes. 5. **Counts.** Fixed. The check now runs 8, 11, 11 and 12 refusals per width. 6. **Snapshot path, 12-byte elements.** Not changed and not measured. A 3-component input on the opt-in snapshot path may be refused as `a typed input range does not start at a whole element`, but it is refused by name, not misread. Removing that refusal would mean aligning snapshot reservations to the element size, which I left out of this PR. Leyukaka's gaps 2–4 from the #3397 review are in lines from this PR, so the cases are here: - **Word 3:** INDEX_STRIDE (bit 21) and ADD_TID (bit 23) must be refused. With the mask `0xfff80000u` → `0xff000000u`, the check fails at the INDEX_STRIDE case. - **Word 1 bit 31:** a stride field of `0x8000 | 4n` must be refused. With `(words[1] >> 30)` → `((words[1] >> 30) & 1)`, the check fails at `{'stride': 32772}`. - **Indirect:** `startup_slot67_indirect_dispatch_check.py` replaces its manifest line with `srv 0 typed table 1 0 bytes 4` and expects `requires fixed-table raw buffers`. With `|| slot.typed_bytes` dropped, that check fails. Each mutation was applied alone, the shim rebuilt and the check run, then reverted. Without mutations, on `4cd38c90` (`main` `8a30428a`), these pass: `startup_compute_typed_buffer_srv_controls` / `_hardware`, `native_compute_manifest_reasons` (38 cases) and `startup_slot67_indirect_dispatch_hardware`. The setup was the NVIDIA GeForce RTX 4090, driver 32.0.16.1088, Windows 11 build 26300, Debug, with the debug layer enabled. AI-assisted.
Leyukaka commented 2026-11-29 14:37:45 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-29T14:37:45Z.

Review: APPROVED


Reviewed 4cd38c90 against main 8a30428a. Diff reading only, nothing run.

Since da4fe59c:

  • Merges (d2acde2b, 4cd38c90): main's identity_dst_sel writer and parser branches are kept and the typed table branch follows each (src/direct_compute_cache.cpp:969, src/startup_stubs/d3d12_compute_dispatch.inl:339). The cube rows and dispatch-cube modes sit next to the typed ones. git merge-tree origin/main 4cd38c90 exits 0.
  • Runtime (a3854d64): one change. typed_dword_input_view reads the token with token_view (d3d12_compute_dispatch.inl:175) instead of indexing view_records() itself. For an id token this is the same lookup under the same lock. For a content token, words 4-7 are present because the caller reads the entry with read_buffer_words (:855).
  • Tests, in tests/startup_compute_typed_buffer_srv_check.py: all-zero descriptor reads zeros (:130), word 1 bit 31 (:141), INDEX_STRIDE (:142), ADD_TID (:143). Two SRV kind typed_buffer_srv rows, 20 and 6 bytes (tests/native_compute_manifest_reasons.cpp:70, :74). Indirect refusal of an srv typed line (tests/startup_slot67_indirect_dispatch_check.py:209).
  • Doc: manifest route only (docs/experiments/compute-typed-buffer-inputs.md:35); control counts 8, 11, 11 and 12 (:65) match the script (8 base, 3 more for 2 or more components, 1 token case for 4).

JohnConnorNPC's points 1 to 5 are addressed by the above. Point 6 (12-byte elements on the snapshot path) is unchanged: such an input is refused by name, not misread.

Not covered:

  • A content token (X2W_D3D12_VIEW_CONTENT_TOKENS=1) through token_view has no case, as the body says.
  • The pr test preset still includes none of startup_compute_typed_buffer_srv_*, native_compute_manifest_reasons or startup_slot67_indirect_dispatch_*, so the green CI builds these checks without running them. The mutation results are the author's.

Approve 4cd38c90.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6103332185 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3386#pullrequestreview-6103332185). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-29T14:37:45Z. **Review:** APPROVED --- Reviewed `4cd38c90` against `main` `8a30428a`. Diff reading only, nothing run. Since `da4fe59c`: - **Merges** (`d2acde2b`, `4cd38c90`): `main`'s `identity_dst_sel` writer and parser branches are kept and the `typed table` branch follows each (`src/direct_compute_cache.cpp:969`, `src/startup_stubs/d3d12_compute_dispatch.inl:339`). The cube rows and `dispatch-cube` modes sit next to the typed ones. `git merge-tree origin/main 4cd38c90` exits 0. - **Runtime** (`a3854d64`): one change. `typed_dword_input_view` reads the token with `token_view` (`d3d12_compute_dispatch.inl:175`) instead of indexing `view_records()` itself. For an id token this is the same lookup under the same lock. For a content token, words 4-7 are present because the caller reads the entry with `read_buffer_words` (`:855`). - **Tests**, in `tests/startup_compute_typed_buffer_srv_check.py`: all-zero descriptor reads zeros (`:130`), word 1 bit 31 (`:141`), INDEX_STRIDE (`:142`), ADD_TID (`:143`). Two `SRV kind typed_buffer_srv` rows, 20 and 6 bytes (`tests/native_compute_manifest_reasons.cpp:70`, `:74`). Indirect refusal of an `srv typed` line (`tests/startup_slot67_indirect_dispatch_check.py:209`). - **Doc**: manifest route only (`docs/experiments/compute-typed-buffer-inputs.md:35`); control counts 8, 11, 11 and 12 (`:65`) match the script (8 base, 3 more for 2 or more components, 1 token case for 4). JohnConnorNPC's points 1 to 5 are addressed by the above. Point 6 (12-byte elements on the snapshot path) is unchanged: such an input is refused by name, not misread. Not covered: - A content token (`X2W_D3D12_VIEW_CONTENT_TOKENS=1`) through `token_view` has no case, as the body says. - The `pr` test preset still includes none of `startup_compute_typed_buffer_srv_*`, `native_compute_manifest_reasons` or `startup_slot67_indirect_dispatch_*`, so the green CI builds these checks without running them. The mutation results are the author's. Approve `4cd38c90`.
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!3386
No description provided.