fix: the Python model refuses v_cndmask_b32's unreadable mask whatever EXEC holds #525
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/525"
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 LooperSalty/AnyXboxX. Originally posted by Luke-Ervin on 2026-11-27T16:54:18Z.
Change
The Python model (
emu/rdna2_exec_vop3.py) now refuses the VOP3 form ofv_cndmask_b32with an unreadable lane mask even when no lane is active, as the Rust port already does.S2 of
v_cndmask_b32(VOP3) is the lane mask, read as a scalar operand: an SGPR, an SGPR pair in wave64, or VCC. The model read it inside the loop over active lanes:So with EXEC = 0 the mask was never read. A mask the model refuses (a VGPR, or a reserved code such as 209) went through, and the instruction did nothing. With any lane active, the same instruction raised
Untranslated. The Rust port (vop3_forms.rs) reads the mask once, before the lanes, and refuses it in both cases. The two models therefore disagreed whenever an earlier instruction had switched every lane off, av_cmpxfor example:v_cndmask_b32 v3, v1, v2, <mask>(VOP3)v4or code 209error untranslatederror untranslatederror untranslatedv4or code 209error untranslatederror untranslatedWhy the Python side changes:
What changed: the mask is read once into
selectbefore the loop, and each lane takes its bit from it.Untranslated.docs/rust-full-status.mdanddocs/fr/rust-full-status.mdrecord the finding. No README row or test-count change (1969 collected with this change, still1900+).Linked issue: none.
Verification
Linux (Ubuntu, Python 3.13, Rust 1.98.1), on top of
mainata445308, withanyxboxx-rdna2-refbuilt bycargo build --release -p anyxboxx-rdna2-ref(no Rust change in this PR):Without the change in
rdna2_exec_vop3.py, the new tests fail: 3 failed, the twoEXEC = 0cases of the Python test and the parity test.Not run here: the 465 skipped tests, which need Windows, the C++ runtime,
dxcor a GPU. No Windows machine was available. No game was run.Oracle and test data
crates/anyxboxx-rdna2-ref,vop3_forms.rs), throughtests/test_rdna2_ref_parity.py, and the model's own rule for operands it cannot read (Untranslated).tests/test_rdna2_ref_parity.py, run on 120,000 more seeds onmain(with #402, #403, #437, #484, #501 and #502).v_cndmask_b32with a VGPR as its mask.test_cndmask_refuses_an_unreadable_mask_whatever_exec_holds(tests/test_rdna2_exec_vop3_more.py) runs a VGPR and a reserved code, each with all lanes active and with EXEC = 0.test_cndmask_mask_refusals_do_not_depend_on_exec_in_both_models(tests/test_rdna2_ref_parity.py) covers both models in wave32 and wave64: the refused masks with and without lanes, and VCC as a readable mask with and without lanes.test_cndmask_with_a_readable_mask_and_no_lane_writes_nothingchecks that a readable mask with EXEC = 0 still runs and leaves the destination unchanged.Checklist
E_NOTIMPL), never a fake success.test_readme_sync.pychecks it). No README change needed.This change was made with AI assistance (Claude Code): the difference was found, fixed and tested by the AI as described above. It was not tested on Windows.
🤖 Generated with Claude Code
Imported from LooperSalty/AnyXboxX. Originally posted by chatgpt-codex-connector[bot] on 2026-11-27T16:54:31Z.
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
b77565bℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.