runtime: raise compute manifest and dispatch UAV limit from 8 to 16 #3775
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!3775
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3773"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@R0D4X on GitHub · 2026-12-01 18:09 UTC · original
R0D4X:compute/uav-limit-16→main· +360 −18 · 9 files · 4 commits · merged 2026-12-02 16:05 UTCRefs #3226
Summary
Raises the compute runtime manifest and dispatch UAV slot limit from 8 to 16 so the 36 wave32 start-up compute shaders already validated with DXIL shader flag
0x8000(#3272; 9, 10, and 16 UAV bindings in the #3226 census) can publish a runtime manifest and dispatch:src/direct_compute_cache.cpp(format_compute_runtime_manifest): Raises the compute UAV cap from 8 to 16 (more than 16 UAVs). Graphics manifests stay at 8.src/startup_stubs/d3d12_compute_dispatch.inl: Raisestr.uavs.size()cap from 8 to 16 in both the disk manifest loader (load_compute_translation) and the live native path (translate_compute_natively).src/startup_stubs/translated_sampler_bindings.h(create_translated_root): Expandsparametersfrom 11 to 19 (1 constants + 1 view table + 1 sampler table + up to 16 atomic UAVs) and adds a bounds check returningE_INVALIDARG.tools/startup/triage_run.py&tests/startup_triage_run_check.py: Recognizes bothmore than 8 UAVs(for older logs) andmore than 16 UAVs.tests/native_uav_slots_check.py: Validates DXIL compilation for 8, 9, 16, and 17 UAVs, checkscompile_dxil --requestsmanifest publication (uav 0..uav N-1+.cs.cso) for 8, 9, and 16 UAVs, and asserts 17 UAVs is refused withunsupported startup runtime manifest bindings: more than 16 UAVs.Verification
Environment: Windows 11 x64 (
10.0.26300.9974), MSVC19.44.35230, Windows SDK / DXC10.0.26100.0.Commit under test:
062de148.dev: 2/2 passed (0 skipped).release: 2/2 passed (0 skipped).uav_count > 16back touav_count > 8insrc/direct_compute_cache.cppcausednative_uav_slots_controlsto fail on the 9-UAV manifest case (no_manifest ... more than 8 UAVs); after revertingsrc/, 2/2 passed again.No game files, dumps, or private paths included.
@Leyukaka on GitHub · 2026-12-01 21:57 UTC · original · reviewed
Reviewed
062de1480. Thanks for the change. Please updatetests/native_compute_manifest_reasons.cpp:169. Its nine-UAV case still expectsmore than 8 UAVsand will fail once the formatter accepts it. Moving the refusal case to 17 UAVs would keep the control.Please also cover an actual 16-UAV Dispatch through both the published and in-process paths.
tests/native_uav_slots_check.py:74exercises publication only, so restoring either runtime limit to eight would still pass it.src/startup_stubs/translated_sampler_bindings.h:151checks the parameter array length. A program with 32 entry DWORDs and 16 indexed atomic UAVs still passes the manifest count checks, then requests a 65-DWORD root signature and fails serialization. Please enforce the root cost before publishing and cover the 64-DWORD boundary.@R0Y00 on GitHub · 2026-12-02 05:32 UTC · original · requested changes
I reproduced Leyukaka’s formatter finding on
062de148with a fresh MSVC Debug build.native_uav_slots_controlspasses, butnative_compute_manifest_reasonsfails withFAIL more than 8 UAVs | got: a manifest(1 of 59 reasons wrong). Please keep a 17-UAV refusal case, add the 64/65-DWORD root-cost boundary, and run a 16-UAV dispatch with output readback through both the disk-loaded and in-process translation paths.062de14804tof91080d138@R0D4X on GitHub · 2026-12-02 12:23 UTC · original
Rebased onto
upstream/main(e143824c) and addressed all three review findings inf91080d1:tests/native_compute_manifest_reasons.cpp: Updated the UAV-count refusal case from 9 UAVs (more than 8 UAVs) to 17 UAVs (more than 16 UAVs), and added the 64-DWORD vs 65-DWORD root-signature boundary cases (31 entry DWORDs + 1 view table + 16 indexed atomic UAVs = 64 DWORDs published; 32 entry DWORDs + 1 view table + 16 indexed atomic UAVs = 65 DWORDs refused withroot signature exceeds 64 DWORDs).compute_root_dwords()(max(1, uds) + (views ? 1 : 0) + 2 * atomic_uavs + (sampler_heap ? 1 : 0)) insrc/startup_stubs/translated_sampler_bindings.h(checked increate_translated_root) and enforced the 64-DWORD limit before publishing informat_compute_runtime_manifest(src/direct_compute_cache.cpp) as well as in both runtime compute paths (load_compute_translationandtranslate_compute_nativelyinsrc/startup_stubs/d3d12_compute_dispatch.inl).Dispatch(1, 1, 1)readback on both published and in-process native routes: Addeddispatch-uav16totests/startup_stream_consumer.cpp(16 placed raw-buffer UAVs at table bytes0..480, 32 words each) and extendedtests/native_uav_slots_check.py+tests/cmake/native_uav_slots.cmakewith:native_uav_slots_dispatch_{warp,hardware}(published route: verifies the 65-DWORD manifest refusal in the runtime manifest reader, then dispatches the published 16-UAV shader and checks all16 x 32output words against the CPU reference), andnative_uav_slots_dispatch_native_{warp,hardware}(in-processX2W_NATIVE_SHADERS_ONLY=1route: live-translates and dispatches the 16-UAV shader and checks all16 x 32output words).tr.uavs.size() > 16to> 8ind3d12_compute_dispatch.inlfails bothnative_uav_slots_dispatch_hardwareandnative_uav_slots_dispatch_native_hardware.Verification (
f91080d1)10.0.26300.9974), MSVC19.44.35230, Windows SDK / DXC10.0.26100.0, NVIDIA GeForce RTX 5080 (10de:2c02, driver32.0.16.2140), D3D12 debug layer enabled.ctest --preset dev --no-tests=error -R '^(native_compute_manifest_reasons|native_uav_slots)' -V: 5 passed, 2 skipped (77), 0 failed (native_compute_manifest_reasons0 of 64 wrong,native_compute_manifest_reasons_requests,native_uav_slots_controls,native_uav_slots_dispatch_hardware,native_uav_slots_dispatch_native_hardwarepassed;native_uav_slots_dispatch_warpandnative_uav_slots_dispatch_native_warpskipped 77 on WARP for lacking 32-lane waves).ctest --preset release --no-tests=error -R '^(native_compute_manifest_reasons|native_uav_slots)' -V: 5 passed, 2 skipped (77), 0 failed (same breakdown).tests/standin_exports_check.py(470 cases, 6/6 mutations killed PASS),tests/docs_links_check.py,tests/bidi_controls_check.pyall passed.f91080d138to7153a05108@R0Y00 on GitHub · 2026-12-02 13:05 UTC · original · approved these changes
The three findings from
062de148are addressed on7153a051. The formatter refuses 17 UAVs, accepts the 64-DWORD root, and rejects 65 DWORDs. I checked the same cost in the manifest loader and in-process path. The directly indexedsmpidxbinding uses a root signature flag, so it adds no table cost;samplers.heapseparately accounts for a descriptor table where one is created.Windows 11 26300.9974, MSVC Debug and SDK 10.0.26100.
ctest --preset dev --no-tests=error -j 1 -V -R '^native_(uav_slots_|compute_manifest_reasons$)'gave 4 passes and 2 capability skips. On RTX 4060 Laptop driver 32.0.16.1656 with the D3D12 debug layer enabled, the published and in-process paths each matched 16 UAVs × 32 lanes. Inbox WARP 10.0.26100.9818 declined both dispatch variants with exit 77. The published test reached the 65-DWORD refusal on both adapters before the capability check. Required Windows CI remains red at the inheritednative_direct_meshfailure tracked by #3853.