Repository navigation
Description
First-refusal census of locally captured startup shader requests, translated with current main plus a local merge of the open translator PRs. Counts only; the inputs are private and not attached. The items below are the refusals for which I found no open issue or PR. Each is small enough to claim on its own; say so in a comment before starting.
Task status
Check the claim and PR status below before starting work.
-
Compute manifest raises on a sampler with LOD limits.
ComputePipeline.manifest()formats the sampler key with'0x%x'after skipping only thecmpprefix, so a key with thelodprefix (added when a sampler carries LOD limits) raisesTypeErrorinstead of writing a line. The graphics manifest handles both prefixes (smpc/smpl). Seen on 17 of 2,689 compute requests. Acceptance: a compute program with a LOD-limited constant sampler writes ansmplline (or refuses with a reason), with a control for the plain and comparison forms. The compute loader side ofsmplneeds checking too. Merged for manifest generation. JVProg’s startup: write smpl for LOD-limited samplers in the compute manifest #2482 landed atb976e8bc. The startup runtime loader remains a separate part of startup: translated compute Dispatch with 2D texture views, static samplers and a per-key census #2490. -
s_load_dword*through a pointer joined at a branch target (vertex/pixel). 12 of 124 requests once the earlier refusals are lifted. The pointer is ans_mov_b32copy made dozens of joins earlier and written on no path in between; the dominance rule from gfx2hlsl: keep a scalar constant across a branch target when its write dominates #2460 for constants does not cover pointer symbols. Acceptance: the pointer symbol survives a join when its write dominates and no path rewrites it, with a negative control where one arm rewrites it. Claimed. RavenCurseBurg has a source-built reproduction. -
s_getpc_b64refused in a pixel stage (4 of 124 requests, same set). Not investigated; the first step is to name the exact form and what consumes the pair. Merged for the diagnostic. ChazY11’s startup: name why s_getpc_b64 is refused instead of reporting the mnemonic alone #2484 landed atadf4e3bf. The proven calculated-jump control still translates. General numeric use of the load address remains a separate question. -
v_cubetc_f32(and presumablyv_cubesc_f32/v_cubema_f32/v_cubeid_f32) in compute: 21 of 2,689 requests as first refusal. No handler ingfx2hlsl.py. Acceptance: value checks on the six face cases and the tie cases against the ISA definition. Existing evidence. RavenCurseBurg verified the #2035 prototype. Coordinate a follow-up with the author of shader: lower v_cubema/sc/tc/id_f32 and SQ_RSRC_IMG_CUBE in gfx2hlsl (Part of #1723) #2035 before implementing the same slice. -
s_mov_b32inside a block skipped per lane bys_cbranch_execz, definingvccthat is live at the join (compute): 25 of 1,086 requests once gfx2hlsl: prove a compute formatted load whose table pointer copy is in a block above #2461 is applied. May belong with the execz item in tracking: console compute programs (device slot 67) translate and dispatch at run time, checklist of claimable items #2274; listed here so it is not lost. Claimed. Ybucaille is taking the compute skipped-block write. -
Scalar ALU table short operand lists. ChazY11's gfx2hlsl: refuse a scalar ALU source list shorter than the table template uses #2515 landed at
3e3697f1. The instruction-specific refusal replaces the format exception. The complete-form, guard-removal and separate s_bfm_b32 controls passed on the reviewed head.
Already tracked elsewhere (not duplicated)
Largest groups from the same census and where they live:
v_min_u32with a DPP control (quad_perm,fi:1) in pixel stages: help wanted: GPU translation, part 5 (vertex and pixel pipelines) #2023 item H, cross-lane model in help wanted: GPU translation, part 6 (cross-lane operations) #2125.- exec writes (
s_and_saveexec_b32) inside an execz block in compute: tracking: console compute programs (device slot 67) translate and dispatch at run time, checklist of claimable items #2274 (in progress there). 351 of 1,086 requests after gfx2hlsl: prove a compute formatted load whose table pointer copy is in a block above #2461. buffer_store_format_xyzw/d16forms: help wanted: GPU translation, part 4 (compute shaders) #2022 item B.s_loadwith a register offset through the resource heap: shader: support s_load with register offset through resource heap in gfx2hlsl (Part of #1723) #2066.- LDS (
ds_write_*, exchange, fill): compute: LDS reads, writes and atomics plus s_barrier (groupshared lowering) #1541, shader: lower bounded 128-bit LDS exchange and mixed-width reads in gfx2hlsl #2404. - SDWA
v_cndmask_b32: shader: lower the SDWA form of v_cndmask_b32 in gfx2hlsl #2391. Lane-mask complements: gfx2hlsl: lower s_nand_b32, s_nor_b32 and s_xnor_b32 on lane masks #2459. Formatted-load proof in compute: gfx2hlsl: prove a compute formatted load whose table pointer copy is in a block above #2461.v_readfirstlane_b32uniform proof: gfx2hlsl: prove a compute buffer load with a uniform address uniform for v_readfirstlane_b32 #2446, gfx2hlsl: extend the uniform compute load proof to multi-register loads #2454, gfx2hlsl: prove a thread-id shift uniform when it clears every thread-id bit #2455.
Activity
JVProg commentedon Nov 25, 2026
I'm claiming the first item, "Compute manifest raises on a sampler with LOD limits". I will reproduce it with a source-built fixture, check the compute loader side of
smpl, and cover the plain and comparison forms as controls. The other items stay free.AI-assisted (Claude Code).
JVProg commentedon Nov 25, 2026
Update on the first item (compute manifest and LOD-limited samplers), including the loader side.
I opened #2482 for the manifest fix. The stand-in problem remains:
The stand-in does not load compute translations yet.
docs/startup-runtime.mdsays so ("The stand-in does not load the result yet and still creates a placeholder"). So #2482 lets the translator publish the manifest, but does not make that compute pipeline run in the startup runtime, and it does not change the stand-in.I reproduced the
TypeErroron1a0e506dwithimage_sample_landimage_sample_lzthrough a constant sampler. In #2482 the graphics and compute manifests share one method for thesmp/smpc/smpllines.Local checks of those changes on top of
1a0e506d, run before the commit (38517b69; Release, Windows 11 build 26300):tests/startup_image_sample_lod_check.pyfails with the sameTypeErrorwithout the fix and passes with it. Its controls are a mip-filter-none sampler (smp) and a comparison sampler (smpc).translated_sampler_bindings.haccept thesmplline. 44 selected sampler and compute CTest tests passed on WARP and an RX 9070 XT (driver 32.0.32029.2010).smpl1, 1 and 2; with the line changed tosmpas a control 2, 0 and 0. The D3D12 debug layer was not available in this harness. This does not exercise a runtime load path, because there is none.llvm-mc.AI-assisted (Claude Code).
ChazY11 commentedon Nov 25, 2026
Claiming the third item,
s_getpc_b64refused in a pixel stage — the one the census says is "not investigated;the first step is to name the exact form and what consumes the pair". I will start there rather than at a lowering,
because the deliverable you describe is identification, and I would rather report what the pair feeds than guess at
a semantic.
What I will do, in this order, and report even if the answer is "no small change is possible":
s_getpc_b64 s[a:b]and any_e32/_e64variants the decoderproduces for the captured requests);
s_add_u32/s_addc_u32against a label constant is the usualshape, but I will check rather than assume) and whether the value is used as an absolute address, a
PC-relative delta, or only as a symbol for a table base;
lowering that reuses the existing
calculated_pcbookkeeping may be possible) or whether the consumed valueescapes the model — in which case the refusal stays and the item closes as "correctly refused, reason named".
I have no access to the captured requests themselves, so item 1 will be driven by the decoder and the fixtures in
the tree; if the exact form depends on bytes I cannot see, I will say so instead of inventing one.
Not touching the other four items. Refusal-count context I can reproduce here if it helps: 137-entry Linux check
list all green, 63
startup_gfx2hlsl_*checks green, and the gfx2hlsl family runs on this host without D3D12.AI-assisted.
RavenCurseBurg commentedon Nov 25, 2026
Compute cube coordinate instructions, verified on three adapters. The existing lowering in #2035 already gives the four correct compute results for the six faces and the finite tie cases below. The PR was closed to shorten the Windows test queue. Its current head is cb8fb26.
I assembled an 80-byte gfx1013 compute program with LLVM 15. Eighteen lanes each load a distinct float3 from a raw SRV, compute face ID, S, T and signed major × 2, and write four words to a UAV. The four additional vectors tie X/Y, X/Z, Y/Z and all three axes. Eight more lanes cover every combination of positive and negative zero on X/Y/Z. All eight select +Z, retaining the signs of X, -Y and Z in the three other outputs. The first cube operation on upstream main a6c8d80 is refused with
v_cubeid_f32. On #2035 the same bytes translate and compile with DXC cs_6_0.The tie control first fails for (4, 2, -4), returning face +X instead of -Z at output word 28. The 320-word comparison includes 248 untouched words. Intel driver 32.0.101.5973, NVIDIA 32.0.15.9579, WARP 10.0.26100.9711. The local debug layer was unavailable.
Source, input vectors, output words and commands. The program only exercises coordinate ALU. The 21 private requests in the census still need a rerun after integration. The standalone test can be taken independently when #2035 is resumed.
Replacement PR. I reran the same 18-thread compute program on #2514 at
7a2887ba. All three adapters matched the 72 result and 248 sentinel words with DXC defaults and with-Gis. All five controls were detected on each adapter. Per-device results and the source adapted to the replacement lowering.AI-assisted with Codex (GPT-6.2 Astra, xhigh).
startup: name why s_getpc_b64 is refused instead of reporting the mne…
ChazY11 commentedon Nov 25, 2026
Item 3 is delivered as #2484 (
s_getpc_b64now names the reason instead of reporting the mnemonic alone), and Iwill not claim a second item — see the note on item 2 below, which is why.
Item 2 (
s_load_dword*through a pointer joined at a branch target): I could not reproduce the refusal shape fromthe tree alone, so I am leaving it unclaimed. What I tried, on
mainata6c8d80d, translating synthetic programsthrough
Stage.translate():So the tree-side repro of the straight-line case refuses for a reason that is not the join at all: a constant is
not a descriptor, and the message says so. The shape the census reports needs a real descriptor/pointer symbol that
survives a join, and reproducing that needs a program whose pointer comes from a resource binding rather than a
literal — which is exactly the part of my synthetic harness that does not work yet (the
IndexErrorabove is mymissing pipe state, not the translator).
Whoever takes it: the acceptance text ("the pointer symbol survives a join when its write dominates and no path
rewrites it, with a negative control where one arm rewrites it") is implementable against
tests/startup_gfx2hlsl_join_symbols_check.py, which already builds the branch/dominance fixtures — that is where Iwould start rather than in a bespoke harness, which is what I got wrong here.
AI-assisted.
RavenCurseBurg commentedon Nov 25, 2026
I am working on item 2, the pointer copied before a branch target and then used by
s_load_dword*.I reproduced the distinction using a synthetic gfx1013 pixel program, an actual root descriptor table, and the pipeline constructor from
tests/startup_gfx2hlsl_join_symbols_check.py. With #2460 (661c9a1a) and #2069 (99e1c69f) merged locally, the straight-line version below givessrv 0 tex2d table 0 32. With the extra conditional blocks, it refuses the load through s24 as joined, even when the second block only writes s30.Replacing the final move with
s_add_u32 s24, s24, 32makes the incoming addresses genuinely different and must keep the refusal. Copying the unadvanced entry pointer in the positive fixture already works on both main and #2460. Implementation and Windows results. The forward-branch change is in draft #2507, based on the updated #2069 ata747241f. The incremental commit makes the two equal addresses agree and keeps the differing-address case refused. Five bindings and six refusals passed, all eleven full gfx1013 programs matched their LLVM 15 assembly, and 66 existing translator checks passed. In a separate 350-program comparison, all 49 accepted programs selected the correct binding and all 220 with multiple possible offsets refused. The other 81 were conservative refusals.The actual guest command list read two distinct textures at byte 0 and 32. On this exact commit, five programs × FXC/DXC × Intel UHD 770 / RTX 4060 / WARP produced 30 images matching all 32 pixels. Deliberately changing only the manifest offset changed all 32 pixels in each of 30 controls. The Windows Server 2025 CPU, FXC WARP and DXC WARP checks also passed. The source-built fixtures establish these cases; private census impact still needs the project-side retest.
AI-assisted with Codex (GPT-6.2 Astra, xhigh).
startup: name why s_getpc_b64 is refused instead of reporting the mne…
startup: name why s_getpc_b64 is refused instead of reporting the mne…
Ybucaille commentedon Nov 25, 2026
I'm claiming the fifth item,
s_mov_b32inside a block skipped per lane bys_cbranch_execz, definingvccthat is live at the join (compute). The other items are claimed or delivered (1 JVProg #2482, 2 RavenCurseBurg, 3 ChazY11 #2484, 4 RavenCurseBurg #2035).Scope, to avoid overlap: #2466 accepts
s_and_b64/s_orn2_b64withexecat an execz target in vertex and pixel stages, and #2274 covers exec writes inside an execz block in compute. This item is the compute case where the skipped block writesvccthrough a scalar move and the join reads it. I will start from a source-built gfx1013 compute fixture that reproduces the refusal on currentmain(with #2461), then work out what the join must hold for a lane that skipped the block, with a negative control where the value differs between the two paths.AI-assisted (Claude Code).
startup: name why s_getpc_b64 is refused instead of reporting the mne…
startup: name why s_getpc_b64 is refused instead of reporting the mne…
startup: name why s_getpc_b64 is refused instead of reporting the mne…
startup: name why s_getpc_b64 is refused instead of reporting the mne…
startup: write smpl for LOD-limited samplers in the compute manifest (#…
startup: name why s_getpc_b64 is refused instead of reporting the mne…
startup: name why s_getpc_b64 is refused instead of reporting the mne…
startup: name why s_getpc_b64 is refused instead of reporting the mne…
ChazY11 commentedon Nov 25, 2026
A one-source operand list on 35 scalar ALU ops raises
IndexError, not a refusalFound by fuzzing the scalar table rather than by reading: for every opcode in the table, call the handler with one
source instead of two.
valueshas one element becausesrcshas one, while the template still wants{1}. Per the project's ownconvention that is
translator crash in <op>: IndexError, not a refusal naming the instruction — the same classissue #2463 is cataloguing.
How many
So the three-operand form is fine — the extra source is refused somewhere and the message is well-formed.
Only the short form crashes, and it does so for every op whose template has two placeholders.
Note this is a different dispatch branch from the arity guards in #2469: those fire earlier in
lower()fortheir own subsets, and
s_or_b32reachesscalar()at line 2198 without passing one. That is why the guardsalready on
maindo not cover this.Where the guard belongs
Line 2472–2473:
The handler knows how many placeholders the template needs; a check that
len(values)matches the highest indexused in
text, raisingUnsupported('%s with %d operands, expected %d' % ...), covers all 35 in one place anduses the message shape the rest of the table already uses. I would put it immediately before
text.formatratherthan in each handler.
My own mistake, stated so the count is trustworthy
The first pass reported seven more ops (
s_mov_b32,s_mov_b64,s_not_b32,s_not_b64,s_brev_b32,s_sext_i32_i8/i16) failing withAttributeError. That was my probe, not the translator: I gave the probemasks = {}(a dict) whereset_sexpects a set, andgetattr(self, 'masks', set()).discard(n)does not exist on adict. With
masks = set()those seven are clean. The 35 above are allIndexErrorfrom the format string.Scope of the measurement
This is the single-instruction handler path, which is what the existing arity fixtures use too. I did not drive a
whole program through
translate_requestto see the recorded reason string; if you want that as the repro line inthe issue, it is the same call one level up.
If this is in scope for #2463, I can prepare the guard plus a fixture in the shape of
startup_gfx2hlsl_scalar_arity_check.py(all 35 ops, the short form refused with the message, the complete form still translating, and the existing
negative control that disabling the guard brings the
IndexErrorback). Say the word and I will open it againstthe handlers you prefer, or leave it to the maintainers of the surrounding work.
AI-assisted; the fuzz pass and the traceback were produced locally on Windows 11 build 26300.9974, no build needed.
ChazY11 commentedon Nov 25, 2026
Prepared the guard and its fixture on a local branch so it is ready if you want it, not opened as a PR and not
pushed — the finding is in the comment above, and the claim is yours to assign.
Branch
startup/scalar-table-short-arity, one commit17f76a58, against394f24f8:The guard, in
scalar():Verified here, all pure Python:
One detail the control had to account for: 35 of the 36 templates come back to
IndexErrorwith the guarddisabled.
s_bfm_b32stays refused because it carries its own arity message, so the control asserts 35 plus aseparate check that the remaining one still refuses by its own message — rather than counting it as a survivor and
loosening the threshold.
Say whether you want it as a PR, want it folded into another branch, or would rather the maintainers of #2469's
follow-ups take it, and I will act accordingly. If the answer is "leave it", it stays unopened.
AI-assisted.
R0Y00 commentedon Nov 25, 2026
ChazY11, please open the scalar short-arity guard as a focused PR against current
main, referencing this issue. The complete-form control and the separates_bfm_b32refusal cover the two diagnostic paths. Keep the return as an instruction-specificUnsupported, and leave the existing pointer-join and lane-mask claims with their authors.ChazY11 commentedon Nov 25, 2026
Opened as requested: #2515, rebased onto
6d2d3bed, one commit.It keeps the three points you named: the return is the same instruction-specific
Unsupported('%s with %d operands, expected %d')the rest of the table uses; the fixture asserts that acomplete form is never refused for its operand count; and
s_bfm_b32is handled as its own diagnostic path —the negative control excludes it by name and asserts separately that it still refuses by its own message, rather
than counting it as a survivor.
The pointer-join and lane-mask claims are untouched and stay with their authors.
startup_gfx2hlsl_*family on the branch: 67 checks, 0 red. With the guard turned intoif False:the new checkexits 1, restored it exits 0.
AI-assisted.
gfx2hlsl: refuse a scalar ALU source list shorter than the table temp…
gfx2hlsl: refuse a scalar ALU source list shorter than the table temp…
gfx2hlsl: refuse a scalar ALU source list shorter than the table temp…
startup: lower scalar null operand and guard non-SGPR SALU destinatio…