shader: decode s_and_saveexec_b32, v_mac_f32, v_cvt_f32_ubyte and v_mad_f32 in disasm_rdna2 #858

Merged
Holastor merged 1 commit from upstream-pr/864 into main 2026-11-23 14:44:48 +00:00
Holastor commented 2026-11-23 14:33:18 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Holastor on 2026-11-23T14:33:18Z.


Change

Decodes common scalar and vector arithmetic/conversion opcodes in tools/disasm_rdna2.py for RDNA 2 / GFX10:

  • SOP1 0x3c: s_and_saveexec_b32 (Wave32 execution mask save and bitwise AND with scalar source)
  • VOP2 0x1f: v_mac_f32_e32 (vector multiply-accumulate float32)
  • VOP1 0x11..0x14: v_cvt_f32_ubyte0_e32..v_cvt_f32_ubyte3_e32 (extract unsigned byte 0..3 and convert to float32)
  • VOP3A 0x141: v_mad_f32 (three-operand non-fused float32 multiply-add)

Also updates KNOWN_RDNA2_BASE_OPCODES in tools/scan_unsupported_shaders.py to recognize s_and_saveexec_b32 and v_mac_f32 directly without raw fallback.

Verification

  • python -B tests/rdna2_tools_check.py: 74/74 passed with new golden vectors covering all added instructions.
  • tests/rdna2_tools_check.py includes new instructions in test_llvm_comparison for verification against llvm-mc-15 in Ubuntu CI.
  • python -B tests/docs_links_check.py: passed (13 files, 172 links).
  • python -B tests/bidi_controls_check.py: passed (696 files).
  • python -B tests/form_coverage_check.py: passed.
  • python -B tests/pso_readiness_check.py: passed.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6561613377 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/864). Originally posted by [Holastor](https://github.com/Holastor) on 2026-11-23T14:33:18Z. --- ## Change Decodes common scalar and vector arithmetic/conversion opcodes in `tools/disasm_rdna2.py` for RDNA 2 / GFX10: - SOP1 `0x3c`: `s_and_saveexec_b32` (Wave32 execution mask save and bitwise AND with scalar source) - VOP2 `0x1f`: `v_mac_f32_e32` (vector multiply-accumulate float32) - VOP1 `0x11`..`0x14`: `v_cvt_f32_ubyte0_e32`..`v_cvt_f32_ubyte3_e32` (extract unsigned byte 0..3 and convert to float32) - VOP3A `0x141`: `v_mad_f32` (three-operand non-fused float32 multiply-add) Also updates `KNOWN_RDNA2_BASE_OPCODES` in `tools/scan_unsupported_shaders.py` to recognize `s_and_saveexec_b32` and `v_mac_f32` directly without raw fallback. ## Verification - `python -B tests/rdna2_tools_check.py`: 74/74 passed with new golden vectors covering all added instructions. - `tests/rdna2_tools_check.py` includes new instructions in `test_llvm_comparison` for verification against `llvm-mc-15` in Ubuntu CI. - `python -B tests/docs_links_check.py`: passed (13 files, 172 links). - `python -B tests/bidi_controls_check.py`: passed (696 files). - `python -B tests/form_coverage_check.py`: passed. - `python -B tests/pso_readiness_check.py`: passed.
upstream-sync closed this pull request 2026-11-24 06:45:09 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows!858
No description provided.