Repository navigation
Description
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:
- Resource-heap loads: startup-runtime: dynamically indexed sampler and resource heap loads #1143 (the gfx2hlsl-side issue) and open PR native: read GPU-selected heap slots raw and typed in one program #3063 (targets
cpp-migration). - Descriptor address outside bound table: open PR native: bind a single directly indexed heap flag as a descriptor table #3221.
- First-refusal ranking by blocked dispatches: open PR tools: rank first shader refusals by the draws and dispatches they block #3198 (a tool).
- Rank 3 (SDWA): with compute: lower binary16 VOP1 rcp, sqrt, exp and rsq #3220 (measured on its branch over
maine582a9a4), this shader gets past the SDWA refusal and stops later at "unsupported packed binary16 arithmetic source".
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.
Main integration update. #3783 adds native C++ lowering for six global sub-dword _d16 and _d16_hi load encodings. The source-built GPU replay covers signed and unsigned loads, destination-half preservation and cross-DWORD reads. The dispatch counts in the original census have yet to be remeasured against current main.
Activity
RonLogic commentedon Nov 27, 2026
I’ll investigate the
numeric SCC from a symbolic descriptor fieldfamily onmain. I’ll start with an original fixture that observes SCC after extracting a buffer stride and afters_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.Not-Saii commentedon Nov 27, 2026
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 insrc/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.
Plan.
@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.
R0Y00 commentedon Nov 27, 2026
Two existing paths to reuse before opening another implementation PR:
mainbefore retargeting. Keep startup-runtime: dynamically indexed sampler and resource heap loads #1143 for its separate Python-side contract.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 the14d56502compiler, so please include the compiler commit in reruns.Not-Saii commentedon Nov 27, 2026
I'll also take the
unbound numeric SGPR sNfamily (156 shaders, 2,545,711 dispatches, 132 of them wave64). The refusal comes fromrequire_numericinsrc/gfx1013_compute_native.cpp: the program reads a scalar register that holds no known numeric value at that point.Plan.
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.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.
legacy-code-archaeologist commentedon Nov 27, 2026
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 inv_pk_add_f16,v_pk_mul_f16,v_pk_fma_f16, andv_pk_min_f16/v_pk_max_f16onmain.Plan:
packed_f16_inline_constant()helper betweenDirectCompute::packed_f16_alu()andDirectCompute::packed_minmax()insrc/gfx1013_direct_compute.inl(preserving gfx1013's[31:16] = 0encoding for240..248and 32-bit sign-extended encoding for128..208).ir,controls,compute,pixelon WARP and hardware) covering all 9 inline f16 constants,op_sel_hihigh-half zeroing,neg_lo/neg_hi, single-rounding FMA tie witnesses with inline0.5, inline integer constants, and kept refusals (vcc,m0,exec,scc,240..248on integer min/max,clamp).AI-assisted.
SimSalabimse commentedon Nov 28, 2026
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
RonLogic commentedon Nov 28, 2026
The first symbolic-descriptor SCC slice is in #3227, tested at
e1b3f898overmain7fcde81f. It covers live SCC from the 14-bit buffer SRV stride and from both operand orders ofs_max_u32with 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.legacy-code-archaeologist commentedon Nov 28, 2026
Filed #3226 and opened #3230 targeting
mainto accept inline binary16 float (240..248, with[31:16] = 0per gfx1013) and inline integer (128..208) constants inDirectCompute::packed_f16_alu()andDirectCompute::packed_minmax()(native_packed_f16_inline_ir,controls,pixel_warp, andpixel_hardwarepassed on Intel HD Graphics 530;compute_hardwareskipped77).AI-assisted.
RonLogic commentedon Nov 28, 2026
@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.
Leyukaka commentedon Nov 28, 2026
@Not-Saii, on where the reads come from. Measured with the
14d56502compiler on the 882 requests of this issue:v_cmp_gt_u32_e64 s10, s22, v3thens_and_b64 exec, vcc, s[10:11], refused as "unbound numeric SGPR s11".maincompiles every slot 67 request with the wave32 model, where that compare writes onlys10. shader: read the wave size of slot 67 compute requests from .sa #3006 reads the wave size from.sa(head7e018ffe).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:
Two notes from the #3006 side:
op_selon VOP3v_fma_f16is direct compute: lower op_sel on VOP3 v_fma_f16 #3233 / compute: lower op_sel on VOP3 v_fma_f16 in direct compute #3234. With shader: read the wave size of slot 67 compute requests from .sa #3006, two programs compile, 658,064 dispatches. One wave32 program (4,282) already reaches that refusal onmain.main's whole-program gate with a per-branch check up to the post-dominator, and only one of the 55 then compiles. The other 54 still fail that per-branch check, which refuses a synchronizing operation (VOPC, LDS, carry-out, lane read or barrier) inside a divergent region, or a path that cannot reach the end. So the gate is not what blocks them. I am not claiming that family.AI-assisted.
Not-Saii commentedon Nov 28, 2026
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. Build79edac55; the translator is atad306425, and itsgfx2hlsl.pyis unchanged since2e12dd8e. 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.
an output buffer descriptor is a view tokenan output buffer descriptor has zero recordsThe compiler commit differs from the issue's
14d56502counts.Edited after review on #3229: the table is labelled as first-refusal buckets, and the zero row is qualified.
AI-assisted.
Not-Saii commentedon Nov 28, 2026
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 tokenwithout #2961:an entry value reads the descriptor of an output named by a view tokenan output buffer view range is empty, unaligned or outside its resourceThis 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.
shader: accept inline constants in packed binary16 arithmetic and min…
Not-Saii commentedon Nov 28, 2026
Census results for
unbound numeric SGPR sN. Thanks @Leyukaka, your numbers reproduce on my side.Inputs.
main2e12dd8e.main7fcde81f,compile_dxil --jobs 8 gfx1013-direct-cs@36 --requests..sadword 4 clear and more than 32 threads means wave64. Both are off by default, and the patch is not for a PR.compute censusvalue 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.v_cmp_*_e64 sN-1, ...) writes only the even word, and the read is a 64-bit scalar ALU op ons[N-1:N]. Most ares_and_b64,s_nor_b64ors_or_b64.s_loaddescriptor, so it is a stale descriptor field, not unbound.s_bfe_u32on a descriptor word.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:
s_add_u32s_add_u32s_and_b64/s_orn2_b64/s_add_u32s_loaddescriptor words_bfe_u32/s_or_b64/v_cmpxs_and_b32/s_nand_b32s_loaddescriptor words_bfe_u32s_getpc_b64The 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.
CBV_SRV_UAV_HEAP_DIRECTLY_INDEXEDset. That leaves one user SGPR,s10, andmainbinds a heap only when both heap flags are set and two SGPRs are left. native: bind a single directly indexed heap flag as a descriptor table #3221 binds that case.s10is already bound as the resource heap. The add on the table pointer is refused because the register isn't numeric.Plan, revised: a PR on
mainthat lowers this address form: the heap base plus a register byte offset (s_add_u32lo, thens_add_u32 hi, 0, scc) followed bys_loadat offset 0. It becomes the same indexed heap descriptor the compiler already builds for an SMEM register offset.s_add_u32instead of an SMEM offset register? If so, I'll stop at the address form.Environment: Windows 11 build 26300, NVIDIA GeForce RTX 4090 (driver 32.0.16.1088), Windows SDK 10.0.26100, plus WARP.
AI-assisted.
shader: lower inline constants in packed binary16 operations (#3230)
91 remaining items
compute: publish comparison_texture_srv and smpc manifests (#3498)
runtime: bind typed buffer views on the in-process compute route (#3460)
compute: fix SCC liveness fixture ordering and unbound SGPRs
compute: classify remaining scalar ops in direct SCC liveness (#3609)
compute: publish root_buffer_srv compute runtime manifests
timbot103 commentedon Dec 2, 2026
Claiming three independent unclaimed native direct-compute slices on
main(158ef794), each as its own small PR with source-built fixtures and fail-closed controls:root_buffer_uavruntime manifest & binding (src/direct_compute_cache.cpp+src/startup_stubs/d3d12_compute_dispatch.inl): the native compute translator already emitsComputeViewKind::root_buffer_uav, and runtime: bind root_buffer_srv in native compute #3780 coversroot_buffer_srvonly. I will publishuav <i> root <param>informat_compute_runtime_manifestand bind it on the published/native compute route with strict placement/alignment/aliasing checks.partial final wave in multi-wave group(src/gfx1013_compute_native.cpp/src/gfx1013_direct_compute.inl, 2 shaders / 9,070 dispatches in the census above): support non-multiple multi-wave compute threadgroup shapes safely in direct DXIL (masking/guarding tail lanes where needed and keeping unproven wave exchanges/reductions refused), complementing shader: fix GFX10.13 TG_SIZE_EN wave-base bits [11:6] and wave count (Part of #2413, #3224) #3796.numeric SCC from a symbolic descriptor field(src/gfx1013_direct_compute.inl, 2 shaders / 430,886 dispatches in the 900 s census): audituses_scc_afterandprepare_descriptor_strides/ symbolic descriptor-field SCC handling and lower provable descriptor-stride/UAV/overwriter cases while keeping genuinely data-dependent symbolic SCC refused.Environment: Windows 11 (26200), MSVC 19.44, Ninja, Windows SDK 10.0.26100, NVIDIA GeForce RTX 5080 (driver 32.0.16.2140) + WARP. Source-built fixtures only.
AI-assisted.
timbot103 commentedon Dec 2, 2026
All three claimed #3224 slices are up as independent PRs against main (158ef79), each verified in both Debug and Release on app-local WARP 1.0.22 and NVIDIA GeForce RTX 5080 (driver 32.0.16.2140, Windows 11 26200.9974, MSVC 19.44, Windows SDK 10.0.26100.0):
oot_buffer_uav manifest & runtime binding:** runtime: publish and bind root_buffer_uav in native compute (Part of #3224, #2935) #3811 (Debug 4/4 + Release 4/4 passed on WARP & RTX 5080; 320/320 words + 13 refusal controls)
umeric SCC from a symbolic descriptor field:** compute: bind fixed UAV strides and lower stride compares for descriptor SCC (Part of #3224, #2935) #3809 (Debug 14/14 + Release 12/12 passed on WARP & RTX 5080; fixed raw UAV stride binding, explicit stride compares, 25/25 SCC liveness mutation checks, and mesh/heap regressions)
AI-assisted.
shader: fix GFX10.13 TG_SIZE_EN wave-base bits and wave count
Merge pull request #3796 from timbot103/shader/compute-tg-size-en
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