Repository navigation
Backlog
Labels
priority: P0Highest project priority
Description
Ordinary vertex + pixel pipelines that tools/startup/gfx2hlsl.py still refuses. Each row is an independent piece of work for one pull request with a source-built or hand-assembled fixture. Counts are distinct pipeline requests from a private cache (first refusal only; closing one row exposes the next for some requests).
Items (pick one, say so in a comment)
| Item | What is refused today | Requests | Notes |
|---|---|---|---|
| A | buffer_store_dwordx3, and behind it formatted loads through a descriptor taken from a heap at run time |
about 470 | The typed-load half is shared with compute (part 4, item A): format, stride and size come from descriptor words known only at run time. |
| B | buffer_load_format_x / _xy / _xyz where the format comes from the third buffer-descriptor word |
about 520 | |
| C | v_readfirstlane_b32 without a proven uniform source |
224 to 352 | Needs a rule for when the source is uniform across the lanes that matter (per-primitive or per-draw values), and a precise refusal otherwise. |
| D | Image load with level zero on a 16-bit depth format (the d16 modifier) |
about 250 | |
| E | v_cvt_f32_u32 with an SDWA multiply-by-two destination modifier |
130 | Related: the SDWA conversion forms already lowered. |
| F | image_sample_c_lz with sampler fields the translator does not model (mip filter, upper bits of the third sampler word) |
85 | |
| G | Buffer formats: 16_16_SNORM (76), 8_8_8_8_UINT (30), 2_10_10_10_UNORM (22) |
about 130 | One format per pull request is fine. |
| H | v_min_u32 with a DPP control |
64 | |
| I | v_xor3_b32 |
55 | |
| J | s_bitset1_b32 |
about 47 | |
| K | v_cvt_pk_u8_f32 |
31 | Related: #1546. |
| L | A lane mask derived from descriptor data | 22 |
Items already listed in part 1 (#1996) are not repeated: v_subrev_f32 with DPP, image_store in a pixel stage, the pixel-stage entry registers.
What a pull request needs
- One item per pull request.
- A source-built or hand-assembled fixture (no bytes from any retail software) with a negative control that fails when the lowering is disabled.
- LLVM / Mesa semantics cited for each instruction or format.
- The existing
tests/startup_gfx2hlsl_*_check.pyandtests/startup_translator_check.pystill passing. - Refuse precisely what the change does not cover.
Related: #1723 (refusal census over an offline archive), #1978 (a census mode that reports every refusal site, not only the first).
Other parts: #1996 (pixel shaders), #1998 (mesh shaders), #1999 (render state and indirect draws), and the compute part filed alongside this one.
Metadata
Metadata
Assignees
Labels
priority: P0Highest project priority
Activity
consolelogkyo commentedon Nov 24, 2026
I'll take item E (
v_cvt_f32_u32and the float-resultVEC_U_TO_Fconversions in SDWA form with output modifiersclamp,mul:2,mul:4,div:2). I'll apply the output modifier and clamp in hardware order (scale first, saturate second, then bitwisedst_sel/dst_unusedplacement), keepVEC_Uinteger/uint-result conversions and float source modifiers refused, and verify with constructed SDWA encodings, negative controls, and desktop GPU readback.AI-assisted.
Ybucaille commentedon Nov 25, 2026
I'll take three small items in
tools/startup/gfx2hlsl.py, one pull request each:v_xor3_b32: same semantics as the compute lowering in shader: lower compute v_xor3_b32 #1573, with a source-built fixture whose three sources differ in every byte and a negative control that drops the third operand.16_16_SNORMbuffer format only (the other two formats stay open): an entry next toBUF_FMT_16_16_UNORM, with -32768 clamped to -1.0 per the D3D/Vulkan SNORM rule, and controls on 0x8000, 0x8001, 0x7fff and 0.v_cvt_pk_u8_f32: byte select from src1, insertion into src2, rounding and clamping cited from LLVM 15 and checked against the existingcompute_store_aotform if there is one.Each keeps refusing what its fixture doesn't cover.
AI-assisted.
Ybucaille commentedon Nov 25, 2026
Item I is up in #2097 (
v_xor3_b32, extendsstartup_gfx2hlsl_bit_alu_check.py). Item G is up in #2099 (16_16_SNORMonly, extendsstartup_vertex_fetch_formats_check.py). Controls and the llvm-mc fixture checks pass on Linux; the_warp/_hardwaredraws still need a Windows run. Item K is in progress.AI-assisted.
startup: lower SDWA output modifiers on float-result conversions
R0Y00 commentedon Nov 25, 2026
Item E is on main in #2062 at 7aa3b53. The Windows rerun used FXC and DXC on WARP and RTX 4060 Laptop. Each draw matched 1,024 reference words, and all five output-modifier or destination-selection controls produced the expected mismatch. The remainder of this issue still has its own rows and claims.
Ybucaille commentedon Nov 25, 2026
Item K is up in #2101 (
v_cvt_pk_u8_f32, same restriction on S0 as the compute lowering: +0.0 or an integer in 1..255; constants outside are refused). Controls pass on Linux; the_warp/_hardwaredraws still need a Windows run.AI-assisted.
Add BUF_FMT_16_16_SNORM to the vertex fetch table
R0Y00 commentedon Nov 25, 2026
Item G is on main via #2099 (246a875). I reran the corrected SNORM readback at 0832296 on WARP and RTX 4060 Laptop. Both checked all 12 formats, 16 vertices each, with CPU byte decoding and nine compiled mutations. The typed-buffer route and DXGI format 37 mapping are in that PR; other format rows stay open.
Lower v_xor3_b32 in the startup gfx2hlsl translator
consolelogkyo commentedon Nov 25, 2026
I'll take item D (
image_loadwithd16at mip level zero intools/startup/gfx2hlsl.py). I'll narrow enableddmaskcomponents fromLoadto IEEE binary16 with an integer round-to-nearest-even helper (avoidingf32tof16truncation toward zero on normalized depth values) and pack them pairwise intoceil(popcount(dmask) / 2)destination VGPRs, keepimage_load_mipandimage_sample*d16forms refused, and verify with constructed MIMG encodings, negative controls, and desktop GPU readback againstDXGI_FORMAT_R16_UNORMandDXGI_FORMAT_R32G32B32A32_FLOATtextures on WARP and hardware.AI-assisted.
R0Y00 commentedon Nov 25, 2026
There is an overlapping item D implementation in #2119. Please coordinate there before starting a second base-load implementation. The common acceptance needs the bound view type, since float/normalized and integer loads require different conversion, and an input whose ties distinguish binary16 nearest-even from truncation. A source-built mip-zero normalized/float comparison can land first; keep mip and integer forms pending until the same contract is proved. Item I is on main in #2097; the source-built third-input omission fails the translated GPU check on WARP and RTX 4060 Laptop.
tedin7 commentedon Nov 25, 2026
Picking up Item B (buffer_load_format_x/xy/xyz format from runtime descriptor) with WARP readback tests.
consolelogkyo commentedon Nov 25, 2026
Item D is up in #2139 (
image_loadwithd16at mip level zero, verified with DXCps_6_0and FXCps_5_1againstR16_UNORMandR32G32B32A32_FLOATtextures and six negative controls on WARP and RX 9070 XT).AI-assisted.
tedin7 commentedon Nov 25, 2026
Picking up Item H (
v_min_u32with DPP control) and Item L (lane mask derived from descriptor data) as two separate PRs with D3D12 WARP readback tests.tedin7 commentedon Nov 25, 2026
Update: deferring Item H (
v_min_u32DPP) until one of the open DPP base PRs (#2038/#2140/#2141/#2143) lands onmainto avoid stacking a conflicting DPP base. Continuing with Item L.17 remaining items
shader: lower v_cvt_pk_u8_f32 for any binary32 source in gfx2hlsl
startup: accept fi:1 on the pixel-stage DPP16 quad forms under the wh…
gfx2hlsl: accept fi:1 on the pixel-stage DPP16 quad forms under the w…
consolelogkyo commentedon Nov 25, 2026
I'll take an Item F comparison-sampler slice for
image_sample_candimage_sample_c_lzintools/startup/gfx2hlsl.pyandsrc/startup_stubs/translated_sampler_bindings.h:SQ_TEX_CLAMP_BORDER(6) alongsideSQ_TEX_CLAMP_LAST_TEXEL(2) in X and Y with fixedSQ_IMG_SAMP_WORD3BORDER_COLOR_TYPE(TRANS_BLACK,OPAQUE_BLACK,OPAQUE_WHITE), keepingBORDER_COLOR_TYPE == REGISTER, half-border/mirror-once-border modes, and standalonepixel_aotchecks refused. I'll include source-built D3D12 draw readback (in-bounds, out-of-bounds, and bilinear border-edge blending across border colors) and negative controls on WARP and AMD hardware.AI-assisted.
shader: lower v_cvt_pk_u8_f32 for any binary32 source in gfx2hlsl (#2467
consolelogkyo commentedon Nov 25, 2026
Item F slice (
CLAMP_BORDER+ fixedBORDER_COLOR_TYPEforimage_sample_c/image_sample_c_lzand static/dynamic sampler decoding) is up in #2549 (016c68ad), verified with DXCps_6_0and FXCps_5_1across in-bounds, out-of-bounds, mixed-axis, bilinear border PCF, and four negative-control mutations on WARP and Radeon RX 9070 XT.AI-assisted.
startup: lower CLAMP_BORDER comparison samplers with fixed border col…
consolelogkyo commentedon Nov 25, 2026
I'll take the Item D explicit-mip follow-up: lowering
image_load_mipwithd16intools/startup/gfx2hlsl.py(2D, 3D and 2D-array views) on top of #2139'spack16_d16(pack16_rne+pack16_unorm16),d16srv <index> exactSRV validation, and odd-dmaskupper-half tracking, keeping computed16,a16andtferefused. I'll include source-built multi-mip D3D12 readback (includingR16_UNORMandR32G32B32A32_FLOATacross mips and slices) and negative controls on WARP and AMD hardware.AI-assisted.
consolelogkyo commentedon Nov 25, 2026
Item D explicit-mip follow-up (
image_load_mipwithd16on 2D, 3D and 2D-array views intools/startup/gfx2hlsl.py) is up in #2575 (28e58482), verified with DXCps_6_0and FXCps_5_1across two-mip (8x2+4x1) 2D and two-slice 2D-arrayR16_UNORMandR32G32B32A32_FLOATtextures, odd-dmaskupper-half poison checks, and 14 GPU negative-control mutations on WARP and Radeon RX 9070 XT.AI-assisted.
startup: lower D16 image_load_mip in gfx2hlsl (#2575)
SimSalabimse commentedon Nov 25, 2026
Claiming Item J (
s_bitset1_b32, and the natural pairs_bitset0_b32) intools/startup/gfx2hlsl.py.Plan: one focused PR on
mainate3dda42b. Port thepixel_aot/ #1579 lowering (D = D \| (1u << (S0 & 31))/ clear form), refuse lane-mask and descriptor destinations, hand-assembled SOP1 fixture with a negative control that fails when the lowering is disabled. Pure-Python CPU evaluation of the translated text; Windows WARP/hardware draws left for an independent retest if wanted.AI-assisted.
shader: lower s_bitset0/1_b32 in gfx2hlsl (#2023 Item J) (#2638)
Leyukaka commentedon Nov 26, 2026
@tedin7 taking over Item L since there has been no activity on it for 2 h (claimed in your 2026-11-25 01:40Z comment, last mentioned at 01:42Z; no PR, commit or comment on it since); will hand back if you resume.
On my local capture (counts and instruction shape only), 42 requests stop at
mask from descriptor data, with 43 refusal hits between them:s_mov_b64 vcc, s[n:n+1]wheres[n:n+1]holds descriptor words. In each, the first later references tovccors104..s107ares[104:107]as the descriptor operand ofs_buffer_load_dword*. Over all 43 hits, only one has any later write ofvccors104..s107. This looks like the compiler assembling a four-dword buffer descriptor whose upper half sits ins106/s107, whichvccaliases.s_mov_b64 exec, s[n:n+1]from descriptor data.Plan:
Record
s_mov_b64 vcc, s[n:n+1]from descriptor data as the descriptor symbols ofs106/s107and emit no code, reusing the shader: allow s_load into high SGPRs s[104:107] in gfx2hlsl (Part of #1723) #2057 path fors_loadintos[104:107], so thats[104:107]resolves to the same descriptor as the source registers.Keep it refused on any read of that
vccbefore it is overwritten, explicit or implicit:v_cndmask, the carry-in ofv_addc_co/v_subb_co/v_subbrev_co,v_div_fmas;vcc/vcc_lo/vcc_hisource operand of any scalar or vector instruction (VOPC e64, SDWA,s_and_saveexecand the like);s_cbranch_vccz/vccnz.The only accepted read is
s[104:107]as a descriptor operand.execfrom descriptor data stays refused.Tests: a hand-assembled pixel shader that builds the descriptor this way and loads through it, checked on WARP against the same load through the original registers, plus refusal controls for the reads above. A mutant that drops the copy must change pixels.
AI-assisted.
compute: accept gfx1013 image_atomic_umin on R32_UINT (Refs R0Y00#2618)…