Skip to content

direct compute: untranslated compute shaders of a start-up run ranked by dispatches, with first refusals on main #3224

Backlog

Description

@Leyukaka

Part of #2935. A ranking of the compute shaders that had no translation in a start-up run, by how often the title dispatched them, with each one's first refusal on current main. The goal is to pick the next direct-compute work by impact. Contributions welcome: please claim a family in a comment so we do not overlap.

Run. One local start-up run of the title on the Series S profile, about 10 minutes, built from main c45bf9ab plus a local diagnostic patch (miss logging and an optional solid fill for untranslated draws; translator and compute dispatch path unchanged). It got past the loading artwork into the first 3D scene. That scene renders white: 72 graphics pipelines were translated and 490 were missing. Counts and instruction shape only below. No shader keys or title data.

Method. The dispatch counts come from the runtime's own compute census key ...: N dispatches, 0 translated, first refusal: no translation lines (last value per key). 882 compute shaders were dispatched with no translation, 13,403,432 dispatches in total. I copied their requests from that run's shader cache and ran compile_dxil --jobs 8 gfx1013-direct-cs@36 --requests from main 14d56502 on them. The wave size is bit 20 of .sa dword 4 (#2999).

By first refusal on main 14d56502:

First refusal on main Shaders wave32 Dispatches Share
direct resource-heap load requires the selected GPU slot and its view type 322 316 4,299,928 32.1%
direct descriptor address outside bound table 82 48 3,016,736 22.5%
unbound numeric SGPR sN 156 24 2,545,711 19.0%
compiles on main 110 36 1,601,006 11.9%
unimplemented direct SDWA operand profile 4 0 524,763 3.9%
numeric SCC from a symbolic descriptor field 3 1 323,795 2.4%
direct DXIL lowering for s_or_saveexec_b32 55 55 265,486 2.0%
direct image opcode or descriptor modifiers 54 29 233,735 1.7%
26 other first refusals 96 592,272 4.4%

So 110 of them (11.9% of the dispatches) already compile on current main. Three families account for 73.6%.

Top 20 shaders:

Rank Dispatches Share Wave First refusal on main 14d56502
1 934,961 7.0% wave32 direct resource-heap load requires the selected GPU slot and its view type
2 592,591 4.4% wave64 unbound numeric SGPR s11
3 478,592 3.6% wave64 unimplemented direct SDWA operand profile
4 388,856 2.9% wave64 compiles on main
5 329,032 2.5% wave64 unbound numeric SGPR s29
6 329,032 2.5% wave64 unbound numeric SGPR s29
7 329,032 2.5% wave64 compiles on main
8 302,306 2.3% wave64 numeric SCC from a symbolic descriptor field
9 252,852 1.9% wave32 unbound numeric SGPR s10
10 231,683 1.7% wave64 direct descriptor address outside bound table
11 225,647 1.7% wave64 direct descriptor address outside bound table
12 183,789 1.4% wave32 direct descriptor address outside bound table
13 176,407 1.3% wave32 direct resource-heap load requires the selected GPU slot and its view type
14 161,202 1.2% wave64 compiles on main
15 160,185 1.2% wave32 direct resource-heap load requires the selected GPU slot and its view type
16 159,402 1.2% wave32 direct resource-heap load requires the selected GPU slot and its view type
17 151,433 1.1% wave64 direct descriptor address outside bound table
18 149,560 1.1% wave64 unbound numeric SGPR s29
19 147,258 1.1% wave32 direct descriptor address outside bound table
20 126,171 0.9% wave32 direct descriptor address outside bound table

The top 10 account for 31.1% of the dispatches and the top 20 for 43.3%.

Dispatches the runtime refused at binding time. These are compute shaders that do have a translation. The census gives these first refusals:

Runtime refusal (compute census) Shaders Dispatches
an output is not an aliased placed buffer range with unordered access 25 1,861,476
an input is in a placed buffer that does not alias title memory 53 920,176
an input buffer view token's resource does not hold its range 3 476,733
an input view token is not a buffer view of a desktop resource 6 346,160
5 other runtime refusals 11 61,219

Related work I found:

I have not checked whether #3063 or #3221 clear any of these. They are third-party branches, and I did not build them.

AI-assisted.

Activity

  1. RonLogic commented on Nov 27, 2026

    @RonLogic
    Contributor

    I’ll investigate the numeric SCC from a symbolic descriptor field family on main. I’ll start with an original fixture that observes SCC after extracting a buffer stride and after s_max_u32. The goal is to recover the status from validated descriptor metadata while keeping descriptor provenance symbolic and preserving refusals for fields the runtime cannot supply. If you can share the opcode and masked field for the rank-8 refusal, just the instruction shape would help target the first slice.

  2. Not-Saii commented on Nov 27, 2026

    @Not-Saii
    Contributor

    I'll take the largest runtime refusal in the second table: an output is not an aliased placed buffer range with unordered access (25 shaders, 1,861,476 dispatches). These shaders already have a translation, so this is runtime work in src/startup_stubs/d3d12_compute_dispatch.inl (the output branch of the binding loop) and doesn't overlap the translator families claimed above.

    That one message covers five different conditions. The code comment there already names two of them as a known shortcut: view tokens and copied placements.

    1. The output words are a view token.
    2. No placed buffer aliases the address (a copied placement or no placement).
    3. The resource's initial state is not COMMON.
    4. The offset is not 16-byte aligned.
    5. The resource has no ALLOW_UNORDERED_ACCESS flag.

    Plan.

    1. Split the message into one reason per condition, with no change in what is accepted, and add a source-built fixture that triggers each reason.
    2. Measure which reasons these 25 shaders hit in a local start-up run (counts only).
    3. Lower the dominant case in its own PR with a GPU readback test and a negative control. Cases that stay refused keep their own named reasons.

    @Leyukaka, if your census already logs the descriptor words or the placement kind for these outputs, a breakdown by condition would let me skip step 2.

    Environment: Windows 11 build 26300, NVIDIA GeForce RTX 4090 (driver 32.0.16.1088), Windows SDK 10.0.26100, plus WARP.

    AI-assisted.

  3. R0Y00 commented on Nov 27, 2026

    @R0Y00
    Owner

    Two existing paths to reuse before opening another implementation PR:

    For direct descriptor address outside bound table, #3221's fixture covers a single enabled heap whose SGPR count matches exactly. Grouping that bucket by root flags and remaining user SGPRs would tell us which requests it can address. The counts here were measured with the 14d56502 compiler, so please include the compiler commit in reruns.

  4. Not-Saii commented on Nov 27, 2026

    @Not-Saii
    Contributor

    I'll also take the unbound numeric SGPR sN family (156 shaders, 2,545,711 dispatches, 132 of them wave64). The refusal comes from require_numeric in src/gfx1013_compute_native.cpp: the program reads a scalar register that holds no known numeric value at that point.

    Plan.

    1. A counts-only census at current main (c7215add, compiler commit stated with every number). It looks at these requests in a local start-up capture and groups them by refused register, by the instruction that reads it, by how that register was last written, by the entry layout (user SGPR count, the TGID/TG_SIZE enables from the request's RSRC2 word) and by wave size. I'll post the grouping here with instruction shapes only.
    2. Fix the dominant cause in its own PR with a source-built fixture, a GPU readback and a negative control. One example would be an entry register that the direct path doesn't bind. The other causes keep their refusal.

    The family is mostly wave64, so I'll check how it interacts with #2999 / #3006 (wave size from .sa) and coordinate rather than overlap. @Leyukaka, if you already know where the s11 and s29 reads come from, a pointer would help.

    Environment: Windows 11 build 26300, NVIDIA GeForce RTX 4090 (driver 32.0.16.1088), Windows SDK 10.0.26100, plus WARP.

    AI-assisted.

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

    @legacy-code-archaeologist
    Contributor

    I'll take the "unsupported packed binary16 arithmetic source" follow-on refusal (noted under Rank 3 after #3220) to accept inline binary16 float (240..248) and integer (128..208) constants in v_pk_add_f16, v_pk_mul_f16, v_pk_fma_f16, and v_pk_min_f16/v_pk_max_f16 on main.

    Plan:

    1. Share a packed_f16_inline_constant() helper between DirectCompute::packed_f16_alu() and DirectCompute::packed_minmax() in src/gfx1013_direct_compute.inl (preserving gfx1013's [31:16] = 0 encoding for 240..248 and 32-bit sign-extended encoding for 128..208).
    2. Add a source-built fixture (ir, controls, compute, pixel on WARP and hardware) covering all 9 inline f16 constants, op_sel_hi high-half zeroing, neg_lo/neg_hi, single-rounding FMA tie witnesses with inline 0.5, inline integer constants, and kept refusals (vcc, m0, exec, scc, 240..248 on integer min/max, clamp).

    AI-assisted.

  6. SimSalabimse commented on Nov 28, 2026

    @SimSalabimse
    Contributor

    I'm claiming the "numeric SCC from a symbolic descriptor field" family (3 shaders, about 2.4% of the dispatches, almost all of it from the rank 8 shader).

    The direct path raises that refusal after a byte-window descriptor rewrite, when it thinks a later instruction reads the SCC from that rewrite. The OOB selector already has a known SCC, s_mul_i32 doesn't write SCC, and the SOP1 false positives are already merged (#3189). The small follow-up I want to do: s_absdiff_i32, s_min_u32, s_min_i32 and s_max_i32 already write SCC in the direct lowering but are still treated as SCC readers. I'll classify them as writers, add a source-built compile case next to the existing ones, and keep the s_cselect case refused.

    I won't invent a numeric SCC for a field that can be zero. If rank 8 really branches or cselects on that SCC, it'll still stop there and I'll say so. This stands on its own, separate from the open wave-size (#3006) and s_or_saveexec (#3193) work.

    AI-Assisted

  7. RonLogic commented on Nov 28, 2026

    @RonLogic
    Contributor

    The first symbolic-descriptor SCC slice is in #3227, tested at e1b3f898 over main 7fcde81f. It covers live SCC from the 14-bit buffer SRV stride and from both operand orders of s_max_u32 with 1. The in-process and published paths both matched 12 groups for four descriptor strides on RTX 4070 and WARP 1.0.22, with the untouched output preserved. The clean base refuses this source-built fixture. Capture coverage for the rank-8 case still needs the instruction shape.

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

    @legacy-code-archaeologist
    Contributor

    Filed #3226 and opened #3230 targeting main to accept inline binary16 float (240..248, with [31:16] = 0 per gfx1013) and inline integer (128..208) constants in DirectCompute::packed_f16_alu() and DirectCompute::packed_minmax() (native_packed_f16_inline_ir, controls, pixel_warp, and pixel_hardware passed on Intel HD Graphics 530; compute_hardware skipped 77).

    AI-assisted.

  9. RonLogic commented on Nov 28, 2026

    @RonLogic
    Contributor

    @SimSalabimse your SCC-liveness classification work complements #3227. My fixture reads SCC immediately after the descriptor operations, so it exercises a genuinely live flag. Your subsequent scalar writers should avoid requesting stride metadata where the earlier flag is dead. I’ll keep #3227 scoped to the live flag cases.

  10. Leyukaka commented on Nov 28, 2026

    @Leyukaka
    CollaboratorAuthor

    @Not-Saii, on where the reads come from. Measured with the 14d56502 compiler on the 882 requests of this issue:

    On the output refusal, the census line carries the four descriptor words of the first refused call of each shader, which is enough to split the 25:

    • 23 shaders (1,840,666 dispatches) have the view-token marker in word 0, which is your condition 1 and the startup: bind compute outputs named by a buffer UAV view token #2961 path.
    • 2 shaders (20,810) have all four words zero, so the byte count is zero and no placed buffer is looked up. That is your condition 2.
    • None of them gets as far as the state, alignment or flag checks.

    Two notes from the #3006 side:

    AI-assisted.

  11. Not-Saii commented on Nov 28, 2026

    @Not-Saii
    Contributor

    First-refusal counts for an output is not an aliased placed buffer range with unordered access, measured with the split in #3229 in one local 300 s start-up run. Build 79edac55; the translator is at ad306425, and its gfx2hlsl.py is unchanged since 2e12dd8e. Counts only.

    The census keeps one reason per key, the first one that key was refused with, and counts all of its untranslated dispatches under it. These are first-refusal buckets, not counts per condition: a later dispatch of the same key can fail on another condition.

    First refusal of the key Keys Untranslated dispatches of those keys
    an output buffer descriptor is a view token 23 141,224
    an output buffer descriptor has zero records 2 2,015
    size, crossing, unplaced, copied placement, initial state, alignment, unordered-access flag 0 (no key had one of these first refusals) 0
    • In the first refused dispatch of each of the 23 keys, the token named a view created through device slot 19, the form startup: bind compute outputs named by a buffer UAV view token #2961 binds.
    • In that of each of the two zero-record keys, the descriptor was all zero.
    • No key had a copied placement, the initial state, alignment or the unordered-access flag as its first refusal, so I won't open a second implementation PR for those. runtime: name each refused condition of a compute output buffer #3229 stays as the diagnostic.
    • In a run of the parent build with the same settings, the same 25 keys had the old reason as their first refusal: 505,473 of 5,490,863 compute dispatches. This run made 1,490,517 compute dispatches in all, so the share in these buckets is about the same (9.2% and 9.6%).

    The compiler commit differs from the issue's 14d56502 counts.

    Edited after review on #3229: the table is labelled as first-refusal buckets, and the zero row is qualified.

    AI-assisted.

  12. Not-Saii commented on Nov 28, 2026

    @Not-Saii
    Contributor

    Follow-up to the counts above: the same 300 s start-up run with #2961 merged locally into #3229. The merge keeps #2961's token branch and drops reason 1 of the split, as #3229 describes. Build 51aef000 (local, not pushed); the translator is the same as before. Counts only, as first-refusal buckets like the table above.

    What happened to the 23 keys whose first refusal was an output buffer descriptor is a view token without #2961:

    With #2961 Keys Dispatches
    every dispatch translated, no refusal 12 32,043
    first refusal: an entry value reads the descriptor of an output named by a view token 10 9,372 untranslated
    first refusal: an output buffer view range is empty, unaligned or outside its resource 1 190,397 untranslated

    This run made 2,453,727 compute dispatches in all (1,490,517 without #2961), so dispatch counts are only comparable within one run.

    Edited after review on #3229: rows are labelled as first-refusal buckets.

    AI-assisted.

  13. Not-Saii commented on Nov 28, 2026

    @Not-Saii
    Contributor

    Census results for unbound numeric SGPR sN. Thanks @Leyukaka, your numbers reproduce on my side.

    Inputs.

    • One local start-up run: 300 s, runtime built from main 2e12dd8e.
    • 878 compute shaders were dispatched with no translation (5,490,804 dispatches). I copied their slot 67 requests out of that run's shader cache.
    • Compiler: main 7fcde81f, compile_dxil --jobs 8 gfx1013-direct-cs@36 --requests.
    • A local diagnostic patch adds the analysis symbol held in the refused register to the message. Behind a second switch, it applies shader: read the wave size of slot 67 compute requests from .sa #3006's wave-size rule: bit 20 of .sa dword 4 clear and more than 32 threads means wave64. Both are off by default, and the patch is not for a PR.
    • Dispatch counts are the last compute census value per key, so they are smaller than the issue's.

    On main: 156 shaders stop first at this refusal, 132 of them wave64. That is the issue's count. They account for 769,918 dispatches in this run.

    • In 115 of the 132 wave64 shaders, the refused register is the odd word of an SGPR pair. Before the read, a VOP3 compare (v_cmp_*_e64 sN-1, ...) writes only the even word, and the read is a 64-bit scalar ALU op on s[N-1:N]. Most are s_and_b64, s_nor_b64 or s_or_b64.
      • In 38 of them, the odd word still holds a symbol from an earlier s_load descriptor, so it is a stale descriptor field, not unbound.
      • The other 17 wave64 shaders read a 32-bit or even register. Mostly that is s_bfe_u32 on a descriptor word.
    • Neither the entry layout nor TGID/TG_SIZE plays a part in the wave64 cases: the system SGPRs are already bound.
    • With shader: read the wave size of slot 67 compute requests from .sa #3006's rule applied: 100 of the 156 leave this refusal and 27 of them compile. 56 still stop here (24 wave32, 32 wave64), with 214,183 dispatches. These are the same counts as yours.
    • Among the 73 that leave the refusal but don't compile, the most common next refusal is multi-wave64 exchange requires converged group control flow (33).

    So the largest cause is #3006 itself. I'm not going to duplicate it, and I'm narrowing my claim to the 56 that remain.

    The 56 that remain, by the reading instruction and the symbol in the register:

    Wave Symbol in the register Reader Shaders Dispatches
    wave32 unbound (leftover user SGPR) s_add_u32 8 144,783
    wave32 resource-heap table s_add_u32 4 17,346
    wave64 unbound s_and_b64 / s_orn2_b64 / s_add_u32 19 23,185
    wave64 s_load descriptor word s_bfe_u32 / s_or_b64 / v_cmpx 13 11,519
    wave32 unbound s_and_b32 / s_nand_b32 6 11,037
    wave32 s_load descriptor word s_bfe_u32 4 3,161
    wave32 unbound s_getpc_b64 2 3,152

    The first two rows, 12 shaders and 162,129 dispatches, have one shape: a waterfall loop that loads a buffer descriptor at the resource-heap base plus a lane-selected byte offset.

    v_readfirstlane_b32 sI, vX
    v_cmpx_eq_i32_e32   sI, vX
    s_add_u32           sLo, s10, sI     ; resource-heap base + byte offset
    s_add_u32           sHi, 0, src_scc
    s_load_dwordx4      s[D:D+3], s[sLo:sHi], 0x0
    s_bfe_u32           ..., s(D+1), ...  ; stride
    s_max_u32 / s_and_b32 / s_mul_i32 on the descriptor words
    

    Plan, revised: a PR on main that lowers this address form: the heap base plus a register byte offset (s_add_u32 lo, then s_add_u32 hi, 0, scc) followed by s_load at offset 0. It becomes the same indexed heap descriptor the compiler already builds for an SMEM register offset.

    Environment: Windows 11 build 26300, NVIDIA GeForce RTX 4090 (driver 32.0.16.1088), Windows SDK 10.0.26100, plus WARP.

    AI-assisted.

  14. 32 remaining items

  15. SimSalabimse commented on Nov 28, 2026

    @SimSalabimse
    Contributor

    I'm claiming the "direct global memory supports only DWORD loads with a scalar address pair" refusal from Not-Saii's refreshed census (9 shaders, 19,528 untranslated dispatches at 8007a539).

    My plan is to work out which global-memory shapes those 9 keys actually use (wider loads, stores, or a VGPR address), lower the ones the direct path can express safely, and keep a refusal with a clear reason for anything it can't. Each new shape gets a source-built fixture plus a negative control. This doesn't touch the heap slot, descriptor table, SCC, SDWA or saveexec work others have claimed.

    AI-Assisted

  16. Leyukaka commented on Nov 28, 2026

    @Leyukaka
    CollaboratorAuthor

    I'm taking these small direct-path refusals from my measurement of the 882 requests at main 3f780716 (250 compile). Counts are programs and dispatches:

    • direct image opcode or descriptor modifiers on image_gather4_lz_o (gather at LOD 0 with an offset VGPR): 4 programs.
    • LDS instruction without allocation on ds_bpermute_b32, which reads no LDS memory: 1 program, 8,956 dispatches.
    • unsupported wave64 scalar operation on s_andn2_wrexec_b64: 2 programs. I'll first find which condition refuses it, and change it only if the lowering can be shown correct in that program's wave model.
    • unsupported packed byte dot operand modifiers on v_dot4_i32_i8 with an inline constant and op_sel_hi:[1,0,1]: 5 programs, 21,410 dispatches. I'll only change this if the semantics can be shown; otherwise I'll report what I find.

    Each will be a separate PR with a source-built fixture and a negative control. I'm not touching the SDWA, heap slot, descriptor table, SCC, unbound SGPR or global memory items others have claimed.

    AI-assisted.

  17. Leyukaka commented on Nov 28, 2026

    @Leyukaka
    CollaboratorAuthor

    I'm also taking descriptor used as mask (4 programs in my 882-request set at main 3f780716). In these programs it is raised at s_mov_b64 vcc, s[18:19] where s[18:19] hold descriptor words: VCC is used as a scalar temporary, not as a mask. I'll let the words pass through s106/s107 and keep every mask or numeric use of VCC refused. PR to follow.

    Update on the v_dot4_i32_i8 item from my earlier claim: I'm leaving it refused. With an inline-constant source and op_sel_hi:[1,0,1], the two models in the repository (tools/ffx_dispatch_aot.py lines 175-181 and tools/ffx_scratch_reference.py lines 106-110) read the cleared bit as replicating the low half, so 10 would become 0x000a000a, while a whole-word reading keeps 0x0000000a. tests/ffx_dispatch_aot_check.py checks that form against the Python model only. I found no hardware readback in the repository that settles which one the hardware uses, so I'm not changing it.

    AI-assisted.

  18. Leyukaka commented on Nov 28, 2026

    @Leyukaka
    CollaboratorAuthor

    Taking unsupported local DS opcode 31 (ds_write_b16, 1 program in my 882-request set at main 3f780716). That program also needs ds_read_u16_d16, so the PR covers the sub-dword DS stores and loads together.

  19. Leyukaka commented on Nov 28, 2026

    @Leyukaka
    CollaboratorAuthor

    Taking unsupported carry mask destination and unsupported wave32 conditional mask source (1 program each in my 882-request set at main 3926a289). Both are wave32 programs that use vcc_hi as an ordinary lane mask.

  20. Leyukaka commented on Nov 28, 2026

    @Leyukaka
    CollaboratorAuthor

    Taking unsupported typed 2D image atomic operands (2 programs in my 882-request set at main 3926a289): a 3D image_atomic_add and a 2D image_atomic_umax with an NSA address.

  21. Leyukaka commented on Nov 28, 2026

    @Leyukaka
    CollaboratorAuthor

    Ranking from a 300 s start-up run (99e3ef0e, --suspend-others 0, see #3331). The runtime census lists 873 compute shaders with no translation in that run, 887,555 dispatches. Their first refusal on main f5a6f6ba (compile_dxil gfx1013-direct-cs@36 --requests), weighted by the run's dispatches:

    First refusal on f5a6f6ba Shaders Dispatches
    direct resource-heap load requires the selected GPU slot and its view type 330 325,210
    compiles now 290 249,212
    direct descriptor address outside bound table 117 194,890
    unbound numeric SGPR 73 46,314
    unsupported local DS opcode 166 (ds_read_u16_d16, in #3330) 2 35,159
    numeric SCC from a symbolic descriptor field 2 15,032
    direct global memory supports only DWORD loads with a scalar address pair 9 4,542
    unimplemented direct SDWA operand profile 3 3,758
    direct image opcode or descriptor modifiers 12 2,969
    14 other refusals 35 10,469
    • Of the 290 that compile now, 166 stop at unsupported startup runtime manifest bindings in the same compile_dxil output. Runtime binding on f5a6f6ba is not measured here.
    • multi-wave64 exchange requires converged group control flow no longer appears in this set.

    Top three runtime refusals of shaders that have a translation, same run:

    Runtime refusal Shaders Dispatches
    an output buffer descriptor is a view token 47 111,773
    an input buffer view token's resource does not hold its range 5 64,368
    an input view token is not a buffer view of a desktop resource 14 61,646
  22. Leyukaka commented on Nov 28, 2026

    @Leyukaka
    CollaboratorAuthor

    Taking packed image addressing (3 programs, 1,017 dispatches; one of the 14 other refusals in my census above, first refusal on main f5a6f6ba). All three are 2D image_store with unorm, a16 and 32-bit data (dmask:0xf, no d16).

  23. tedin7 commented on Nov 28, 2026

    @tedin7
    Collaborator

    Claiming two small slices as Draft PRs: gfx10 buffer FORMAT 47 (BUF_FMT_10_10_10_2_SSCALED) from a hardware descriptor, and VOPC DPP16 decode plus the v_cmp quad-swap lowering in the pixel path. AI-assisted; commands listed were executed locally.

  24. SimSalabimse commented on Nov 28, 2026

    @SimSalabimse
    Contributor

    Taking UAV kind unknown: compute programs that compile but publish no runtime manifest because their binding kind is packed_d16_x_uav, and the two compute view kinds that have no name in view_kind_name.

    Measured weight (counts only). One 900 s local start-up run of a retail title on the Windows test PC, runtime built from main aec2e08. The runtime census listed 1,026 compute shaders dispatched, 1,527,212 of their dispatches untranslated. I copied those requests and ran compile_dxil gfx1013-direct-cs@36 --requests from the same main on them (4 workers).

    Plan.

    1. Add packed_d16_x_uav and indexed_raw_srv to view_kind_name, so the reason names the kind.
    2. Publish a manifest line for packed_d16_x_uav and read it in d3d12_compute_dispatch.inl, next to bufhalf. The view stays checked with native_buffer_store_view, so a view whose format or element size does not match the store keeps its named refusal.
    3. Fixture, no game data: a source-built buffer_store_format D16 x program shaped like tests/startup_compute_half_buffer_uav_check.py. It runs compile_dxil --requests, checks the published <key>.txt line, dispatches through the stand-in on WARP and a hardware adapter, and compares the written halfwords with an independent reference. It also has negative controls: an R32_UINT view (two halfwords per element), a wrong stride, and a view with flags set must still refuse by name, and the unpublished case stays no translation.

    I will state the compiler commit with every number, and post the before and after counts on the same kind of run.

    AI-Assisted

  25. Leyukaka commented on Nov 28, 2026

    @Leyukaka
    CollaboratorAuthor

    Census from a 900 s run of main aec2e084 with manual input and thread holding off (-SuspendOthers 0, #3332). It goes further than the 300 s run in my census above. Compute dispatches in the run: 136,046 translated, 2,988,346 refused at runtime, 13,532,495 with no translation (878 shaders). First refusal of those 878 on main d418f70e (compile_dxil gfx1013-direct-cs@0 --requests; the native compiler is unchanged since f5a6f6ba), weighted by the run's dispatches:

    First refusal Shaders Dispatches
    direct resource-heap load requires the selected GPU slot and its view type 330 4,669,755
    compiles now 290 3,510,253
    direct descriptor address outside bound table 122 3,472,991
    unbound numeric SGPR 73 694,293
    unsupported local DS opcode 166 (ds_read_u16_d16, in #3330) 2 465,841
    numeric SCC from a symbolic descriptor field 2 430,886
    direct global memory supports only DWORD loads with a scalar address pair 13 70,978
    unimplemented direct SDWA operand profile 3 51,856
    direct image opcode or descriptor modifiers 12 29,193
    15 other refusals 31 136,500

    Of the 290 that compile, 166 get no runtime manifest; the largest gaps by dispatches: SRV kind typed_buffer_srv 112 shaders / 2,476,192, UAV kind indexed_atomic_uav 11 / 67,400, SRV kind d16_sample_srv 2d 1 / 64,499, UAV kind half_scalar_uav 19 / 51,451, SRV kind root_buffer_srv 10 / 47,110.

    Largest runtime refusals of shaders that have a translation, same run:

    Runtime refusal Shaders Dispatches
    an output UAV interval is unaligned, oversized or outside its buffer 1 1,146,106
    an input view token is not a buffer view of a desktop resource 14 831,790
    an input buffer view token's resource does not hold its range 5 547,723
    an output token's backing does not uniquely alias its guest byte interval 46 356,938
  26. Not-Saii commented on Nov 28, 2026

    @Not-Saii
    Contributor

    I'll take the largest runtime refusal in @Leyukaka's 900 s census: an output UAV interval is unaligned, oversized or outside its buffer. That is one shader with 1,146,106 dispatches, more than any other runtime refusal in that run.

    It comes from the slot-19 output-token path added in #3094 (src/startup_stubs/d3d12_compute_dispatch.inl, about line 516 on main). One message covers six conditions:

    1. the view's byte count is zero;
    2. it is not a multiple of 4;
    3. it is over the 16 MiB cap;
    4. the offset is not 16-byte aligned;
    5. the offset is past the backing buffer;
    6. the interval runs past the buffer's end.

    Plan. Same approach as #3229:

    1. Give each condition its own reason, with no change in what is accepted, and add a source-built fixture that triggers each one.
    2. Find which condition this shader hits in a local start-up run (counts only).
    3. If it's a limit the runtime can lift safely (for example the 16 MiB cap, or an alignment that a typed or structured view can satisfy), lift it in its own PR with a GPU readback test and a negative control. If it isn't, report why it stays refused.

    @R0Y00, the cap and the alignment rule are from your #3094. If either one is deliberate beyond the raw-view requirement, I'd like to know before step 3.

    Environment: Windows 11 build 26300, NVIDIA GeForce RTX 4090 (driver 32.0.16.1088), Windows SDK 10.0.26100, plus WARP.

    AI-assisted.

  27. Leyukaka commented on Nov 28, 2026

    @Leyukaka
    CollaboratorAuthor

    Work list from the 900 s run in my comment above, by owner. Shaders with no translation: 878, 13,532,546 dispatches; first refusal on main d418f70e with compile_dxil <dxc dir> <cache> --jobs 8 gfx1013-direct-cs@0 --requests <request dir> <out dir> (entry 0, as the runtime compiles slot 67 requests). Runtime rows are shaders with a translation whose dispatches were refused, counted separately from the 878. Owners as of 17:56 UTC. Claim here with the part you take and your environment.

    No open PR

    Refusal Shaders Dispatches Note
    runtime: an input view token is not a buffer view of a desktop resource 14 831,790
    unbound numeric SGPR 73 694,293 Not-Saii's claim delivered 12 heap-base shapes in #3253
    runtime: an input buffer view token's resource does not hold its range 5 547,723
    numeric SCC from a symbolic descriptor field 2 430,886 earlier claims merged as #3227, #3301
    runtime: an output token's backing does not uniquely alias its guest byte interval 46 356,938 next to the output-interval refusal Not-Saii claimed (same path)
    no runtime manifest: UAV kind indexed_atomic_uav 11 67,400 in Not-Saii's no-manifest bucket claim
    no runtime manifest: SRV kind d16_sample_srv 2d 1 64,499
    no runtime manifest: SRV kind root_buffer_srv 10 47,110 in Not-Saii's no-manifest bucket claim
    no runtime manifest: UAV kind typed_buffer_uav 7 23,555
    symbolic scalar memory destination overlaps wave64 VCC 4 18,140
    unsupported local DS opcode 62 (ds_append) 2 9,422
    partial final wave in multi-wave group 2 9,070

    Owned or in an open PR

    Refusal Shaders Dispatches Owner
    direct resource-heap load requires the selected GPU slot and its view type 330 4,669,755 JB2WIN #3023 / #3063, RonLogic #3232
    direct descriptor address outside bound table 122 3,472,991 tedin7 #3221
    no runtime manifest: SRV kind typed_buffer_srv 112 2,476,192 Not-Saii (claim here)
    runtime: an output UAV interval is unaligned, oversized or outside its buffer 1 1,146,106 Not-Saii (claim here)
    unsupported local DS opcode 166 (ds_read_u16_d16) 2 465,841 Leyukaka #3330
    direct global memory supports only DWORD loads with a scalar address pair 13 70,978 SimSalabimse #3333
    unimplemented direct SDWA operand profile 3 51,856 romn4rch #3339, R0D4X #3125 (partial)
    no runtime manifest: UAV kind half_scalar_uav 19 51,451 RonLogic #3305
    no runtime manifest: UAV kind unknown 5 42,404 SimSalabimse (claim here)
    direct image opcode or descriptor modifiers 12 29,193 Leyukaka #3319 (partial)
    packed image addressing 3 14,133 Leyukaka #3372

    Counts are per shader at its first refusal; a shader may stop at another refusal once this one is lifted. Rows with no runtime manifest are shaders that compile but get no runtime manifest.

  28. Not-Saii commented on Nov 28, 2026

    @Not-Saii
    Contributor

    Step 3 of my no-manifest claim is up as #3386: srv <i> typed table <param> <byte> bytes <n> in the C++ compute manifest. The stand-in binds it as a UINT buffer view when the title's components are 32-bit UINT, SINT or FLOAT, from either a hardware descriptor or a slot 18 typed buffer view token. Other formats are refused by name.

    Correction to my step 2 comment: I described typed_buffer_srv as buffer_load_format_* / tbuffer_load_format_*. Only MUBUF buffer_load_format_x to _xyzw produce it. The direct compiler reads tbuffer_load_format_* through raw views.

    How many of the 112 typed-buffer programs in Leyukaka's census have a 32-bit FORMAT is not measured yet. I'll re-measure once this is reviewed.

    AI-assisted.

  29. Leyukaka commented on Nov 28, 2026

    @Leyukaka
    CollaboratorAuthor

    Taking symbolic scalar memory destination overlaps wave64 VCC from the work list above (4 shaders, 18,140 dispatches in the 900 s run): wave64 table and heap-offset descriptor loads whose destination reaches s106/s107. It reuses the VCC-as-scalar-temporary rules of #3329, so it will go into #3329.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions