compute: publish packed_d16_x_uav runtime manifest (Part of #3224) #3389

Merged
SimSalabimse merged 4 commits from upstream-pr/3389 into main 2026-11-29 12:52:52 +00:00
SimSalabimse commented 2026-11-28 18:51:13 +00:00 (Migrated from github.com)

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


Part of #3224 (claim: https://github.com/R0Y00/Xbox2Windows/issues/3224#issuecomment-7243078501).

In a 900 s start-up on the Windows test PC, runtime from main aec2e08, 23 shaders and 86,436 untranslated dispatches (5.7% of that run's untranslated compute dispatches) were refused with unsupported startup runtime manifest bindings: UAV kind unknown for this binding. The shader compiled, and the published route had no manifest line for it.

Change

The manifest token is uav <register> packed_d16_x table <parameter> <byte>.

  • A one-component D16 buffer_store_format, including the MTBUF form, stays packed_d16_x_uav. The store stays value & 65535 then bufferStore.i32. Two- and four-component D16 stores stay half_buffer_uav and still publish bufhalf.
  • format_compute_runtime_manifest writes uav N packed_d16_x table R B for one register and a two-byte payload. view_kind_name names packed_d16_x_uav and indexed_raw_srv, with the static assert that keeps the last name aligned with the enum. That names change is not on main.
  • load_compute_translation reads the line. The placed view uses native_buffer_store_view: R16_FLOAT and R16_UINT bind as R16_UINT, and R32_UINT stays R32_UINT with a 4-byte element. A descriptor that matches none of those refuses with a half buffer store requires matching format, stride and structured bounds.
  • tests/startup_compute_half_buffer_uav_check.py expects uav 0 packed_d16_x table 1 32 for the one-channel stride-2 case, including both MTBUF forms. Wider D16 stores still expect bufhalf.
  • tests/startup_compute_packed_d16_x_uav_check.py expects the same line. The R16_FLOAT view checks the halfwords. The R32_UINT view checks the zero-extended dwords. A wrong stride and a swizzle flag still refuse and leave the buffer untouched.

Tests

Linux: the python-linux check step (tools/run_checks_parallel.py --from-dir tests/checks/python-linux plus the workflow's script list) passes all 260 checks. docs_links_check.py and startup_compute_store_d16_x_check.py also pass. tests/native_compute_manifest_reasons.cpp compiles with g++ and clang++ -std=c++17 -Wall -Wextra -Werror -Werror=narrowing.

Windows test PC (RTX 4070 Ti) at head 32406a35, preset dev: build exit 0, then

ctest --preset dev --no-tests=error -j 1 -R 'native_compute_manifest_reasons|startup_compute_half_buffer_uav.*|native_compile_dxil.*|.*packed_d16.*|.*store_d16_x.*'

35/35 passed, ctest exit 0 (startup_compute_half_buffer_uav_warp and startup_compute_packed_d16_x_uav_warp skipped, as on WARP elsewhere). startup_compute_half_buffer_uav_controls and startup_compute_half_buffer_uav_hardware pass at this head.

AI-assisted (Cursor)

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:5543498945 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3389). Originally posted by [SimSalabimse](https://github.com/SimSalabimse) on 2026-11-28T18:51:13Z. --- Part of #3224 (claim: https://github.com/R0Y00/Xbox2Windows/issues/3224#issuecomment-7243078501). In a 900 s start-up on the Windows test PC, runtime from main `aec2e08`, 23 shaders and 86,436 untranslated dispatches (5.7% of that run's untranslated compute dispatches) were refused with `unsupported startup runtime manifest bindings: UAV kind unknown` for this binding. The shader compiled, and the published route had no manifest line for it. ## Change The manifest token is `uav <register> packed_d16_x table <parameter> <byte>`. - A one-component D16 `buffer_store_format`, including the MTBUF form, stays `packed_d16_x_uav`. The store stays `value & 65535` then `bufferStore.i32`. Two- and four-component D16 stores stay `half_buffer_uav` and still publish `bufhalf`. - `format_compute_runtime_manifest` writes `uav N packed_d16_x table R B` for one register and a two-byte payload. `view_kind_name` names `packed_d16_x_uav` and `indexed_raw_srv`, with the static assert that keeps the last name aligned with the enum. That names change is not on main. - `load_compute_translation` reads the line. The placed view uses `native_buffer_store_view`: `R16_FLOAT` and `R16_UINT` bind as `R16_UINT`, and `R32_UINT` stays `R32_UINT` with a 4-byte element. A descriptor that matches none of those refuses with `a half buffer store requires matching format, stride and structured bounds`. - `tests/startup_compute_half_buffer_uav_check.py` expects `uav 0 packed_d16_x table 1 32` for the one-channel stride-2 case, including both MTBUF forms. Wider D16 stores still expect `bufhalf`. - `tests/startup_compute_packed_d16_x_uav_check.py` expects the same line. The `R16_FLOAT` view checks the halfwords. The `R32_UINT` view checks the zero-extended dwords. A wrong stride and a swizzle flag still refuse and leave the buffer untouched. ## Tests Linux: the python-linux check step (`tools/run_checks_parallel.py --from-dir tests/checks/python-linux` plus the workflow's script list) passes all 260 checks. `docs_links_check.py` and `startup_compute_store_d16_x_check.py` also pass. `tests/native_compute_manifest_reasons.cpp` compiles with `g++` and `clang++ -std=c++17 -Wall -Wextra -Werror -Werror=narrowing`. Windows test PC (RTX 4070 Ti) at head `32406a35`, preset dev: build exit 0, then ``` ctest --preset dev --no-tests=error -j 1 -R 'native_compute_manifest_reasons|startup_compute_half_buffer_uav.*|native_compile_dxil.*|.*packed_d16.*|.*store_d16_x.*' ``` 35/35 passed, ctest exit 0 (`startup_compute_half_buffer_uav_warp` and `startup_compute_packed_d16_x_uav_warp` skipped, as on WARP elsewhere). `startup_compute_half_buffer_uav_controls` and `startup_compute_half_buffer_uav_hardware` pass at this head. AI-assisted (Cursor)
KelboLive commented 2026-11-28 19:22:04 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by KelboLive on 2026-11-28T19:22:04Z.

Review: COMMENTED


APPROVED -- passes AGENTS.md rules.

Checked against hard rules:

  • No game files, dumps, DLLs, EXEs, torrents, distribution links, or credentials
  • Neutral wording ("a retail title on the Windows test PC")
  • Source-built fixture: hand-crafted gfx1013 buffer_store_format_d16_x via program_words()
  • All changes in tracked paths (src/, tests/, docs/)
  • New tests only; existing half_buffer_uav path preserved
  • One behavior: manifest publication for packed_d16_x_uav

Code review:

  • view_kind_name adds packed_d16_x_uav and indexed_raw_srv
  • Manifest emission guarded on ComputeViewKind::packed_d16_x_uav && array_count == 1 && required_bytes == 2
  • One-component D16 stored through half_buffer_uav path; packed_d16_x_uav only emits bufd16x when binding matches
  • New refusal function validates element alignment, format (R16_FLOAT/R16_UINT), stride, swizzle-flag rejection
  • Test: positive control (reference halfwords), three negative controls (R32_UINT, bad stride, swizzle flag)
<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6099732706 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3389#pullrequestreview-6099732706). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-11-28T19:22:04Z. **Review:** COMMENTED --- APPROVED -- passes AGENTS.md rules. Checked against hard rules: - No game files, dumps, DLLs, EXEs, torrents, distribution links, or credentials - Neutral wording ("a retail title on the Windows test PC") - Source-built fixture: hand-crafted gfx1013 buffer_store_format_d16_x via program_words() - All changes in tracked paths (src/, tests/, docs/) - New tests only; existing half_buffer_uav path preserved - One behavior: manifest publication for packed_d16_x_uav Code review: - view_kind_name adds packed_d16_x_uav and indexed_raw_srv - Manifest emission guarded on ComputeViewKind::packed_d16_x_uav && array_count == 1 && required_bytes == 2 - One-component D16 stored through half_buffer_uav path; packed_d16_x_uav only emits bufd16x when binding matches - New refusal function validates element alignment, format (R16_FLOAT/R16_UINT), stride, swizzle-flag rejection - Test: positive control (reference halfwords), three negative controls (R32_UINT, bad stride, swizzle flag)
KelboLive commented 2026-11-28 20:32:22 +00:00 (Migrated from github.com)

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

Review: APPROVED


LGTM — clean, well-tested.

Adds packed_d16_x_uav and indexed_raw_srv to the view_kind_name table, publishes bufd16x manifest for one-component D16 stores, and adds packed_d16_x_view_refusal with proper format/stride/swizzle validation. Dispatch stubs handle the new manifest line; native runtime validates format support. Test fixture covers positive path, three negative controls, and reference-only checks.

Ready to land.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6099971749 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3389#pullrequestreview-6099971749). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-11-28T20:32:22Z. **Review:** APPROVED --- LGTM — clean, well-tested. Adds `packed_d16_x_uav` and `indexed_raw_srv` to the view_kind_name table, publishes `bufd16x` manifest for one-component D16 stores, and adds `packed_d16_x_view_refusal` with proper format/stride/swizzle validation. Dispatch stubs handle the new manifest line; native runtime validates format support. Test fixture covers positive path, three negative controls, and reference-only checks. Ready to land.
KelboLive commented 2026-11-28 21:57:01 +00:00 (Migrated from github.com)

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

Review: APPROVED


LGTM — clean, well-tested.

Adds packed_d16_x_uav and indexed_raw_srv to the view_kind_name table, publishes bufd16x manifest for one-component D16 stores, and adds packed_d16_x_view_refusal with proper format/stride/swizzle validation. Dispatch stubs handle the new manifest line; native runtime validates format support. Test fixture covers positive path, three negative controls, and reference-only checks.

Ready to land.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6100252704 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3389#pullrequestreview-6100252704). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-11-28T21:57:01Z. **Review:** APPROVED --- LGTM — clean, well-tested. Adds `packed_d16_x_uav` and `indexed_raw_srv` to the view_kind_name table, publishes `bufd16x` manifest for one-component D16 stores, and adds `packed_d16_x_view_refusal` with proper format/stride/swizzle validation. Dispatch stubs handle the new manifest line; native runtime validates format support. Test fixture covers positive path, three negative controls, and reference-only checks. Ready to land.
Leyukaka commented 2026-11-29 00:10:44 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-29T00:10:44Z.


Head 82984b07.

By its diff (not built here), this makes startup_compute_half_buffer_uav_controls pass by undoing the #3091 store classification. On main 0614f68c that test fails in CI (run 46194701708) with no_manifest ... unsupported startup runtime manifest bindings: UAV kind unknown for the 1-channel store.

  • src/gfx1013_direct_compute.inl:750-752 drops packed_x. A one-component D16 store is half_buffer_uav again and publishes uav 0 bufhalf table 1 32 bytes 2 through the existing branch (direct_compute_cache.cpp:979-982). That is the line the test asserts.

  • The only producer of packed_d16_x_uav on main is gfx1013_direct_compute.inl:743-745, and this PR removes it. Nothing else produces that kind, so the following are unreachable and no test publishes or reads a bufd16x line:

    • the bufd16x emit (direct_compute_cache.cpp:983-986);
    • its reader (d3d12_compute_dispatch.inl:271-275);
    • the token check (:873-879);
    • packed_d16_x_view_refusal (:100-138);
    • the placed-buffer branch (:923, :951, :975-986).

    The three negative descriptors in the new fixture are refused by the existing half-buffer check.

  • Compared with main, the store goes back from and 65535 + bufferStore.i32 to legacyF16ToF32 + bufferStore.f32. On the native-module route, main accepts an R16_FLOAT, R16_UINT or R32_UINT view for it (native_buffer_store_view.h:64-69). The half-buffer check accepts R16_FLOAT only (:70-73).

  • The Windows CI job on this PR (run 46178085395) ran the pr preset, 73 tests. Neither the half-buffer tests nor the new packed_d16_x_uav tests were in it.

  • The view_kind_name change (direct_compute_cache.cpp:897) is the same line as #3395.

Measurements, local:

  • On main 0614f68c, startup_compute_half_buffer_uav_controls and startup_compute_half_buffer_uav_hardware fail.
  • A change that keeps the #3091 classification makes both pass: 7/7 of native_compute_manifest_reasons|startup_compute_half_buffer_uav.*|native_compile_dxil.*. The change:
    • writes uav N packed_d16_x table R B from format_compute_runtime_manifest;
    • parses it in load_compute_translation;
    • binds it as R16_UINT;
    • changes the test's stride-2 expectation to that line.
  • The set is 882 captured compute requests, run with compile_dxil gfx1013-direct-cs@0 --requests.
    • 3 programs had a runtime manifest on main 3f780716 (before #3091) and get unsupported startup runtime manifest bindings: UAV kind unknown on 0614f68c.
    • 2 more moved from incompatible formatted store widths on one slot to the same reason.
    • Neither this PR nor the change above was run on that set.

At 82984b07 this fixes the CI failure as a revert of the #3091 classification. Either describe it as that and drop the unreachable bufd16x code, or keep the packed classification and publish its line, updating the half-buffer test's 1-channel expectation (including the MTBUF cases added by #3353).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7247929980 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3389#issuecomment-7247929980). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-29T00:10:44Z. --- Head 82984b07. By its diff (not built here), this makes `startup_compute_half_buffer_uav_controls` pass by undoing the #3091 store classification. On main 0614f68c that test fails in CI (run 46194701708) with `no_manifest ... unsupported startup runtime manifest bindings: UAV kind unknown` for the 1-channel store. - `src/gfx1013_direct_compute.inl:750-752` drops `packed_x`. A one-component D16 store is `half_buffer_uav` again and publishes `uav 0 bufhalf table 1 32 bytes 2` through the existing branch (`direct_compute_cache.cpp:979-982`). That is the line the test asserts. - The only producer of `packed_d16_x_uav` on main is `gfx1013_direct_compute.inl:743-745`, and this PR removes it. Nothing else produces that kind, so the following are unreachable and no test publishes or reads a `bufd16x` line: - the `bufd16x` emit (`direct_compute_cache.cpp:983-986`); - its reader (`d3d12_compute_dispatch.inl:271-275`); - the token check (`:873-879`); - `packed_d16_x_view_refusal` (`:100-138`); - the placed-buffer branch (`:923`, `:951`, `:975-986`). The three negative descriptors in the new fixture are refused by the existing half-buffer check. - Compared with main, the store goes back from `and 65535` + `bufferStore.i32` to `legacyF16ToF32` + `bufferStore.f32`. On the native-module route, main accepts an R16_FLOAT, R16_UINT or R32_UINT view for it (`native_buffer_store_view.h:64-69`). The half-buffer check accepts R16_FLOAT only (`:70-73`). - The Windows CI job on this PR (run 46178085395) ran the `pr` preset, 73 tests. Neither the half-buffer tests nor the new `packed_d16_x_uav` tests were in it. - The `view_kind_name` change (`direct_compute_cache.cpp:897`) is the same line as #3395. Measurements, local: - On main 0614f68c, `startup_compute_half_buffer_uav_controls` and `startup_compute_half_buffer_uav_hardware` fail. - A change that keeps the #3091 classification makes both pass: 7/7 of `native_compute_manifest_reasons|startup_compute_half_buffer_uav.*|native_compile_dxil.*`. The change: - writes `uav N packed_d16_x table R B` from `format_compute_runtime_manifest`; - parses it in `load_compute_translation`; - binds it as R16_UINT; - changes the test's stride-2 expectation to that line. - The set is 882 captured compute requests, run with `compile_dxil gfx1013-direct-cs@0 --requests`. - 3 programs had a runtime manifest on main 3f780716 (before #3091) and get `unsupported startup runtime manifest bindings: UAV kind unknown` on 0614f68c. - 2 more moved from `incompatible formatted store widths on one slot` to the same reason. - Neither this PR nor the change above was run on that set. At 82984b07 this fixes the CI failure as a revert of the #3091 classification. Either describe it as that and drop the unreachable `bufd16x` code, or keep the packed classification and publish its line, updating the half-buffer test's 1-channel expectation (including the MTBUF cases added by #3353).
SimSalabimse commented 2026-11-29 00:41:35 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by SimSalabimse on 2026-11-29T00:41:35Z.


@Leyukaka Took option 2, and rebased onto current main (head 32406a35).

  • The one-component store stays packed_d16_x_uav with the integer store (and 65535, then bufferStore.i32). The manifest line is uav N packed_d16_x table R B, with no bytes field, and bufd16x is gone.
  • load_compute_translation reads it. The placed view accepts R16_FLOAT, R16_UINT and R32_UINT the same way native_buffer_store_view does: the two R16 formats bind as R16_UINT, and R32_UINT stays R32_UINT. A descriptor that matches none of those still refuses with the half-buffer shape reason, so the existing one-channel negatives stay.
  • The half-buffer fixture's stride-2 line, including both MTBUF forms, is now that packed line.
  • view_kind_name still names packed_d16_x_uav and indexed_raw_srv with the same static assert, since that names change isn't on main. src/gfx1013_direct_compute.inl matches main again.

Linux: python-linux passed 260/260.
Windows test PC: build exit 0, and native_compute_manifest_reasons|startup_compute_half_buffer_uav.*|native_compile_dxil.*|.*packed_d16.*|.*store_d16_x.* passed 35/35 at 32406a35 (two WARP runs skipped), ctest exit 0. That includes startup_compute_half_buffer_uav_controls and _hardware.

AI-Assisted

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7248286635 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3389#issuecomment-7248286635). Originally posted by [SimSalabimse](https://github.com/SimSalabimse) on 2026-11-29T00:41:35Z. --- @Leyukaka Took option 2, and rebased onto current main (head `32406a35`). - The one-component store stays `packed_d16_x_uav` with the integer store (`and 65535`, then `bufferStore.i32`). The manifest line is `uav N packed_d16_x table R B`, with no bytes field, and `bufd16x` is gone. - `load_compute_translation` reads it. The placed view accepts `R16_FLOAT`, `R16_UINT` and `R32_UINT` the same way `native_buffer_store_view` does: the two R16 formats bind as `R16_UINT`, and `R32_UINT` stays `R32_UINT`. A descriptor that matches none of those still refuses with the half-buffer shape reason, so the existing one-channel negatives stay. - The half-buffer fixture's stride-2 line, including both MTBUF forms, is now that packed line. - `view_kind_name` still names `packed_d16_x_uav` and `indexed_raw_srv` with the same static assert, since that names change isn't on main. `src/gfx1013_direct_compute.inl` matches main again. Linux: python-linux passed 260/260. Windows test PC: build exit 0, and `native_compute_manifest_reasons|startup_compute_half_buffer_uav.*|native_compile_dxil.*|.*packed_d16.*|.*store_d16_x.*` passed 35/35 at `32406a35` (two WARP runs skipped), ctest exit 0. That includes `startup_compute_half_buffer_uav_controls` and `_hardware`. AI-Assisted
Leyukaka commented 2026-11-29 01:07:54 +00:00 (Migrated from github.com)

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

Review: APPROVED


Verdict: APPROVE (diff-only, head 32406a35)


Head 32406a35. Re-read by its diff (not built here).

The packed route is now consistent end to end:

  • gfx1013_direct_compute.inl is unchanged from main, so a one-component D16 store (MUBUF, and MTBUF via the #3353 rewrite to buffer_store_format 0x84) stays packed_d16_x_uav.
  • direct_compute_cache.cpp:985 emits uav N packed_d16_x table R B, d3d12_compute_dispatch.inl parses the same token, and the placed view goes through packed_d16_x_view_refusal (:99) and native_buffer_store_view.
  • startup_compute_half_buffer_uav_check.py expects that line for stride 2, and requires that no bufhalf ... bytes 2 line is present, in all three forms (MUBUF, MTBUF indexed, MTBUF first element). The dispatch half of that fixture sends its one-channel negatives (stride, swizzle, format, dst_sel, OOB_SELECT) through packed_d16_x_view_refusal; the range negative is still refused earlier by the placed-range check. startup_compute_packed_d16_x_uav_{warp,hardware} adds the R32_UINT view. native_compute_manifest_reasons checks both the published line and the refusal for required_bytes 4.

Coverage: CI run 46207060926 ran the pr preset (73 tests). It does not include native_compute_manifest_reasons, startup_compute_half_buffer_uav_* or startup_compute_packed_d16_x_uav_{controls,warp,hardware}. Only the Linux reference half ran. The Windows result rests on the author's 35/35 run, and the dispatch checks run on hardware only (the author reports the two WARP runs skipped, so the dispatch checks ran on hardware only).

Not covered by any test in the diff:

  • the view-token branch (:875-880, and packed_d16_x at :910). No fixture uses a token output with the packed line;
  • word3_flags (:121). Only bit 28 and the stride-field swizzle bit are exercised, so word3_flags = 0 would pass;
  • unified && (:110-117). No descriptor clears bit 24;
  • b.array_count == 1 in the emit (direct_compute_cache.cpp:985). There is no array case for this kind.

Merge: git merge-tree against main 212d4b5f is clean, and so is a merge with #3395 at 1eca8d54, whose view_kind_name hunk is identical.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6100845222 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3389#pullrequestreview-6100845222). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-29T01:07:54Z. **Review:** APPROVED --- Verdict: APPROVE (diff-only, head 32406a35) --- Head 32406a35. Re-read by its diff (not built here). The packed route is now consistent end to end: - `gfx1013_direct_compute.inl` is unchanged from main, so a one-component D16 store (MUBUF, and MTBUF via the #3353 rewrite to `buffer_store_format` 0x84) stays `packed_d16_x_uav`. - `direct_compute_cache.cpp:985` emits `uav N packed_d16_x table R B`, `d3d12_compute_dispatch.inl` parses the same token, and the placed view goes through `packed_d16_x_view_refusal` (`:99`) and `native_buffer_store_view`. - `startup_compute_half_buffer_uav_check.py` expects that line for stride 2, and requires that no `bufhalf ... bytes 2` line is present, in all three forms (MUBUF, MTBUF indexed, MTBUF first element). The dispatch half of that fixture sends its one-channel negatives (stride, swizzle, format, dst_sel, OOB_SELECT) through `packed_d16_x_view_refusal`; the range negative is still refused earlier by the placed-range check. `startup_compute_packed_d16_x_uav_{warp,hardware}` adds the R32_UINT view. `native_compute_manifest_reasons` checks both the published line and the refusal for `required_bytes` 4. Coverage: CI run 46207060926 ran the `pr` preset (73 tests). It does not include `native_compute_manifest_reasons`, `startup_compute_half_buffer_uav_*` or `startup_compute_packed_d16_x_uav_{controls,warp,hardware}`. Only the Linux `reference` half ran. The Windows result rests on the author's 35/35 run, and the dispatch checks run on hardware only (the author reports the two WARP runs skipped, so the dispatch checks ran on hardware only). Not covered by any test in the diff: - the view-token branch (`:875-880`, and `packed_d16_x` at `:910`). No fixture uses a token output with the packed line; - `word3_flags` (`:121`). Only bit 28 and the stride-field swizzle bit are exercised, so `word3_flags = 0` would pass; - `unified &&` (`:110-117`). No descriptor clears bit 24; - `b.array_count == 1` in the emit (`direct_compute_cache.cpp:985`). There is no array case for this kind. Merge: `git merge-tree` against main 212d4b5f is clean, and so is a merge with #3395 at 1eca8d54, whose `view_kind_name` hunk is identical.
JohnConnorNPC commented 2026-11-29 12:55:21 +00:00 (Migrated from github.com)

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


Review of head 866e48ef against main 77d1ba4d. The merge was clean (git merge-tree --write-tree origin/main 866e48ef exits 0). Merged as af1cab5c.

The source and test changes are the same as at the approved 32406a35. For every file except CMakePresets.json, git diff 51472392 32406a35 -- <f> and git diff 77d1ba4d 866e48ef -- <f> have the same +/- lines: docs and tests have equal git patch-id --stable, and direct_compute_cache.cpp and d3d12_compute_dispatch.inl differ in context lines only. 866e48ef adds startup_compute_packed_d16_x_uav_reference to the pr filter, and CI run 46262842646 ran it: 47/82 Test #2888: startup_compute_packed_d16_x_uav_reference ... Passed, 100% tests passed out of 82.

Checked, in addition to the earlier reviews:

  • packed_d16_x_view_refusal uses the gfx10 buffer FORMAT codes (11 = 16_UINT, 13 = 16_FLOAT, 20 = 32_UINT), bit 24 as RESOURCE_LEVEL and DST_SEL_X = 4. 0xcef80000 covers TYPE, bits 25-27, ADD_TID_ENABLE, INDEX_STRIDE and bits 19-20.
  • The in-process route keeps its current behaviour. translate_compute_natively sets half_typed_bytes = view.required_bytes (2) for packed_d16_x_uav, and each new dispatch branch requires slot.packed_d16_x && !slot.half_typed_bytes. So only slots read from a manifest take the new branches.

NIT

  1. This doesn't change the default launcher path. Since #3449, run.sh and run.ps1 set X2W_NATIVE_SHADERS_ONLY=1, and load_compute_translation returns at if (native_shaders_only()) { before it reads <key>.txt. The new line is parsed only in -Translate or X2W_NATIVE_SHADERS_ONLY=0 runs. The in-process route already binds this kind through native_buffer_store_view, so nothing is lost. But the 86,436 dispatches in the body and in packed-d16-x-uav-manifest.md are a published-route count from aec2e08, and a default run will not show that drop.
  2. The new static_assert(std::size(names) == static_cast<size_t>(ComputeViewKind::indexed_raw_srv) + 1) is anchored on a kind that is no longer the last one. On main, heap_typed_srv follows it (c24ea568, #3042), so heap_typed_srv still prints unknown and the assert does not catch that, contrary to its comment. No reason text changes today, because heap_typed_srv is always at compute_resource_heap and is refused earlier as resource heap view. The comment also starts with a stray ponytail:. #3333 extends this list with heap_typed_srv and root_buffer_uav and now conflicts with it. I've noted the resolution there.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7256159428 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3389#issuecomment-7256159428). Originally posted by [JohnConnorNPC](https://github.com/JohnConnorNPC) on 2026-11-29T12:55:21Z. --- Review of head `866e48ef` against `main` `77d1ba4d`. The merge was clean (`git merge-tree --write-tree origin/main 866e48ef` exits 0). Merged as `af1cab5c`. The source and test changes are the same as at the approved `32406a35`. For every file except `CMakePresets.json`, `git diff 51472392 32406a35 -- <f>` and `git diff 77d1ba4d 866e48ef -- <f>` have the same `+`/`-` lines: docs and tests have equal `git patch-id --stable`, and `direct_compute_cache.cpp` and `d3d12_compute_dispatch.inl` differ in context lines only. `866e48ef` adds `startup_compute_packed_d16_x_uav_reference` to the `pr` filter, and CI run 46262842646 ran it: `47/82 Test #2888: startup_compute_packed_d16_x_uav_reference ... Passed`, `100% tests passed out of 82`. Checked, in addition to the earlier reviews: - `packed_d16_x_view_refusal` uses the gfx10 buffer FORMAT codes (11 = 16_UINT, 13 = 16_FLOAT, 20 = 32_UINT), bit 24 as RESOURCE_LEVEL and DST_SEL_X = 4. `0xcef80000` covers TYPE, bits 25-27, ADD_TID_ENABLE, INDEX_STRIDE and bits 19-20. - The in-process route keeps its current behaviour. `translate_compute_natively` sets `half_typed_bytes = view.required_bytes` (2) for `packed_d16_x_uav`, and each new dispatch branch requires `slot.packed_d16_x && !slot.half_typed_bytes`. So only slots read from a manifest take the new branches. **NIT** 1. This doesn't change the default launcher path. Since #3449, `run.sh` and `run.ps1` set `X2W_NATIVE_SHADERS_ONLY=1`, and `load_compute_translation` returns at `if (native_shaders_only()) {` before it reads `<key>.txt`. The new line is parsed only in `-Translate` or `X2W_NATIVE_SHADERS_ONLY=0` runs. The in-process route already binds this kind through `native_buffer_store_view`, so nothing is lost. But the 86,436 dispatches in the body and in `packed-d16-x-uav-manifest.md` are a published-route count from `aec2e08`, and a default run will not show that drop. 2. The new `static_assert(std::size(names) == static_cast<size_t>(ComputeViewKind::indexed_raw_srv) + 1)` is anchored on a kind that is no longer the last one. On `main`, `heap_typed_srv` follows it (`c24ea568`, #3042), so `heap_typed_srv` still prints `unknown` and the assert does not catch that, contrary to its comment. No reason text changes today, because `heap_typed_srv` is always at `compute_resource_heap` and is refused earlier as `resource heap view`. The comment also starts with a stray `ponytail:`. #3333 extends this list with `heap_typed_srv` and `root_buffer_uav` and now conflicts with it. I've noted the resolution there. AI-assisted.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows!3389
No description provided.