Skip to content

runtime: raise compute manifest and dispatch UAV limit from 8 to 16 - #3773

Open
R0D4X wants to merge 1 commit into
R0Y00:mainfrom
R0D4X:compute/uav-limit-16
Open

R0D4X wants to merge 1 commit into
R0Y00:mainfrom
R0D4X:compute/uav-limit-16

Conversation

@R0D4X

@R0D4X R0D4X commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Refs #3224

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 (#3270; 9, 10, and 16 UAV bindings in the #3224 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: Raises tr.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): Expands parameters from 11 to 19 (1 constants + 1 view table + 1 sampler table + up to 16 atomic UAVs) and adds a bounds check returning E_INVALIDARG.
  • tools/startup/triage_run.py & tests/startup_triage_run_check.py: Recognizes both more than 8 UAVs (for older logs) and more than 16 UAVs.
  • tests/native_uav_slots_check.py: Validates DXIL compilation for 8, 9, 16, and 17 UAVs, checks compile_dxil --requests manifest publication (uav 0..uav N-1 + .cs.cso) for 8, 9, and 16 UAVs, and asserts 17 UAVs is refused with unsupported startup runtime manifest bindings: more than 16 UAVs.

Verification

Environment: Windows 11 x64 (10.0.26300.9974), MSVC 19.44.35230, Windows SDK / DXC 10.0.26100.0.

Commit under test: 062de148.

ctest --test-dir out/build/dev --no-tests=error -j 1 -V -R "^(native_uav_slots_controls|startup_triage_run)$"
ctest --test-dir out/build/release --no-tests=error -j 1 -V -R "^(native_uav_slots_controls|startup_triage_run)$"
  • dev: 2/2 passed (0 skipped).
  • release: 2/2 passed (0 skipped).
  • Mutation check: Temporarily reverting uav_count > 16 back to uav_count > 8 in src/direct_compute_cache.cpp caused native_uav_slots_controls to fail on the 9-UAV manifest case (no_manifest ... more than 8 UAVs); after reverting src/, 2/2 passed again.

No game files, dumps, or private paths included.

@Leyukaka Leyukaka left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed 062de1480. Thanks for the change. Please update tests/native_compute_manifest_reasons.cpp:169. Its nine-UAV case still expects more than 8 UAVs and 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:74 exercises publication only, so restoring either runtime limit to eight would still pass it.

src/startup_stubs/translated_sampler_bindings.h:151 checks 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 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.

I reproduced Leyukaka’s formatter finding on 062de148 with a fresh MSVC Debug build. native_uav_slots_controls passes, but native_compute_manifest_reasons fails with FAIL 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.

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.

3 participants