runtime: bind root_buffer_srv in native compute #3780
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3780"
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?
Imported from R0Y00/Xbox2Windows. Originally posted by R0D4X on 2026-12-01T19:37:37Z.
Refs #3224, #2935
Summary
Binds
ComputeViewKind::root_buffer_srvon the in-process native compute translation route (translate_compute_natively), matchingformat_compute_runtime_manifest(srv <i> buf root <param>) and the published-manifest Dispatch path.Changes
src/startup_stubs/d3d12_compute_dispatch.inl:ComputeViewKind::root_buffer_srvintranslate_compute_nativelyunder the same predicate asformat_compute_runtime_manifest(byte_offset == 0,!requires_identity_dst_sel, notdeclared_cbvorreflected_cbv,array_count == 1), settingslot.root = true. Root CBV bindings stay refused.tests/startup_compute_root_srv_native_check.pyandtests/cmake/startup_compute_root_srv_native.cmake:nativelive-in-process mode (X2W_NATIVE_SHADERS,X2W_NATIVE_SHADERS_ONLY=1, no published.cs.csoor<key>.txt) registered asstartup_compute_root_srv_live_native_{warp,hardware}.view kind 10 is not bound for a natively translated program), and native refusal of an unaligned byte-16 table entry (unaligned descriptor table entry).tests/standin_exports_check.py:x2w_d3d12_compute_censusinsrc/startup_stubs/d3d12_compute_dispatch.inlfrom the source file instead of hardcoding:1744.Verification
7f7e0a3e(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_root_srv_native_controls: Passed (1.02 s)startup_compute_root_srv_native_warp: Skipped (77) —adapter has no 32-lane wavesstartup_compute_root_srv_native_hardware: Passed (2.56 s, RTX 5080, debug layer clean)startup_compute_root_srv_live_native_warp: Skipped (77) —the adapter has no 32-lane wavesstartup_compute_root_srv_live_native_hardware: Passed (2.24 s, RTX 5080, debug layer clean)release(/O2):startup_compute_root_srv_native_controls: Passed (1.01 s)startup_compute_root_srv_native_warp: Skipped (77) —adapter has no 32-lane wavesstartup_compute_root_srv_native_hardware: Passed (2.50 s, RTX 5080, debug layer clean)startup_compute_root_srv_live_native_warp: Skipped (77) —the adapter has no 32-lane wavesstartup_compute_root_srv_live_native_hardware: Passed (2.17 s, RTX 5080, debug layer clean)Fail-first / mutation control
Reverting the
d3d12_compute_dispatch.inlhunk and rebuildingd3d12_xs_shimfailsstartup_compute_root_srv_live_native_hardware(view kind 10 is not bound for a natively translated program).Pure-Python checks
startup_compute_root_srv_native_check.py:root SRV native controls (32-byte records manifest, root CBV variant, byte-16 layout) passedstandin_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.
Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-12-01T21:57:33Z.
Review: COMMENTED
Reviewed
7f7e0a3e8by reading the diff. The native binding atsrc/startup_stubs/d3d12_compute_dispatch.inl:620follows the published manifest's root SRV rules and uses the existing dispatch resolver. The live test attests/startup_compute_root_srv_native_check.py:278requires matching readback and also covers the declared CBV and invalid table layouts. I found nothing to change. I have not run the live-native test on an adapter, so that result remains to be confirmed.