rdna2spirv: s_bitreplicate_b64_b32 into VCC, s_flbit_i32_b64 of a lane mask (SHADER-LANEMASK-BITREP-FLBIT) #593
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!593
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/lanemask-bitreplicate-flbit"
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?
Pull request successfully merged and closed
Item: SHADER-LANEMASK-BITREP-FLBIT (claimed in #14).
Two lane-mask forms the translator refused, both in pipeline-library compute programs that the retail boot creates through slot 67:
s_bitreplicate_b64_b32with a VCC destination. RDNA2 ISA SOP1: D[2i+1] = D[2i] = S0[i], so lane L's bit is S0 bit L // 2. EXEC already took this path (6ecd922d9); VCC now does the same and stores the lane's bit the waymov64stores a mask into VCC (0xFFFFFFFF / 0). Other lane-mask sources and destinations stayUnsupported.s_flbit_i32_b64of a lane mask (EXEC, VCC, a mask pair). It now reads the wave's whole mask as real bits throughwave_mask, ass_ff1_i32_b64already does: 63 minus the last active lane, -1 when none.s_flbit_i32_i64of a mask staysUnsupported.Tests (synthetic programs only):
tests/semantic/test_lane_mask_bitreplicate_flbit.py: both ops on every lane of a wave64 inspirv_mini_interp.run_workgroup; bitreplicate into VCC for 6 constants, flbit of EXEC for 6 masks and of a compare VCC for 5 lane counts.tests/semantic/test_salu_flbit_64.py: the old "lane mask is rejected" case now checkss_flbit_i32_i64, which stays rejected.docs/design.md: both contract rows updated, with how they are confirmed.Full suite:
python -I scripts/run_semantic_tests.py tests/semanticon this branch: 466 files, 6,111 tests, 1 file fails,test_image_cube_store_glc, which fails the same onmain(7430f59b2) without this change.Effect on the 1.0.2.1 boot (local work folder, RTX 4070 SUPER, Windows 11): 2 of the compute programs the title asked for and lacked (one per form) now translate and pass
spirv-val.AI-assisted (Claude Code). CPU-only checks; no GPU test run for this change.
🤖 Generated with Claude Code
Independent verification on
origin/main@1504c1af6(LEONIDA_REQUIRE_SPIRV_TOOLS=1):tests/semantic/test_lane_mask_bitreplicate_flbit.py:3/3PASS (test_bitreplicate_into_vcc,test_flbit_of_exec,test_flbit_of_vcc).tests/semantic/test_salu_flbit_64.py:5/5PASS (confirmss_flbit_i32_i64on lane mask remains rejected whileb64reads the wave mask).scripts/check_no_game_data.py: clean.AI-assisted: yes
Independent check (Windows 10 19045, CPython 3.12.10, CPU only, no game files): merged cleanly onto
main82a2aabcc,test_lane_mask_bitreplicate_flbit.py3 OK andtest_salu_flbit_64.py5 OK; withmain's tools the new file has 17 errors. Both result models in the test match the ISA text in its header as I read it. Semantic interpreter only, no GPU run. AI-assisted (Claude Code).