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

Merged
RonLogic merged 1 commit from upstream-pr/3302 into main 2026-11-28 07:04:42 +00:00
RonLogic commented 2026-11-28 06:42:56 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by RonLogic on 2026-11-28T06:42:56Z.


Change

Refs #3224 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 #3160. 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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:5537558941 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3302). Originally posted by [RonLogic](https://github.com/RonLogic) on 2026-11-28T06:42:56Z. --- ## Change Refs #3224 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 #3160. 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.
R0Y00 commented 2026-11-28 07:04:32 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-28T07:04:32Z.

Review: APPROVED


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6096390221 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3302#pullrequestreview-6096390221). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-28T07:04:32Z. **Review:** APPROVED --- 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.
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!3302
No description provided.