Repository navigation
Description
Target branch cpp-migration. Part of #2935 (follow-up to #2934/#2958). I am taking this; please say if you already have it locally and I will drop it.
Observation. I ran a local start-up capture on cpp-migration b260984f with run.ps1 -NativeShaders and kept the Python translator as the fallback. The title then does not get past its first screen. On main plus #2902, the same inputs get past it. One per-frame compute pipeline accounts for the difference: it was dispatched 17,408 times in that run and never translated. Its views are two table buffers, a 2D texture SRV and a 3D float texture UAV:
srv 0 buf table 1 96
srv 1 buf table 1 64
srv 2 tex2d table 1 0
uav 0 tex3d float table 1 32 channels 4
- The C++ compiler compiles it (
compile_dxilproduces the DXIL), but three things stop it from reaching a Dispatch. I checked them at2b678fd3:translate_compute_nativelybinds onlyraw_vector_srvandraw_buffer_uav. It refuses this program with "view kind 0 is not bound for a natively translated program".format_compute_runtime_manifestaccepts atexture_uavonly with image dimension 1 (2D) or 5 (2D array), socompile_dxilwrites no manifest for it.- The stand-in's manifest reader has no
tex3d/tex1dUAV line, and Dispatch refuses any output view that is notTEXTURE2D/TEXTURE2DARRAY.
- On
main, the runtime half of startup: lower compute image_store to 1D and 3D texture UAVs (Part of #2022) #2902 adds 3D and 1D UAV binding: the manifest line, the view dimension, and mip and W range checks (also in slot 19,d3d12_xs_device.cpp).cpp-migrationdoes not have it.
Plan, best as two pull requests:
- Port the runtime half of startup: lower compute image_store to 1D and 3D texture UAVs (Part of #2022) #2902 to
cpp-migration, with itsstartup_stream_consumer.cppmodes (volume, line, bad W, bad mip). The runtime hunks are taken unchanged from startup: lower compute image_store to 1D and 3D texture UAVs (Part of #2022) #2902, which is open onmain, so a later merge ofmainis a no-op there. If you would rather wait for startup: lower compute image_store to 1D and 3D texture UAVs (Part of #2022) #2902 to merge and reachcpp-migration, say so and I will do only steps 2 and 3. - For the offline route,
format_compute_runtime_manifestwrites the 3D and 1Dtexture_uavlines that the reader then accepts. - Extend the runtime: translate slot 67 compute requests in the stand-in #2958 route in
translate_compute_nativelyto fill the sameComputeTranslationslots the manifest reader fills, without usingNativeRecording/NativeDispatchStates:buffer_srvmaps to the samebuf tableslot thatformat_compute_runtime_manifestalready writes for it;- also
texture_srv(2D) andtexture_uav(2D, 2D array, 3D, 1D); - the bindings' kind and image dimension decide the slot, with the same register-order and array-count checks;
- samplers and the other kinds stay refused.
Tests:
- The 3D and 1D cases are driven by the native route or by a hand-written manifest, since the Python half of startup: lower compute image_store to 1D and 3D texture UAVs (Part of #2022) #2902 is not on this branch.
- Extend
startup_compute_dispatch_native_check.pywith a source-built program that reads a table buffer and a 2D texture and stores to a 3D UAV, compared with a CPU reference. - A manifest round trip for the 3D UAV line.
- Controls: a 3D W range outside the mip, and a view kind that stays unbound.
Measurement: the same start-up run before and after, with dispatch and translation counts for that pipeline and whether the title gets past its first screen.
AI-assisted.
Activity
Leyukaka commentedon Nov 27, 2026
Correction to the observation above. (All the runs below also carried #2862, merged locally.)
I wrote that on
mainplus #2902 "the same inputs" get past the first screen. They were not the same inputs.cpp-migrationwith the per-frame pipeline compiled bycompile_dxil. The other was oncpp-migrationplus startup: lower compute image_store to 1D and 3D texture UAVs (Part of #2022) #2902 with the Python translator only and no C++ translation. Both stay on the first screen in the same way: no input before the script starts, and the same three compute pipelines dispatched for the whole run (the earlier run dispatched 952).What still holds:
cpp-migrationb260984fwithout these bindings.compile_dxil, it is translated and dispatched. In the later run it was dispatched about 17,400 times, all translated.Parts 1 and 2 are unchanged in scope. I have updated the matching sentence in #2975.
AI-assisted.
runtime: bind 3D and 1D texture UAVs and write them in the C++ comput…
Reuse texture fixtures and report native compute capability limits
sydney-0o commentedon Nov 27, 2026
PR #3049 combines the remaining native compute binding work from #2975 and #2993 on
main, which already contains #2902. The native offline manifest and first-Dispatch fixtures both passed on a GTX 1080 Ti (driver32.0.15.8278, Windows build 19045, app-local Agility SDK 1.620.2). The separate startup before/after measurement remains open.