Repository navigation
runtime: bind raw pixel buffer UAVs for native graphics draws - #3215
Conversation
Reuse the shared buffer view validator and tracked graphics UAV path. Verify source-built native stores, bounded views, descriptor refusals and color output on hardware and WARP. Refs R0Y00#3212, R0Y00#3074, R0Y00#3198. AI-assisted.
6785668 to
4086164
Compare
|
Rebased onto a5c02db as 4086164 (same patch; original head preserved). The shared native_buffer_store_view alignment check also has a Compute replay caller, so I rebuilt it and ran actual app-local Agility 1.620.2 replays on RX 7900 XT and WARP 1.0.22 in Debug and Release. All 16 suite/adapter/config combinations passed: native_indexed_atomic_check (four UAV shapes, GLC old values, inactive lanes, OOB and mutation), native_mtbuf_check (54 result words and guards), native_scalar_lds_check (raw UAV stores and scalar/ALU controls), native_adjacent_srv_check (distinct/null SRVs and refusals). The tests use fresh CMake replay objects relinked with the app-local SDK export; WARP copies select upstream --direct-warp rather than --direct, with the same oracles. Both configurations also passed the three registered raw-pixel/buffer-validator CTests. Debug layer unavailable. No extra production changes in this PR. #3216 is the separately claimed pixel atomic slice, dependent on this PR. Buhe; AI-assisted. |
R0Y00
left a comment
There was a problem hiding this comment.
I independently reviewed 4086164d integrated over main 886a5a28 (trial tree 88da49ca, diff check clean). The manifest is limited to a single raw pixel UAV, the runtime validates the tracked table entry and resource/view before recording, the recording retains the resource, and consecutive UAV uses have a barrier. I found no code issue in that scope.
Built startup_stream_consumer d3d12_xs_shim compile_dxil native_store_replay native_raw_buffer_view_check and ran the raw pixel UAV, buffer-view, existing pixel UAV and native compute-dispatch fixtures with CTest in Debug and Release /O2. Each build had six passes and one unrelated native-compute WARP wave32 capability skip. The new raw pixel fixture passed 14/14 on WARP (64-byte stride, including the wrong-stride control) and 13/13 on RTX (32-byte stride) per build. That is 54 cases, 3,456 DWORD and 1,728 pixel comparisons, including rejection and decoy controls. Windows 11 26200.9974, WARP 10.0.26100.9818 and RTX 4060 Laptop driver 32.0.16.1656. D3D12 debug layer enabled with zero errors in the raw cases. Hosted Windows also passed.
Please add a short reproduction and supported-scope entry in docs/experiments.md, as the repository asks for new public capabilities. ctest --preset dev --no-tests=error -j1 -R '^(native_pixel_raw_uav_(warp|hardware)|native_raw_buffer_view_controls)$' and the single direct, non-indexed draw with one raw UAV restriction would cover it. This can be separate from the first-use graphics work in #3094/#2981.
Address R0Y00#3215 review. AI-assisted.
|
Thank you for the independent review and RTX/WARP debug-layer verification. Added the requested reproduction commands and supported-scope entry to docs/experiments.md in 785d986, including the single direct non-indexed draw / one raw pixel UAV restriction, the fixture checks, and the independent results. Documentation only; the tested implementation is unchanged. This remains separate from #3094/#2981. Buhe; AI-assisted. |
R0Y00
left a comment
There was a problem hiding this comment.
The previous request is resolved on 785d9860: the additional commit only changes docs/experiments.md and records the supported single-UAV direct draw, build, exact test command, negative controls and result scope. python -B tests/docs_links_check.py passed (121 Markdown files, 621 links).
I rebuilt the PR over current main c1de64a5 (clean trial tree 8db83a06) to cover changes that had landed in the shared draw/cache paths. Debug and Release /O2 each produced 10 passes and one WARP wave32 skip in the native-compute neighbor. The selection covered native_pixel_raw_uav_(warp|hardware), native_raw_buffer_view_controls, startup_(stream_draw|pixel_uav|compute_dispatch_native)_(warp|hardware), and both WARP missing-shader fallback modes. The new fixture passed 14 WARP and 13 RTX cases per build, including its wrong-stride and wrong-view controls. WARP 10.0.26100.9818 and RTX 4060 Laptop driver 32.0.16.1656 on Windows 11 26200.9974, with zero D3D12 debug-layer errors in the raw cases. Required hosted Windows passed.
Reuse compute raw atomic lowering with exact pixel EXEC, helper exclusion, bounded view and GLC old-value SSA. Validate through native request publication and real GPU draws. Refs R0Y00#3216, R0Y00#3212, R0Y00#3215, R0Y00#3074, R0Y00#3198. AI-assisted.
Refs #3212, #3074, #3198.
Problem and change
A source-built native pixel
buffer_store_dwordcompiles to DXIL, but the graphics manifest publisher omitted raw buffer UAVs and the runtime refused the raw table entry. On the original base e219d72, the pair compiled, but did not publish a manifest. Supplying the missing manifest solely for the baseline diagnostic reproduced the actual refusal and left both UAV buffers and the render target unchanged.uav N raw table P Ofor the narrow native pixel store path.native_buffer_store_view, retain the resource through command recording, and reuse the graphics UAV descriptor/state path with a UAV barrier.Verification
Tested final source on base d474a39, commit 6785668, Windows x64, MSVC 19.44 and existing app-local Agility 1.620.2 DLLs with stock SDK headers. RX 7900 XT driver 32.0.32029.2010 and WARP 1.0.22.0. Debug and Release each passed the same 15 selected CTests (30/30, no failures or skips). D3D12 debug layer unavailable on this machine; these are Debug/Release builds, not debug-layer validation.
The new source-built native VS/PS is published through the actual runtime request/cache, compiled by compile_dxil, then executed through graphics PSO creation and Draw. Each case compares all 64 DWORDs across two initialized buffers and all 32 render-target pixels after a fence. Hardware: 13/13 cases per configuration; WARP: 14/14, including a wrong-stride control. Across both configurations: 54/54 cases, 3456 DWORD and 1728 pixel comparisons exact.
Controls: nonzero table/view offsets, short view and exact end, wrong live descriptor selects the other buffer, incompatible typed/structured/SRV descriptors, absent UAV permission, missing table/view, out-of-table/misaligned offsets, unexpected typedload flag and 64-byte stride mismatch. Device-free validator checks bounds, overflow, alignment, empty count, counter, stride and format/flags. Existing texture UAV (including EXEC and array controls), stream draw, indirect draw/indexed/mesh, native container and cache controls passed.
Stock runtimes lacking SM6.6 are capability-skipped for the new GPU fixture. The first stock local PSO attempt returned E_INVALIDARG; the app-local runtime supports the required shader model and executes the readbacks. No claim of general raw-UAV support, real-title impact, full-suite success or guest EXEC/helper-lane behavior for atomics.
Coordination: #3094 and #2981 touch the graphics draw file; this patch is the offline native pair/cache binding slice only. Happy to coordinate merge order if either integration lands first.
Source-built inputs only. Buhe; AI-assisted.