Repository navigation
Description
Target branch cpp-migration, at 999e17cd (updated 2026-11-27; first written at e97c5c7c). This tracks what still separates the native C++ shader compiler from replacing tools/startup/gfx2hlsl.py in the startup runtime, and so from merging cpp-migration into main.
The list started from a source-reading review of cpp-migration against main (at 7f951fd3, nothing built or run). Each item says whether it was checked on the branch or is still from reading only. Please open a focused issue per item before working on it, and link it here.
Status today
On 999e17cd the runtime can use the native compiler for compute, opt-in only. Default runs still translate through gfx2hlsl.py.
- Runtime, compute:
X2W_NATIVE_SHADERS=<DXC directory>(run.ps1 -NativeShaders) translates slot 67 compute requests in the stand-in at their first Dispatch (runtime: translate slot 67 compute requests in the stand-in #2958). It bindsraw_vector_srvandraw_buffer_uavonly. Requests it refuses fall back to thegfx2hlsl.pypath. Checked in a start-up run. - Runtime, graphics: no native path yet. runtime: compile a supported graphics pair on first use in the stand-in #2981 is in review for cpp-migration: compile a VS/PS pair on first draw through the ordinary graphics runtime #2978.
- Offline:
compile_dxil --requestsreads the runtime's revision-28 requests and publishes<key>.txtwith<key>.{vs,ps,cs}.cso, which the runtime loads (compile_dxil: read shader requests at revision 28 #2939, shader: consume startup requests and publish runtime cache entries in compile_dxil #2955).- It writes
<key>.failon refusal (tooling: write .fail diagnostics and add read-only --refusals summary to compile_dxil #2984) and resolves RTV variants (shader: resolve and cache RTV variant requests in compile_dxil --requests #2989). compile_dxil --watchfollows a live request directory (tooling: add --watch mode to compile_dxil for live startup shader requests #2992, tooling: support .rtv variant requests in compile_dxil --watch and --refusals #3003).compile_dxil --refusalsgives a read-only first-refusal census (tooling: write .fail diagnostics and add read-only --refusals summary to compile_dxil #2984, tooling: support .rtv variant requests in compile_dxil --watch and --refusals #3003).
- Coverage on one local start-up capture (counts only,
compile_dxil --requests):- Compute: 418 of 2,747 requests compile with this round's instruction PRs, up from 415 at
4ff5e36d. - Graphics: 3 of 628
req_*.arequests compile at4ff5e36d. --refusalsat4ff5e36dlists 56 distinct first-refusal reasons for compute.
- Compute: 418 of 2,747 requests compile with this round's instruction PRs, up from 415 at
- Tests: the native, compute-dispatch and stream-draw families give 94 tests on an RX 9070 XT plus WARP, with 90 passed and 4 WARP capability skips (wave32).
Done
- shader: make compile_dxil consume startup requests and publish runtime cache entries #2933:
compile_dxilreads the runtime's requests and publishes cache entries the runtime loads (compile_dxil: read shader requests at revision 28 #2939, shader: consume startup requests and publish runtime cache entries in compile_dxil #2955). - startup: run native shader compilation and compute dispatch through the runtime #2934: native compute compilation and dispatch through the runtime entry point (runtime: translate slot 67 compute requests in the stand-in #2958, opt-in).
- Tooling:
.failfiles thattriage_run.pyclassifies,--refusals(cpp-migration: write .fail diagnostics and add read-only --refusals summary to compile_dxil #2983 → tooling: write .fail diagnostics and add read-only --refusals summary to compile_dxil #2984),--watch(cpp-migration: add --watch mode to compile_dxil for live startup shader requests #2988 → tooling: add --watch mode to compile_dxil for live startup shader requests #2992), and.rtvin both (cpp-migration: support .rtv variant requests in compile_dxil --watch and --refusals #3001 → tooling: support .rtv variant requests in compile_dxil --watch and --refusals #3003). Still missing: a native equivalent ofshader_cache_rekey.py. - Helper scripts:
compile_lds_request.pyruns again (shader: restore compilation of LDS replay requests #2941; cpp-migration: fix compile_lds_request.py's call to gfx2hlsl.load_compute_request #2944 closed). - CI: pull requests into
cpp-migrationget CI since ci: check native DXIL generation on cpp-migration pull requests #2942. It runsnative_dxil_llvm_ident_controlson this branch, but it still excludes_hardware, where most direct-DXIL execution tests are. - shader: preserve per-lane VCC across a vertex-stage control-flow join #2906 (shader: draw a per-vertex VCC across a vertex-stage join (Refs #2906) #2914), shader: verify cross-quad WQM and EXECZ in a native pixel draw #2907 (shader: vote a quad-complete EXEC for WQM EXECZ branches in native pixel draws #2946), shader: capture and replay view types for GPU-selected global SRV slots #2908 (native: capture and replay view types for GPU-selected global SRV slots #2972), shader: lower v_pack_b32_f16 in the direct C++ DXIL path #2909 (shader: lower v_pack_b32_f16 in the direct C++ DXIL path #2917), cpp-migration 40365770: native _hardware tests crash (0xC0000005) on an RX 9070 XT; wave_request expects a different refusal message #2915 (tests: expect the decoder's refusal for the invalid word in native_wave_request #2928, shader: emit !llvm.ident in direct DXIL modules for AMD PSO creation #2932).
- Instruction coverage, landed so far:
- DPP16
quad_perm(shader: lower DPP16 quad_perm in the direct C++ compute path #2937); v_readlane/v_writelane(shader: lower v_readlane_b32 and v_writelane_b32 in the direct C++ compute path #2950);- 64-bit shift operands (shader: accept inline, literal and SGPR-pair values in direct C++ 64-bit shifts #2952);
s_bfm_b64/s_cselect_b64/s_not_b64(shader: lower s_bfm_b64, s_cselect_b64 and s_not_b64 in the direct C++ compute path #2959);- binary16 add/sub/subrev/mul and their SDWA forms (shader: lower binary16 add, sub, subrev and mul in direct compute #2964, shader: lower the SDWA forms of binary16 add, sub, subrev and mul in direct compute #2973);
- root-pointer
global_load_dword(shader: lower root-pointer global_load_dword in the direct C++ compute path #2966); - byte-window buffer stores (shader: accept byte-window buffer descriptors for stores in the direct C++ compute path #2967);
image_gather4_c_lz(shader: lower image_gather4_c_lz in the direct C++ image path #2971);- the SAD operations (shader: lower the SAD operations in the direct C++ compute path #2990);
v_ashrrev_i64/v_mad_i32_i24(shader: lower v_ashrrev_i64 and v_mad_i32_i24 in the direct C++ compute path #2994);v_alignbit/v_alignbyte/v_bfm_b32(shader: lower v_alignbit_b32, v_alignbyte_b32 and v_bfm_b32 in the direct C++ compute path #2986);- the saturating 16-bit packs (shader: lower v_cvt_pk_u16_u32 and v_cvt_pk_i16_i32 in the direct C++ compute path #2996);
v_cvt_pk_u8_f32(shader: lower v_cvt_pk_u8_f32 in the direct C++ compute path #2998).
- DPP16
In progress
-
Graphics through the runtime:
- cpp-migration: compile a VS/PS pair on first draw through the ordinary graphics runtime #2978 (one fixed target format), with runtime: compile a supported graphics pair on first use in the stand-in #2981 in review. The open review finding there is that a late native failure must not bypass a valid on-disk entry.
- cpp-migration: resolve and cache graphics RTV variant requests in the native offline compiler #2980 (RTV variants): offline resolution and caching have landed (shader: resolve and cache RTV variant requests in compile_dxil --requests #2989, tooling: support .rtv variant requests in compile_dxil --watch and --refusals #3003), and the e2e draws the variants through the stand-in. The issue is still open for its author to close.
-
Compute bindings on the native routes:
- cpp-migration: bind table buffers, 2D texture SRVs and 3D/1D texture UAVs for natively translated compute #2974 Part 1 (runtime: bind 3D and 1D texture UAVs and write them in the C++ compute manifest #2975): 3D/1D texture UAVs in the stand-in and the C++ manifest. It is approved but held: in title runs with natively published manifests, loading its 3D/1D translations coincides with a start-up stall (see the PR).
- cpp-migration: bind table buffers, 2D texture SRVs and 3D/1D texture UAVs for natively translated compute #2974 Part 2 (runtime: bind table buffers, 2D texture inputs and texture outputs on the in-process compute route #2993): table buffers, 2D texture inputs and texture outputs on the in-process route. It builds on runtime: bind 3D and 1D texture UAVs and write them in the C++ compute manifest #2975.
-
Wave size of slot 67 requests: shader: read the wave size of slot 67 compute requests (bit 20 of .sa dword 4) instead of assuming wave32 #2999 (shader: read the wave size of slot 67 compute requests from .sa #3006). Every
.c67request is compiled as wave32 today. In the capture, bit 20 of.sadword 4 splits the requests the way a wave size would. -
Instruction coverage, open:
v_mad_u64_u32/v_mad_i64_i32: cpp-migration: lower v_mad_u64_u32 and v_mad_i64_i32 in the direct C++ compute path #3000 (shader: lower v_mad_u64_u32 and v_mad_i64_i32 in the direct C++ compute path #3004);- unfused f32 multiply-adds: cpp-migration: lower v_mad_f32, v_mad_legacy_f32, v_mac_f32 and v_mac_legacy_f32 in the direct C++ compute path #3005 (shader: lower unfused f32 multiply-adds in the direct compute path #3007);
- DPP16 row shifts and rotates: cpp-migration: lower DPP16 row_shl, row_shr and row_ror in the direct C++ compute path #3008;
v_add_nc_i32/v_sub_nc_i32and clamped add/sub: cpp-migration: lower v_add_nc_i32, v_sub_nc_i32 and clamped 32-bit add/sub in the direct compute path #3009.
The VOP3 probe on cpp-migration: lower v_alignbit_b32, v_alignbyte_b32 and v_bfm_b32 in the direct C++ compute path #2985 counted 79 refused names at
05438d65, before this round. Until coverage is close, the runtime needs its per-pipeline fallback togfx2hlsl.py, and runtime: translate slot 67 compute requests in the stand-in #2958 keeps that fallback.
Not yet filed
- Mesh, slot 57.
.m57and.ps57requests have no native path. From reading. - Raw graphics stages. A raw stage with a branch, an EXEC write or interpolation is refused without container metadata or a pixel-entry record (
src/gfx1013_compute_native.cpp), and nothing on the branch produces either. From reading. - WARP. Native modules are SM 6.6 with wave size 32 (
src/dxil_module.h). WARP reports 4-lane waves, so the native_warpexecution tests skip, and the in-process route refuses on WARP (runtime: translate slot 67 compute requests in the stand-in #2958). The CI-built GPU check requires the Python compute cases to pass on WARP (package-gpu-check.ps1). Checked. - Samplers. Only constant sampler words are accepted, and there is no sampler-heap path. The in-process compute route refuses any sampler. From reading.
-
shader_cache_rekey.py. It has no native equivalent (see Tooling above). - Python-only tests. The review counted 171 test files that import
gfx2hlsland run on Linux and macOS, while the native tests need Windows with DXC. - Integration. R0Y00 on this issue: keep the fallback-disabled compute and graphics corpus runs and the original runtime acceptance together for integration after the component work lands.
AI-assisted. "Checked" means verified on the branch; "from reading" means taken from the source-reading review and not yet verified.
Activity
Leyukaka commentedon Nov 26, 2026
Filed #2936 for one instruction-coverage item: DPP16
quad_permin the direct compute path (677 first refusals in a local census of 2,689 compute requests). I am taking it.AI-assisted.
Leyukaka commentedon Nov 26, 2026
Filed #2940 for the next instruction-coverage item:
v_readlane_b32/v_writelane_b32(SGPR spills) in the direct compute path, includingvcc_loas a lane-read destination. I am taking it.AI-assisted.
Leyukaka commentedon Nov 26, 2026
Filed #2951 for the next instruction-coverage item: inline-integer, literal and SGPR-pair shifted values for
v_lshrrev_b64/v_lshlrev_b64in the direct compute path. I am taking it.AI-assisted.
Leyukaka commentedon Nov 26, 2026
Filed #2957 for the next instruction-coverage item:
s_bfm_b64,s_cselect_b64ands_not_b64as 64-bit values in the direct compute path. I am taking it.AI-assisted.
legacy-code-archaeologist commentedon Nov 26, 2026
Status note for the Helper scripts item:
load_compute_requestoncpp-migrationnow takespipeline_type(tools/startup/gfx2hlsl.py:10991, from #2941, merged asa990f323), so thecompile_lds_request.py:169call matches its signature again. The script does not exist onmain. I have not run itsmain()against a real request.AI-assisted.
Leyukaka commentedon Nov 26, 2026
Filed #2963 for the SDWA forms of binary16 add, sub and mul in the direct compute path. It builds on the plain forms in #2945. I am taking it.
AI-assisted.
Leyukaka commentedon Nov 26, 2026
Filed #2965 for the next instruction-coverage item: buffer stores through a byte-window descriptor (stride cleared, NUM_RECORDS scaled, OOB_SELECT 3) in the direct compute path. I am taking it.
AI-assisted.
legacy-code-archaeologist commentedon Nov 26, 2026
Filed #2962 for the global loads part of the instruction-coverage item:
global_load_dwordin thesaddrform through a root SRV address in the direct compute path, followinggfx2hlsl.pyop_global_load_dword. I am taking it; a PR againstcpp-migrationfollows.AI-assisted.
legacy-code-archaeologist commentedon Nov 27, 2026
Filed #2969 for one of the image ops in the instruction-coverage item:
image_gather4_c_lzas DXILtextureGatherCmpin the direct image path. I am taking it.AI-assisted.
Leyukaka commentedon Nov 27, 2026
Filed #2974 for the runtime side of the native route: 3D/1D texture UAVs (the runtime half of #2902) and the table-buffer and 2D-texture views a natively translated compute program needs, so a per-frame pipeline that the C++ compiler already compiles can reach a Dispatch. I am taking it.
AI-assisted.
R0Y00 commentedon Nov 27, 2026
Graphics work now has two independently claimable slices. #2978 covers the first ordinary native draw with a fixed target format. #2980 covers offline RTV variant resolution, cache identity and format-specific readback. Both target cpp-migration. Keep the fallback-disabled compute and graphics corpus runs and the original runtime acceptance together for integration after the component work lands.
stan495 commentedon Nov 27, 2026
Filed #2983 for the Tooling item (
.faildiagnostic files and read-only--refusalssummary incompile_dxil, plustriage_run.pyclassification). I am taking it.legacy-code-archaeologist commentedon Nov 27, 2026
Filed #2985 for three integer-ALU items:
v_alignbit_b32,v_alignbyte_b32andv_bfm_b32in the direct compute path. I found them with a per-opcode probe of the VOP3 names ingfx1013_isa_tables.inl: 79 names are refused on05438d65, and these three have agfx2hlsl.pylowering and no issue or PR. I am taking them.AI-assisted.
stan495 commentedon Nov 27, 2026
Filed #2988 for the Tooling
--watchitem (compile_dxil --watchfor live startup graphics and slot-67 compute requests). I am taking it.legacy-code-archaeologist commentedon Nov 27, 2026
Filed #2987 for the five sum-of-absolute-differences operations (
v_sad_u8,v_sad_hi_u8,v_sad_u16,v_sad_u32,v_msad_u8) in the direct compute path, from the same VOP3 probe as #2985. I am taking it.AI-assisted.
111 remaining items
mumba17 commentedon Nov 30, 2026
Withdrawn: there is no gap here. I measured it before anyone acted on it.
My numbers came from a request cache built by runs that used the shared preset's
-Translate. Inrun.ps1, that selects the Python watcher instead of native shaders, and that path never writes.ps57in. Of the 1,971 graphics requests in that cache, 1,915 are raw slot 57 pairs, so 1,053 of them stopped atraw graphics requires its captured pixel entryonce the catalog was indexed.In a native run (
run_preset.py --set translate=false) onmain077bff3a(RTX 3090, 600 s, fresh cache):.ps57inwritten--index-graphics-interfacesThe stream pairs use the standard ADDR = 2 layout, so
direct_compute_cache.cppderives the record itself. For anyone reading a refusal census: count only caches from native runs, or the pixel-entry class is inflated.(This comment first claimed, then asked about, a runtime
.psinproducer. Neither is needed.)compute: classify remaining scalar ops in direct SCC liveness (#3609)
shader: fix binary64 class NaN classification and three fixture bugs
compute: publish root_buffer_srv compute runtime manifests
shader: fix cmp-f64 ir store wraparound and wave64 cmpx stores
shader: fix cmp-f64 wave64 ir container descriptor layout
shader: lower v_frexp_exp_i32_f64 and v_frexp_mant_f64 in direct compute
shader: lower binary64 comparisons and class tests in direct compute
shader: lower v_ceil_f64, v_floor_f64, v_trunc_f64 and v_rndne_f64 in…
shader: support partial final waves in native compute
runtime: bind native compute root buffer UAVs
compute: bind fixed UAV strides for descriptor SCC
Merge pull request #3808 from timbot103/shader/compute-partial-final-…
Merge pull request #3811 from timbot103/runtime/compute-root-buffer-uav
Merge pull request #3809 from timbot103/shader/compute-descriptor-scc