pixel_aot: lower 12 integer SDWA forms (bitscan, sat_pk, mul24, co_ci) #2550
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!2550
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2550/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@KomaGuy on GitHub · 2026-11-25 20:31 UTC · original
KomaGuy:shader/sdwa-int-bit-mul24-coci→main· +386 −7 · 5 files · 3 commits · merged 2026-11-25 20:55 UTCSummary
Lowers 12 extended 32-bit integer
SDWAforms intools/pixel_aot.py(counted in bothdocs/coverage/gfx1013.tsvanddocs/coverage/rdna2.tsv), with static refusal controls,pixel_aot_sdwa_int_extra_{warp,hardware}draw tests, LLVM 15check_binaryfixtures, andform_coverage_checkcoverage assertions:v_bfrev_b32_sdwa,v_ffbl_b32_sdwa,v_ffbh_u32_sdwa,v_ffbh_i32_sdwav_sat_pk_u8_i16_sdwav_mul_u32_u24_sdwa,v_mul_i32_i24_sdwa,v_mul_hi_u32_u24_sdwa,v_mul_hi_i32_i24_sdwav_add_co_ci_u32_sdwa,v_sub_co_ci_u32_sdwa,v_subrev_co_ci_u32_sdwaContracts & Semantics
BYTE_0..3,WORD_0..1, orDWORDselection and optionalsext(), refusing float modifiers (-/|.|/abs()), inline constants, literals, unbalancedsext(), wrong arity,low16/half16tags, pending scalar loads, and outstanding samples.dst_sel+UNUSED_PAD/UNUSED_PRESERVE, refusingUNUSED_SEXT,UNUSED_PRESERVEon untracked/non-numeric destinations,clamp, andomod.v_{add,sub,subrev}_co_ci_u32_sdwa): Require matchingvcc/vcc_locarry-out and carry-in backed by a tracked condition, compute the full 32-bit carry/borrow-out intovccbefore SDWA destination placement, and chain cleanly into subsequent carry-in ops andv_cndmask_b32.SDWA_INTpreserved: New tableSDWA_INT_EXTRAkeeps existing 15-opSDWA_INTscanner/test assertions intact while updating the pre-SDWA refusal entries intests/pixel_aot_check.pyandtests/form_coverage_check.py.Verification
python3 tests/pixel_aot_check.py(including newcheck_sdwa_int_extra_controls)form_coverage_check:check_sdwa_int_extra_forms(+12 forms ingfx1013.tsvandrdna2.tsv, unlowered neighbours excluded, single-opcode removal control),check_shader_records,check_plain_bitscan_forms,check_sdwa_f16_forms,check_sdwa_cmp_coveragepython3 tests/docs_links_check.py,python3 tests/bidi_controls_check.py,python3 tests/rdna2_tools_check.py(156 tests OK)git merge-tree --write-tree --name-only origin/main HEADandgit diff --check origin/mainpixel_aot_binaryassembly/disassembly round-trips for all 3SDWA_INT_EXTRA_PROGRAMSfixturespixel_aot_sdwa_int_extra_warp/pixel_aot_sdwa_int_extra_hardwaredraws and all 13 mutations@tedin7 on GitHub · 2026-11-25 20:47 UTC · original · reviewed
Review of head
a711f7f4(comment only, no approval).Checked:
tools/pixel_aot.py: the 9 unary/binary SDWA forms reuse the existingINTEGERtable andsdwa_source/sdwa_dest. Arity, unbalancedsext(),UNUSED_SEXT, entry-mask, sample overlap and pending-load refusals are in place. The 3 carry-in forms compute the full 32-bit carry/borrow intovccbefore destination placement and require a tracked condition and matchingvcc/vcc_lo.SDWA_INTis left unchanged,form_coverage_check.pyreplaces the old rejectedv_mul_i32_i24_sdwaentry with a still-unsupported neighbour, and asserts that the 12 forms are covered in bothgfx1013.tsvandrdna2.tsvwhile the neighbours stay uncovered.pixel_aot_sdwa_int_extra_{warp,hardware}draws with per-op mutations that must report a mismatch. No other open or merged PR covers this slice.Commands run locally:
git diff --check origin/main...HEAD: cleanpython3 tests/docs_links_check.py: passpython3 tests/bidi_controls_check.py: passcheck_sdwa_int_extra_controls()(imported fromtests/pixel_aot_check.py): passcarry_out_tok != carry_in_tokrefusal makes the controls fail with "Expected rejection: Invalid carry-in operation". Reverted afterwards.Not run here: the D3D12 WARP draw test and
form_coverage_check.py(needsiced_x86). The Windows run comes next after updating the branch with main.AI-assisted; commands listed were executed locally.
@tedin7 on GitHub · 2026-11-25 20:54 UTC · original
Win2025 WARP receipt for head
650e0a32after updating with main.Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit
650e0a32ef6b46f6547a8c7a574ec2731d8e7942:--preset dev):cmake --build --preset dev -- -j 2):34.27s(configure2.00s)ctest --preset dev -R 'pixel_aot_sdwa_int_extra_warp|pixel_aot_check|form_coverage' --parallel 2 --no-tests=error --output-on-failure): 2/2 passed (13.24s:pixel_aot_sdwa_int_extra_warp6.95s,form_coverage13.11s)/O2(--preset release):cmake --build --preset release -- -j 2):37.66s(configure2.10s)ctest --preset release -R 'pixel_aot_sdwa_int_extra_warp|pixel_aot_check|form_coverage' --parallel 2 --no-tests=error --output-on-failure): 2/2 passed (16.59s:pixel_aot_sdwa_int_extra_warp7.82s,form_coverage16.47s)tests/form_coverage_check.pyok (11.4s),tests/mesh_clip_cull_check.pyok (4.2s),tests/mesh_dynamic_geometry_check.pyok (0.2s),tests/mesh_heap_sampler_check.pyok (0.6s),tests/pso_readiness_check.pyok (0.8s),tests/rdna2_tools_check.pyok (2.5s),tests/startup_gfx2hlsl_cmp16_check.pyok (0.2s),tests/startup_gfx2hlsl_f32_lg_check.pyok (1.1s),tests/startup_gfx2hlsl_f32_nan_check.pyok (4.2s),tests/startup_gfx2hlsl_sop2_complement_check.pyok (5.0s),tests/startup_gfx2hlsl_vopc_sdwa_check.pyok (4.0s),tests/startup_image_load_d16_check.pyok (0.8s),tests/startup_image_sample_a16_check.pyok (0.1s),tests/vk_offscreen.pyok (1.2s)sccache: 191/-11 hits; wall138.6sAI-assisted; commands listed were executed locally.