Repository navigation
compute: indexed atomic UAV dispatch (takeover of #3417) - #3454
Conversation
Publish ComputeViewKind::indexed_atomic_uav in format_compute_runtime_manifest
as 'uav <register> atomic table <parameter> <byte>' for a single 4-byte view,
and bind it in the startup dispatch path from a slot-19 token view, with the
view's {stride, count} as root constants at b(register + 1), matching
NativeComputePipeline. Hardware-descriptor atomics and unsupported token
shapes stay refused by name. Refs R0Y00#3224, R0Y00#2935
…ithout wave32 WIN-VERIFY round 1: on hardware, three negative-control UAV descs were invalid for D3D12 CreateUnorderedAccessView on the 1280-byte buffer (a 4096-byte structured stride, a RAW-flagged R32_UINT view, a 1284-byte view), so slot 19 removed the device before the dispatch could refuse them. Keep every negative view creatable: the 4096-stride view now runs on the 16 MiB + 64 KiB committed buffer, the unaligned view uses WORDS - 1 elements, and the two uncreatable shapes stay out (a RAW view needs R32_TYPELESS; a view past the end of its buffer cannot be created). controls() now checks every negative view fits its buffer and that the two uncreatable shapes fail that check. On WARP, the --shader-wave32 gate exited 77, skipping the published raw/structured/typed runs even though only the native translator needs 32-lane waves: main() no longer probes wave32, and native_check() probes it directly so a skip there does not discard the published results. Refs R0Y00#3224, R0Y00#2935
…ed atomic UAV check
Keeps both slot setup lines in d3d12_compute_dispatch.inl.
Keeps both manifest reason cases in native_compute_manifest_reasons.cpp.
src/startup_stubs/d3d12_compute_dispatch.inl (translate_compute_natively view loop): kept main's Kind alias, texture_output/dimension switch, supported flag and slot reference; added the indexed atomic UAV to output, to supported (main's supported list no longer follows from output) and as slot.atomic. The branch's volume flag is dropped in favour of main's dimension switch.
|
Review of MUST
What this PR settles from the #3417 review
SHOULD
NIT
Not run here: build, ctest, WARP or GPU. This is a read-only review on Linux. AI-assisted. |
|
New head MUST 1 One conflicting file, The branch's Run Full build of 24 passed, 3 skipped. The skips are the WARP variants that need a 32-lane adapter: The tests from
The The rest of that output: SHOULD
The NITs are not addressed in this push either. |
|
SHOULD 2 on 393b80e: adapter details for the 27-test run on a96d1f6, as printed by the tests.
Windows Sandbox on a Windows 11 host, build 10.0.26300. The debug layer was unavailable in the Sandbox, on both backends. |
|
Re-review of the delta
These earlier SHOULDs remain open but do not block the merge: SHOULD 1 (no 32-lane WARP dispatch), SHOULD 3 (the AI-assisted review. |
|
Follow-up: the merge didn't go through. #3351 merged first (
Resolution: keep main's line with AI-assisted review. |
d3d12_compute_dispatch.inl: header comment keeps main's texcubearr line and the indexed atomic UAV sentence.
|
Re-review of the delta
The SHOULDs and NITs from the earlier reviews are unchanged and don't block the merge. AI-assisted review. |
Merge origin/main 8a30428 (upstream in this clone is remote origin, R0Y00/Xbox2Windows), which includes R0Y00#3351 and R0Y00#3454. Conflicts resolved: tests/startup_stream_consumer.cpp keeps main's mode.rfind("dispatch-cube", 0) == 0 alongside the X2W_TEST_RECORDS32=1 output-at-byte-32 clause on the dispatch_slot67 condition; tests/native_compute_manifest_reasons.cpp keeps all of main's cube_* / indexed_atomic_uav cases and published[] rows (including the texcubearr row and the indexed atomic publish check) alongside the d16_sample_srv cases, with published[] in main's (binding, kind, dim, line) order: 27 cases + 13 published + 3 = 43 checks. The d16 test and docs note are unchanged in this merge.
main added the indexed atomic UAV (R0Y00#3454) parser line and manifest reasons next to this branch's typed output line and 20-byte reasons row. Keep both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Takeover of #3417 by @Ammmae0x.
What is merged
9895ec1c,fa269a85,10d7d41b), unchanged.main:e1143678(merge of77d1ba4d),393b80eb(merge ofaf1cab5c, compute: publish packed_d16_x_uav runtime manifest (Part of #3224) #3389) anda96d1f6b(merge of4b0586d4, runtime: bind four-channel and half4 texture UAVs on the native compute route #3398 and compute: name each input view token a dispatch will not bind (Part of #3224) #3400). Head isa96d1f6b.mainise3f9a64f; its commits after4b0586d4touch no file of this PR.e1143678has one conflict, insrc/startup_stubs/d3d12_compute_dispatch.inl, at the slot setup intranslate_compute_natively. Both lines are kept:if (atomic) slots.back().atomic = true;from #3417 andslots.back().requires_identity_dst_sel = view.requires_identity_dst_sel;frommain. They set different fields.git show --remerge-diff e1143678shows nothing else.393b80ebhas one conflicting file,tests/native_compute_manifest_reasons.cpp, in two places. Both sides are kept in each:cases[], the twoindexed_atomic_uaventries from runtime: bind indexed atomic UAVs in the direct compute runtime path #3417, then thepacked_d16_x_uaventry frommain;publishedloop, theuav 0 atomic table 1 32block from runtime: bind indexed atomic UAVs in the direct compute runtime path #3417, then theuav 0 packed_d16_x table 1 32block frommain.One line is our edit and comes from neither side: the count in the final
printfis+ 3instead of+ 2. Each side had raised it from+ 1to+ 2for its own standalone block, and the merged file has both blocks. The count is only printed; the exit code of the test does not depend on it.git show --remerge-diff 393b80ebshows nothing else.a96d1f6bhas one conflicting file,src/startup_stubs/d3d12_compute_dispatch.inl, in the view loop oftranslate_compute_natively, which #3398 rewrote. Main's side is kept: theKindalias,texture_outputand the dimension switch, thesupportedlist andauto& slot. Three lines carry the atomic UAV:const bool atomic = view.kind == Kind::indexed_atomic_uav;, and|| atomicat the end ofoutput;|| atomicinsupported, aftertexture_input. Main refuses any kind missing from that list;slot.atomic = atomic;on main'sauto& slot, replacingif (atomic) slots.back().atomic = true;.The
volumeflag of the branch is dropped: main's dimension switch covers it.git show --remerge-diff a96d1f6bshows nothing else.Run
Full build of
a96d1f6b,devpreset with-DX2W_WITH_OPUS=OFF, in a fresh isolated environment with a hardware adapter (not the one in the PR) and the inbox WARP.The eight
startup_input_view_token*tests, not listed, pass too. The three skips are the WARP variants that need a 32-lane adapter.native_compute_manifest_reasonsoutput includesok UAV kind packed_d16_x_uav,ok publishes uav 0 atomic table 1 32,ok publishes uav 0 packed_d16_x table 1 32and0 of 32 manifest reasons wrong._hardwareoutput:The
native:line of that output, separately, as asked in the reviews of #3417 and of393b80eb:_warpdid not reach the dispatch. Its output hasnative_lane_range=4..4and ends with:_controlsoutput includesindexed atomic UAV published as `uav 0 atomic table 1 32`.Not covered
_warpskips before any dispatch and prints nonative:line._controlsand_hardwareget pastcompile_dxilat the same commits plus the merges.u0 root=... bytes=...line asked for on runtime: bind indexed atomic UAVs in the direct compute runtime path #3417 is not in the output of this test when it passes, so it is not posted._controlsto theprpreset (SHOULD 1 of the review) is not done here, because it editsCMakePresets.json.393b80ebare open:countdoes not decide the result, and u0 is the only atomic UAV. The test files are unchanged since393b80eb.Refs #3417