Skip to content

cpp-migration: remaining work before the runtime can use the native shader compiler (tracking) #2935

Backlog

Description

@MasterDomino

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.

Done

In progress

Not yet filed

  • Mesh, slot 57. .m57 and .ps57 requests 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 _warp execution 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 gfx2hlsl and 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

  1. Leyukaka commented on Nov 26, 2026

    @Leyukaka
    Collaborator

    Filed #2936 for one instruction-coverage item: DPP16 quad_perm in the direct compute path (677 first refusals in a local census of 2,689 compute requests). I am taking it.

    AI-assisted.

  2. Leyukaka commented on Nov 26, 2026

    @Leyukaka
    Collaborator

    Filed #2940 for the next instruction-coverage item: v_readlane_b32 / v_writelane_b32 (SGPR spills) in the direct compute path, including vcc_lo as a lane-read destination. I am taking it.

    AI-assisted.

  3. Leyukaka commented on Nov 26, 2026

    @Leyukaka
    Collaborator

    Filed #2951 for the next instruction-coverage item: inline-integer, literal and SGPR-pair shifted values for v_lshrrev_b64 / v_lshlrev_b64 in the direct compute path. I am taking it.

    AI-assisted.

  4. Leyukaka commented on Nov 26, 2026

    @Leyukaka
    Collaborator

    Filed #2957 for the next instruction-coverage item: s_bfm_b64, s_cselect_b64 and s_not_b64 as 64-bit values in the direct compute path. I am taking it.

    AI-assisted.

  5. legacy-code-archaeologist commented on Nov 26, 2026

    @legacy-code-archaeologist
    Contributor

    Status note for the Helper scripts item: load_compute_request on cpp-migration now takes pipeline_type (tools/startup/gfx2hlsl.py:10991, from #2941, merged as a990f323), so the compile_lds_request.py:169 call matches its signature again. The script does not exist on main. I have not run its main() against a real request.

    AI-assisted.

  6. Leyukaka commented on Nov 26, 2026

    @Leyukaka
    Collaborator

    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.

  7. Leyukaka commented on Nov 26, 2026

    @Leyukaka
    Collaborator

    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.

  8. legacy-code-archaeologist commented on Nov 26, 2026

    @legacy-code-archaeologist
    Contributor

    Filed #2962 for the global loads part of the instruction-coverage item: global_load_dword in the saddr form through a root SRV address in the direct compute path, following gfx2hlsl.py op_global_load_dword. I am taking it; a PR against cpp-migration follows.

    AI-assisted.

  9. legacy-code-archaeologist commented on Nov 27, 2026

    @legacy-code-archaeologist
    Contributor

    Filed #2969 for one of the image ops in the instruction-coverage item: image_gather4_c_lz as DXIL textureGatherCmp in the direct image path. I am taking it.

    AI-assisted.

  10. Leyukaka commented on Nov 27, 2026

    @Leyukaka
    Collaborator

    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.

  11. R0Y00 commented on Nov 27, 2026

    @R0Y00
    Owner

    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.

  12. stan495 commented on Nov 27, 2026

    @stan495
    Contributor

    Filed #2983 for the Tooling item (.fail diagnostic files and read-only --refusals summary in compile_dxil, plus triage_run.py classification). I am taking it.

  13. legacy-code-archaeologist commented on Nov 27, 2026

    @legacy-code-archaeologist
    Contributor

    Filed #2985 for three integer-ALU items: v_alignbit_b32, v_alignbyte_b32 and v_bfm_b32 in the direct compute path. I found them with a per-opcode probe of the VOP3 names in gfx1013_isa_tables.inl: 79 names are refused on 05438d65, and these three have a gfx2hlsl.py lowering and no issue or PR. I am taking them.

    AI-assisted.

  14. stan495 commented on Nov 27, 2026

    @stan495
    Contributor

    Filed #2988 for the Tooling --watch item (compile_dxil --watch for live startup graphics and slot-67 compute requests). I am taking it.

  15. legacy-code-archaeologist commented on Nov 27, 2026

    @legacy-code-archaeologist
    Contributor

    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.

  16. 111 remaining items

  17. mumba17 commented on Nov 30, 2026

    @mumba17
    Contributor

    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. In run.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 at raw graphics requires its captured pixel entry once the catalog was indexed.

    In a native run (run_preset.py --set translate=false) on main 077bff3a (RTX 3090, 600 s, fresh cache):

    Graphics requests Count
    published 6
    raw slot 57 pairs, with .ps57in written 4
    stream containers 2
    refused after --index-graphics-interfaces 0

    The stream pairs use the standard ADDR = 2 layout, so direct_compute_cache.cpp derives 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 .psin producer. Neither is needed.)

  18. added 3 commits that reference this issue on Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: P0

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions