tooling: list the masked-region exec forms as supported in scan_unsupported_shaders #2223
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2231"
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-25T06:34:02Z.
pixel_aotlowers the structured masked region in its wave64 spellings (#651, #1315) and, under the wave32 profile, in its wave32 spellings (#2163, #2215).tools/scan_unsupported_shaders.pystill reported every exec line of such a region as unsupported, except the MOV close. Onmain,is_instruction_supportedreturnsFalsefors_and_saveexec_b64 s[60:61], vcc,s_or_b64 exec, exec, s[60:61],s_andn2_b64 exec, s[60:61], exec,s_cbranch_execz 2and their wave32 counterparts, even in programs the translator accepts.Change
SUPPORTED_INSTRUCTIONS_REGEXnow lists the formspixel_aotlowers:s_and_saveexec_b64 s[a:b], vcc|s[c:d]s_and_saveexec_b32 sN, vcc_lo|sMs_or_b64 exec, exec, s[a:b]s_or_b32 exec_lo, exec_lo, sNs_andn2_b64 exec, s[a:b], execs_andn2_b32 exec_lo, sN, exec_los_cbranch_execz <offset>As in
pixel_aot(sgpr_name,sgpr_pair, the skip check), the exec forms take only an aligned SGPR pair or an SGPR up tos105. The skip takes a 16-bit signed displacement without leading zeros (int(..., 0)would raise on010). The check applies only to these exec forms, so ordinary scalars_or_*/s_andn2_*lines keep their current verdict. Whether a line sits in a well-formed region is still decided by the translator. Thev_cmpxopeners are not listed here.Tests
Base
a7ecaaa5.tests/rdna2_tools_check.pywith LLVM 15.0.7 (LLVM_LIB,LLVM_MC,LLVM_OBJCOPY)test_masked_region_forms_are_supported, the accepted forms32767,-32768,0x7fff,-0x8000,s105,s[104:105])vccin the wave32 opener, odd or out-of-range pairs,s106, displacements outside 16 bits and010s_or/s_andn2linesanalyze_shader_instructions(wave_size=Noneand32)is_fully_supported, categoryacceptedshader_census_check,shader_probe_check,shader_corpus_report_check,startup_triage_run_checkCensus
supported_instructionscounts and percentages for shaders with masked regions rise accordingly.is_fully_supportedwas already decided by the translator and does not change.AI-assisted.
🤖 Generated with Claude Code
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T06:37:16Z.
Review: COMMENTED
Review of head
4aff062965(tools/scan_unsupported_shaders.py, tests/rdna2_tools_check.py).Findings: 0 P1, 0 P2.
is_instruction_supported(aligned SGPR pair, SGPR <= s105, 16-bit signed execz displacement) mirror pixel_aot's refusals. Leading-zero decimals such as010are refused; that is conservative and safe.Commands run locally (Linux):
python3 -B -m unittest tests.rdna2_tools_check.TestRdna2Scanner.test_masked_region_forms_are_supported-> OKpython3 tests/docs_links_check.py-> pass (18 files, 417 links)python3 tests/bidi_controls_check.py-> passgit diff --check origin/main...HEAD-> cleangit checkout -- .):0x7fff->0xffff_sgpr_pair_oks_or_b32 exec_losupported patterntests.rdna2_tools_check: 5 errors, identical on origin/main (not caused by this PR).Build and test on Windows= pass,Run platform-independent Python checks on Linux= pass. The PR touches only .py files, so the Python-only fast path applies.AI-assisted; commands listed were executed locally.