shader: lower quad-local DPP16 and DPP8 cvt_flr, cvt_rpi, and cvt_pkrtz in pixel_aot #1934
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1941"
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?
Imported from R0Y00/Xbox2Windows. Originally posted by KomaGuy on 2026-11-24T21:57:17Z.
Summary
Follow-up to #421 lowering the remaining 3 non-scalar-f16 conversion DPP opcodes (6 forms total across
DPP16andDPP8ongfx1013andrdna2):v_cvt_flr_i32_f32_dpp&v_cvt_rpi_i32_f32_dpp(4 forms): Added toDPP_CVTintools/pixel_aot.py, reusing the sharedcvt_flr_i32_f32andcvt_rpi_i32_f32helpers (including NaN/inf/saturation from #1885), with DPP16abs/negbit modifiers and DPP8 modifier refusal.v_cvt_pkrtz_f16_f32_dpp(2 forms): Swizzlessrc0across the quad viaemit_quad_swizzle_u32, keepssrc1on the current lane, supports DPP16abs/negon either source (refused on DPP8), respectsHALF_ROUNDING_EXEMPT, and writes the same compressed-export pair tuple asv_cvt_pkrtz_f16_f32_e32(keeping non-export ALU reads refused).check_dpp_cvt_draw(pixel_aot_dpp_cvt_{warp,hardware}) withDPP_CVT_FLR_RPI(6 rows + 5 mutations) anddpp_pkrtz_program()(2 compressed-export rows + RTZ-vs-RNE wrong-reference mismatch + 4 routing/modifier mutations).check_dpp_cvt_refusals,check_binary(LLVM binary round-trip for both new fixtures),tests/form_coverage_check.py(all 6 forms counted ongfx1013.tsvandrdna2.tsv,_sdwakept excluded), anddocs/experiments.md.Verification
python3 -B tests/pixel_aot_check.py— passedpython3 -B tests/rdna2_tools_check.py— 149 tests OKform_coverage_check.check_shader_records()— passed (+6 DPP16/DPP8 forms ongfx1013andrdna2)llvm-mc-19 -triple=amdgcn--amdpal -mcpu=gfx1013and verified round-trip translation via bothdisasm_rdna2andlibLLVM-19.sodocs_links_check.py,bidi_controls_check.py,git diff --check— passedpixel_aot_dpp_cvt_warp) and LLVM 15 fixture assembly are pending CI.Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T22:06:01Z.
Review: COMMENTED
Review of head
f6c377b90f0701e7906e89730f40bcd774903590.Result: 0 P1, 0 P2. No blocking findings.
Read the full diff (tools/pixel_aot.py, tests/pixel_aot_check.py, tests/form_coverage_check.py, docs/experiments.md). No CMakeLists.txt change. Clean-room: no external code or vendor material, only the lowering and its tests.
Commands run:
python3 tests/pixel_aot_check.pyon Linux: PASSpython3 tests/docs_links_check.py: PASSpython3 tests/bidi_controls_check.py: PASSgit diff --check origin/main...HEAD: PASSgit merge-tree --write-tree --name-only origin/main HEAD: no conflictstests/form_coverage_check.pylocally needsiced_x86(not installed here); it ran and passed inside the Windows run and the Linux CI job passed.ctest -R '^pixel_aot_dpp_cvt_': 2/2 passed in each, plustests/pixel_aot_check.pyok.Mutations (each restored with
git checkout -- .):v_cvt_pkrtz_f16_f32_dpplowering, swap the (lo, hi) pair: Linux check does not see it, but both Win2025 draw testspixel_aot_dpp_cvt_warpandpixel_aot_dpp_cvt_hardwareFAIL with a pixel mismatch. Killed.cvt_rpi_i32_f32to the floor helper inDPP_CVT:tests/pixel_aot_check.pyfails (check_dpp_cvt_refusals). Killed.Notes (non-blocking): the new pkrtz result is a tuple that is only valid for compressed export; the docs state that non-export reads are refused.
AI-assisted; commands listed were executed locally.