runtime: bind published D16 buffer stores to typed UAVs #3304

Manually merged
github merged 1 commit from github-bot/gh-3302 into gh-pr/3302/base 2026-11-28 07:06:18 +00:00 AGit
Owner

@⁠RonLogic on GitHub · 2026-11-28 06:42 UTC · original
RonLogic:runtime/half-buffer-uav-manifest → main · +250 −11 · 7 files · 1 commits · merged 2026-11-28 07:04 UTC

Change

Refs #3226 and #2935. Native D16 buffer stores produce DXIL, but requests that bind half_buffer_uav stop at manifest publication. On the baseline, all three source-built requests emitted .cs.cso and reported unsupported startup runtime manifest bindings: UAV kind half_buffer_uav.

Publish a typed half-buffer view for 2-, 4- and 8-byte elements. At Dispatch, validate the gfx10 format, stride, selectors, bounds mode, alias, range and desktop typed-store support. The runtime uses the guest record count and element-aligned offset to create the D3D12 UAV. The producer and runtime use the existing Compute cache and slot 67/14 route. The scope is hardware table descriptors. Buffer UAV tokens are covered by #2961.

Verification

6dee0421 on 19358dae, clean merge checked against 48ca9ab1. Windows 11 26300.10075, MSVC 19.52.37029, DXC 1.9.2602.17, Agility 1.620.2. RTX 4070 driver 32.0.16.2124 and app-local WARP 1.0.22.

cmake --build <build> --target offscreen_check compile_dxil startup_stream_consumer d3d12_xs_shim
ctest --test-dir <build> --no-tests=error -j 1 -V -R '^(startup_compute_(half_buffer_uav|dispatch|dispatch_entry|dispatch_output|dispatch_native)_(warp|hardware|controls)|native_direct_container)$'
  • New tests passed 3/3 in both Debug and Release. Each adapter matched all 320 output and guard words for all three formats, including 13 records starting at byte 8 and a halfword endpoint in the single-channel case. All 18 invalid descriptor and range controls per adapter preserved the sentinel. The D3D12 debug layer was enabled with no errors. The runtime emitted the existing feature-query warning 989 on the app-local configuration.
  • Whole selection had 11 passes in each configuration. The existing startup_compute_dispatch_native_warp missed 288 writes, with word 0 left at c5c5c5c5 instead of ea74e376. A clean build of the parent reproduced the same mismatch. This is the partial-wave ballot case in #3162. Normal raw-output, descriptor-entry and range-refusal tests passed on both adapters.
  • Documentation link check passed for 145 files and 664 links.

Evidence and follow-up

The fixture builds the GPU programs from local Python and checks exact binary16 output with a CPU reference. The historical census motivates the scope. The measured compatibility gain here is the three source-built requests through the published runtime path. I used Codex to prepare the change and ran verification locally.

**@⁠RonLogic** on GitHub · 2026-11-28 06:42 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3302) `RonLogic:runtime/half-buffer-uav-manifest` → `main` · +250 −11 · 7 files · 1 commits · merged 2026-11-28 07:04 UTC ## Change Refs #3226 and #2935. Native D16 buffer stores produce DXIL, but requests that bind `half_buffer_uav` stop at manifest publication. On the baseline, all three source-built requests emitted `.cs.cso` and reported `unsupported startup runtime manifest bindings: UAV kind half_buffer_uav`. Publish a typed half-buffer view for 2-, 4- and 8-byte elements. At Dispatch, validate the gfx10 format, stride, selectors, bounds mode, alias, range and desktop typed-store support. The runtime uses the guest record count and element-aligned offset to create the D3D12 UAV. The producer and runtime use the existing Compute cache and slot 67/14 route. The scope is hardware table descriptors. Buffer UAV tokens are covered by #2961. ## Verification `6dee0421` on `19358dae`, clean merge checked against `48ca9ab1`. Windows 11 26300.10075, MSVC 19.52.37029, DXC 1.9.2602.17, Agility 1.620.2. RTX 4070 driver 32.0.16.2124 and app-local WARP 1.0.22. ```powershell cmake --build <build> --target offscreen_check compile_dxil startup_stream_consumer d3d12_xs_shim ctest --test-dir <build> --no-tests=error -j 1 -V -R '^(startup_compute_(half_buffer_uav|dispatch|dispatch_entry|dispatch_output|dispatch_native)_(warp|hardware|controls)|native_direct_container)$' ``` - New tests passed 3/3 in both Debug and Release. Each adapter matched all 320 output and guard words for all three formats, including 13 records starting at byte 8 and a halfword endpoint in the single-channel case. All 18 invalid descriptor and range controls per adapter preserved the sentinel. The D3D12 debug layer was enabled with no errors. The runtime emitted the existing feature-query warning 989 on the app-local configuration. - Whole selection had 11 passes in each configuration. The existing `startup_compute_dispatch_native_warp` missed 288 writes, with word 0 left at `c5c5c5c5` instead of `ea74e376`. A clean build of the parent reproduced the same mismatch. This is the partial-wave ballot case in #3162. Normal raw-output, descriptor-entry and range-refusal tests passed on both adapters. - Documentation link check passed for 145 files and 664 links. ## Evidence and follow-up The fixture builds the GPU programs from local Python and checks exact binary16 output with a CPU reference. The historical census motivates the scope. The measured compatibility gain here is the three source-built requests through the published runtime path. I used Codex to prepare the change and ran verification locally.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 06:46:35 +00:00
github-bot changed target branch from main to gh-pr/3302/base 2026-11-28 07:06:15 +00:00
github manually merged commit 6dee0421fa into gh-pr/3302/base 2026-11-28 07:06:18 +00:00
Author
Owner

@⁠R0Y00 on GitHub · 2026-11-28 07:04 UTC · original · approved these changes

Independent Release review on 6dee0421. I built offscreen_check, compile_dxil, startup_stream_consumer and d3d12_xs_shim, then ran ctest --preset release --no-tests=error --output-on-failure -j 1 -R '^(startup_compute_(half_buffer_uav|dispatch|dispatch_entry|dispatch_output|dispatch_native)_(warp|hardware|controls)|native_direct_container)$'. Ten passed and two inbox-WARP wave32 cases skipped, with no failures. On RTX 4060 Laptop, all three formats matched 13 typed records starting at byte 8 and the guards. All 18 invalid descriptors/ranges preserved the sentinel and refused. Windows 11 build 26200, DXC 10.0.26100, RTX driver 32.0.16.1656, debug layer enabled. The manifest/runtime pairing uses the guest record count and validates format, stride, selectors and bounds before binding; the raw path retains its existing alignment. This covers published buffer views.

**@⁠R0Y00** on GitHub · 2026-11-28 07:04 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3302#pullrequestreview-6096390221) · **approved these changes** Independent Release review on `6dee0421`. I built `offscreen_check`, `compile_dxil`, `startup_stream_consumer` and `d3d12_xs_shim`, then ran `ctest --preset release --no-tests=error --output-on-failure -j 1 -R '^(startup_compute_(half_buffer_uav|dispatch|dispatch_entry|dispatch_output|dispatch_native)_(warp|hardware|controls)|native_direct_container)$'`. Ten passed and two inbox-WARP wave32 cases skipped, with no failures. On RTX 4060 Laptop, all three formats matched 13 typed records starting at byte 8 and the guards. All 18 invalid descriptors/ranges preserved the sentinel and refused. Windows 11 build 26200, DXC 10.0.26100, RTX driver 32.0.16.1656, debug layer enabled. The manifest/runtime pairing uses the guest record count and validates format, stride, selectors and bounds before binding; the raw path retains its existing alignment. This covers published buffer views.
This discussion has been locked. Commenting is limited to contributors.
No description provided.