shader: accept v_clrexcp and v_pipeflush as no-ops in pixel_aot #1800
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1807"
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 legacy-code-archaeologist on 2026-11-24T19:01:09Z.
Refs #1791
What
tools/pixel_aot.pyacceptsv_clrexcpandv_pipeflush, and their VOP3 encodingsv_clrexcp_e64andv_pipeflush_e64, as no-ops in the entry mask. This works exactly likev_nop/v_nop_e64. Any other mask and any operand are refused.7e008200andd5c10000 00000000arev_clrexcp;7e003600andd59b0000 00000000arev_pipeflush.v_pipeflushflushes a VALU destination cache.v_clrexcpclears the wave's exception state. Onlys_getreg_b32of the trap status could observe that, andpixel_aotlowers no such read. #1777 addeds_getreg_b32for the MODE rounding field only.Evidence
The check puts all four spellings after the sample wait of the standard sampled program, where v12 to v15 are live (
vop1_nop_program).check_vop1_nop_lowering, run from the no-argument controls):v_nopin each place;pixel_aot_vop1_nops_{warp,hardware}): the program is drawn against the sampled texture reference. A control that turnsv_pipeflushintov_mov_b32_e32 v13, 0must report a pixel mismatch.check_binarylist.Windows 11 Pro 26100.9168, DXC 10.0.26100, debug layer unavailable, commit
574f65faonecc6e6ce:Other runs:
pixel_aot_e64_spellings_{warp,hardware}still pass.python -B tests/pixel_aot_check.py(controls) exits 0.ctest --preset dev -E '_hardware$': 786/786.tools/form_coverage.py --gaps gfx1030no longer listsv_clrexcp,v_clrexcp_e64,v_pipeflushorv_pipeflush_e64.Not run locally:
tests/pixel_aot_check.py binary, because there is nollvm-mchere. Whether LLVM 15 assembles the_e64spellings is left to the Ubuntu job;v_nop_e64is the precedent.🤖 Generated with Claude Code
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T19:17:22Z.
Review: COMMENTED
Verified commit
574f65faed6e92a4d168ed96380317e15974e1d2(shader: accept v_clrexcp and v_pipeflush as no-ops in pixel_aot). No defects found.Diff & ISA review
tools/pixel_aot.py: acceptsv_clrexcp,v_clrexcp_e64,v_pipeflush, andv_pipeflush_e64as exact no-op lines in the entry mask before export, matchingv_nop/v_nop_e64. Non-entry masks raiseValueError, post-export placement is rejected, and any operands/modifiers/SDWA/DPP forms fall through toUnsupported instruction.tools/disasm_rdna2.py: verified VOP1 and VOP3A encodings (7e008200,d5c10000 00000000,7e003600,d59b0000 00000000) decode cleanly as operandless instructions for bothgfx1013andgfx1030viallvm-mc-19anddisasm_rdna2.decode_instruction.tests/pixel_aot_check.py&CMakeLists.txt: static HLSL equivalence withv_nop, non-entry mask and operand refusal checks,check_binaryfixture, andpixel_aot_vop1_nops_{warp,hardware}draw test withv_pipeflush->v_mov_b32_e32 v13, 0negative control. Clean-room documentation indocs/experiments.md.Commands executed locally
git diff --check origin/main...HEAD-> passpython -B tests/docs_links_check.py-> pass (17 Markdown files, 368 links)python -B tests/bidi_controls_check.py-> pass (1313 tracked files)python -B tests/pixel_aot_check.py-> passpython -B tests/rdna2_tools_check.py-> pass (148 tests, 18 skipped)python -B tests/form_coverage_check.py-> passllvm-mc-19/llvm-objcopy-19/libLLVM-19.sobinary round-trip ofvop1_nop_program()ongfx1013andgfx1030-> pass (120 bytes, 25 insns each, HLSL matches)--preset dev):cmake --build --preset dev --target offscreen_check -- -j 8+ctest --preset dev -R '^(pixel_aot_vop1_nops_warp|pixel_aot_e64_spellings_warp|pixel_aot_warp|rdna2_tools_check)$' --parallel 6 --no-tests=error --output-on-failure-> 4/4 passed (pixel_aot_vop1_nops_warp2.21s,pixel_aot_e64_spellings_warp4.80s,rdna2_tools_check11.26s,pixel_aot_warp16.41s)/O2(--preset release):cmake --build --preset release --target offscreen_check -- -j 8+ctest --preset release -R '^(pixel_aot_vop1_nops_warp|pixel_aot_e64_spellings_warp|pixel_aot_warp|rdna2_tools_check)$' --parallel 6 --no-tests=error --output-on-failure-> 4/4 passed (pixel_aot_vop1_nops_warp2.63s,pixel_aot_e64_spellings_warp5.40s,rdna2_tools_check12.83s,pixel_aot_warp17.22s)pixel_aot_check.py,rdna2_tools_check.py,form_coverage_check.py,docs_links_check.py,bidi_controls_check.py) -> all passtools/pixel_aot.py(restored viagit checkout -- .):"v_pipeflush"from accepted tuple ->tests/pixel_aot_check.pyfailed (rc=1)if mask != "entry"guard ->tests/pixel_aot_check.pyfailed (rc=1)AI-assisted; commands listed were executed locally.