Repository navigation
runtime: bind directly indexed sampler heap in native compute - #3779
Conversation
Leyukaka
left a comment
There was a problem hiding this comment.
Reviewed 9e5a09475. Thanks for the change. The skip at tests/startup_compute_sampler_heap_check.py:118 looks for root signature creation failed (adapter lacks directly indexed sampler heap). The runtime emits the device does not take a directly indexed sampler heap at src/startup_stubs/translated_sampler_bindings.h:186, so the skip never matches. An unsupported adapter can also reject the fixture's initial root signature at tests/startup_stream_consumer.cpp:1482, before native translation, and the test then fails instead of skipping. Please detect that capability before creating the fixture and return 77 for that case.
The entry-2047 case at tests/startup_compute_sampler_heap_check.py:170 reaches the existing frontend refusal at src/gfx1013_direct_compute.inl:892, so removing the new runtime span guard would still pass it. To test the guard, please exercise it with out-of-range binding metadata.
…untime span guard via pack
|
Addressed both review points in
Re-verified on
|
Fixes #3076
Refs #2935
Summary
Completes the remaining scope of #3076: binding the directly indexed sampler heap (
ComputeViewKind::heap_sampler) on the in-process native compute translation route (translate_compute_natively), matching the published-manifestsmpidx <bytes>path (#3540, #3626).Changes
src/startup_stubs/d3d12_compute_dispatch.inl:tr.sampler_heap_bytes = 0inrefuse_nativeso a failed native translation cannot leave a stale span before a fallback manifest read.ComputeViewKind::heap_samplerbinding before sorting and validating SRV/UAV registers, enforcing the same span invariants asformat_compute_runtime_manifestand the manifest reader (compute_sampler_heap, register 0, array count 1, nonzero multiple of 16 bytes, <=16 * 2047) and storing it intr.sampler_heap_bytes.tests/startup_compute_sampler_heap_check.pyandtests/cmake/startup_compute_sampler_heap.cmake:nativemode (X2W_NATIVE_SHADERS,X2W_NATIVE_SHADERS_ONLY=1, no published.cs.csoor<key>.txt) registered asstartup_compute_dispatch_sampler_heap_native_{warp,hardware}.tests/standin_exports_check.py:x2w_d3d12_compute_censusinsrc/startup_stubs/d3d12_compute_dispatch.inlfrom the source file instead of hardcoding:1744, keeping the exactpath:lineassertion without breaking on edits tod3d12_compute_dispatch.inl.Verification
9e5a0947(based onmain158ef794)10.0.26300.9974), MSVC19.44.35230, Windows SDK / DXC10.0.26100.0, NVIDIA GeForce RTX 5080 (10de:2c02, driver32.0.16.2140), Microsoft Basic Render Driver (10.0.26100.9818), D3D12 debug layer enabled (no error messages).Commands and results
dev(Debug):startup_compute_dispatch_sampler_heap_warp: Skipped (77) —adapter has no 32-lane waves(manifest and 6 reader refusals verified)startup_compute_dispatch_sampler_heap_hardware: Passed (6.28 s, RTX 5080, debug layer clean)startup_compute_dispatch_sampler_heap_native_warp: Skipped (77) —the adapter has no 32-lane wavesstartup_compute_dispatch_sampler_heap_native_hardware: Passed (4.63 s, RTX 5080, debug layer clean)release(/O2):startup_compute_dispatch_sampler_heap_warp: Skipped (77) —adapter has no 32-lane wavesstartup_compute_dispatch_sampler_heap_hardware: Passed (6.28 s, RTX 5080, debug layer clean)startup_compute_dispatch_sampler_heap_native_warp: Skipped (77) —the adapter has no 32-lane wavesstartup_compute_dispatch_sampler_heap_native_hardware: Passed (4.77 s, RTX 5080, debug layer clean)Fail-first / mutation control
Reverting the
d3d12_compute_dispatch.inlhunk and rebuildingd3d12_xs_shimfailsstartup_compute_dispatch_sampler_heap_native_hardware(exit 8) with:Pure-Python checks
standin_exports: 470 cases, 6/6 mutations killed PASSdocs_links_check.py:Self-test passed. Checked 225 Markdown files and 874 links.bidi_controls_check.py:Self-test passed. Checked 2877 tracked source, script and build/CI files: no bidirectional controls.Scope note
This verifies source-built gfx1013 compute fixtures through the stand-in D3D12 runtime on the RTX 5080 and WARP; it does not establish full-title startup or frame rate.
AI-assisted.