Skip to content

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

Merged
R0Y00 merged 1 commit into
R0Y00:mainfrom
RonLogic:runtime/half-buffer-uav-manifest
Nov 28, 2026
Merged

R0Y00 merged 1 commit into
R0Y00:mainfrom
RonLogic:runtime/half-buffer-uav-manifest

Conversation

@RonLogic

Copy link
Copy Markdown
Contributor

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 native compute: run wave32 direct modules on WARP (proposal, stage 1 claimed) #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 R0Y00 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants