Skip to content

rdna2spirv/fspx_unpack/make_game: direct binary RDNA2 decode backend (#1901) - #2323

Open
SweatierKey wants to merge 5 commits into
ItsNotRexed:mainfrom
SweatierKey:rdna2-direct-translate
Open

SweatierKey wants to merge 5 commits into
ItsNotRexed:mainfrom
SweatierKey:rdna2-direct-translate

Conversation

@SweatierKey

Copy link
Copy Markdown
Contributor

Depends on #2038 (stacked on rdna2-direct-decoder). Completes the pure-Python RDNA2 decode integration for #1901 (claim: #1902 (comment)).

What this adds

  • tools/rdna2spirv.py: adds decode_binary_file() so translate() and the CLI accept native .fssm and fspx/*.code binaries directly (decoding straight into shader_ir via tools/rdna2_decode.py without spawning llvm-mc or writing/parsing .s text files). Direct decode preserves exact byte PCs across embedded undecodable data words, skipping the same_encoding re-anchoring scan and pruning unreachable data via fold_far_branches + reachable_code.
  • tools/fspx_unpack.py: adds --backend {llvm-mc,python} (default llvm-mc) forwarding wave32 to shader_disasm.disasm(), enabling zero-llvm-mc disassembly of all FSPX shaders including the v_dot4_i32_i8 op_sel:[0,1,0] op_sel_hi:[1,0,1] words llvm-mc rejects.
  • make_game.py: adds --disasm-backend {llvm-mc,python} (default llvm-mc). Under --disasm-backend python, preflight() does not require llvm-mc, disasm.done records a SHA-256 fingerprint of rdna2_decode.py + rdna2_isa_tables.py, and shaders() passes --backend python to shader_disasm.py.

Verification

  • python3 -m unittest tests/test_rdna2_direct_translate.py -v: 4/4 OK (direct .fssm and .code translation matches the .s text path byte-for-byte, embedded data word pruning, fspx_unpack --disasm --backend python decodes v_dot4_i32_i8 op_sel with 0 invalid words, make_game.py preflight succeeds without llvm-mc, spirv-val --target-env vulkan1.2 clean).
  • python3 -m unittest tests/test_rdna2_decode.py tests/test_fspx_unpack.py tests/test_shader_disasm.py tests/test_text_write_line_endings.py: 45/45 OK.
  • Synthetic fixtures only; no game files.

AI-assisted.

@Yourrespawn

Copy link
Copy Markdown
Contributor

Tested ca692f62 on NVIDIA GeForce RTX 4080 (Ada, subgroup 32..32), driver 617.14, Vulkan API 1.4.351, Windows 11 Pro 10.0.26200: pass.

  • New decode tests: test_rdna2_direct_translate OK (direct .fssm/.code translation matches the text path), test_rdna2_decode + test_fspx_unpack 30/30 (Python 3.12.10, llvm-mc 21.1.8 also present for the A/B)
  • Semantic suite: 2567 OK — the suite grew by ~900 tests with this branch's fixtures and everything passes
  • run_gpu_tests.py on the default path (llvm-mc, unchanged behaviour): 139/185 passed, 46 skipped (native wave64, expected on this 32-lane GPU)
  • valu_fuzz --family mem --programs 150 --seed 20 --emulate against the branch: 300/300 programs match, 0 mismatches

The default stays llvm-mc as described, so this lands zero behavioural change for existing setups while the --backend python path removes the dependency for the formats llvm-mc rejects (the v_dot4_i32_i8 op_sel case verified in the new tests).

AI-assisted (ZCode agent): builds and runs executed by a coding agent on this machine.

@sperm

sperm commented Nov 22, 2026

Copy link
Copy Markdown

Tested ca692f6 on AMD Radeon RX 9070 XT (RADV GFX1201) and the Ryzen 7 9800X3D iGPU (RADV RAPHAEL_MENDOCINO, gfx1036), Mesa 26.2.6, Linux 7.3.4: pass, no regressions.

  • Full python -I scripts/run_gpu_tests.py (Linux build of this branch's runtime/, LEONIDA_VK_DEVICE per GPU): 170/185 passed, 15 skipped, 0 failed on both GPUs. Compared with the same suite at the merge base 4947579 on the same machine, every test has the same result.
  • python -m unittest discover -s tests/semantic: 2567 OK
  • tests/test_rdna2_decode.py: 8 OK
  • tests/test_rdna2_direct_translate.py: 4 OK

No game files. AI-assisted.

@zneel

zneel commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Tested 5e517fb7 on AMD Radeon RX 9070 XT (RDNA4, subgroup 32..64), AMD 26.11.2, Windows 11 Pro 10.0.26300, AMD Ryzen 7 9800X3D CPU (64 GB RAM), Python 3.12.10: GPU suite passes. One decoder parity test fails..

Runtime and test programs built from this head (MSVC 14.51, Ninja, RelWithDebInfo), native Windows llvm-mc 21.1.8, Vulkan SDK 1.4.363.0. No game files.

run result
run_gpu_tests.py (whole suite, native wave64) 185/199, 14 skipped, 0 failed (main 49475796: 170/185)
same with LEONIDA_W64_EMULATE=1 185/199, 14 skipped, 0 failed
pytest tests/test_make_game_argparse.py tests/test_rdna2_decode.py tests/test_rdna2_direct_translate.py tests/test_translate.py 1 failed, 609 passed, 4 skipped, 13 subtests passed in 99.55s (0:01:39)

The failure is tests/test_rdna2_decode.py::test_parity_with_llvm_mc_on_shader_fixtures, on a fixture that came from main after this branch was written: runtime/test/shaders/ps_sdwa_f16_const.asm (d78546f, SDWA with an inline float constant).

ps_sdwa_f16_const.asm: v_add_f16_sdwa
  decoder:  [('vgpr', 2, ...), ('raw', 'sreg_242', False, False), ('vgpr', 1, ...)]
  llvm-mc:  [('vgpr', 2, ...), ('fimm', 1.0, False, False),       ('vgpr', 1, ...)]

For v_add_f16_sdwa v2, 1.0, v1 ... src0_sel:WORD_1, the Python decoder doesn't map an SDWA src0 with the S0 (scalar) bit set and value 242 to the inline constant 1.0, while llvm-mc does. The test stops at the first mismatch, so I don't know whether the fixture's s8 case decodes correctly. SDWA scalar sources probably need the same inline-constant table (128–208 integers, 240–248 floats) the other encodings use.

The GPU suite (default llvm-mc path) passes. I didn't run the --backend python / --disasm-backend python paths on the GPU.

AI-assisted (Claude Code); I checked the results.

@SweatierKey
SweatierKey force-pushed the rdna2-direct-translate branch from 5e517fb to 1487c0f Compare November 22, 2026 21:08
@SweatierKey

Copy link
Copy Markdown
Contributor Author

Thank you @zneel for the RX 9070 XT GPU check and for pinpointing that exact SDWA inline-constant mismatch on ps_sdwa_f16_const.asm!

Fixed in the base decoder PR #2038 (998128ec) and restacked here (1487c0fd):

  • Root cause: the VOP1, VOPC, and VOP2 SDWA decoders in tools/rdna2_decode.py called _sreg(..., 1) instead of _src(..., 1, None) when s0_is_sgpr / s1_is_sgpr was set, so codes >= 128 (inline integer constants 128..208 and inline float constants 240..248, including 1.0 = 242 and 2.0 = 244) fell through to raw sreg_<N>.
  • Fix: switched all three SDWA scalar-source decodes to _src(..., 1, None) and added test_sdwa_inline_constants_and_sgpr in tests/test_rdna2_decode.py covering all four SDWA instructions from ps_sdwa_f16_const.asm (v_add_f16_sdwa with 1.0 and s8, v_mul_f16_sdwa with 2.0, v_cvt_f16_u16_sdwa with 1.0) plus VOPC SDWA inline integers and disasm_bytes round-trip.
  • Verified: test_rdna2_decode.py (9/9 OK), test_rdna2_direct_translate.py (4/4 OK), test_text_write_line_endings.py (2/2 OK).

@sovljanskii

Copy link
Copy Markdown
Contributor

Tested 6dcbcbd merged onto main 561b65a on Apple M4, macOS 27.2.1, Python 3.15.2 and 3.12.16, llvm-mc 23.1.6: needs changes (a small fix: the direct path decodes with a different target than the text path)

  • PR and touched tests pass on 3.15 and 3.12: test_rdna2_direct_translate 6/6, test_rdna2_decode 15/15 (llvm-mc parity on runtime/test/shaders ran), test_make_game_argparse 36 (1 skipped), test_fspx_unpack 27 (1 skipped), test_shader_disasm 29, test_text_write_line_endings 3. compileall and git diff --check are clean.
  • Semantic suite python3.15 -I -m unittest discover -s tests/semantic: Ran 6150, OK (skipped=1, expected failures=1). Main gives the same result, and neither run has a failing test.
  • Default behaviour is unchanged. rdna2spirv.py <disasm> --shard 0/64 --no-asm gives 415/415 translated and 415 spirv-val valid, the same log as main, and all 415 .spv hashes match main.
  • Direct path, rdna2spirv.py <work>/shaders/dxbc/fssm --shard 0/64 (the same 415 shaders): 415/415 translated and 415 valid. 392 are byte-identical to the listing path. The other 23 come from stale listings in my work folder, written before shader_disasm.code_range started cutting the trailing data block. Once I regenerated those 23 listings with the current shader_disasm.py and llvm-mc, the text path matched the direct path byte for byte in 23/23. So no difference is left to sort by instruction family.
  • I also checked the 1,473 corpus listings where llvm-mc had reported undecodable words. After regenerating them, llvm-mc reports 0 invalid words in all of them, and the decoder's sweep finds 0 undecodable units. Direct against regenerated text: all 1,473 translate on both paths, all pass spirv-val, and all are byte-identical.
  • Decoder stream against the llvm-mc listings on the same shard: all 758,098 decoded instructions pair with a listing instruction. There are 0 opcode mismatches, 0 modifier mismatches and 0 unknown opcodes or undecodable words. The 150 argument differences are all in form only, and the translator treats both forms the same: 146 three-counter s_waitcnt come out as three operands instead of one, 1 all-max s_waitcnt comes out as a raw immediate, and 3 s_movk_i32 immediates are signed instead of unsigned. The 45,559 encoding differences (45,545 VOP3, 14 VOP3P) are llvm-mc re-encoding an unused source field (word 1 bit 25); the decoder keeps the real bytes.
  • Coverage gap: under the current code range, no shader in the 1.0.2.1 corpus has an undecodable word for either decoder. decode_reachable_direct (the invalid > 0 branch) therefore never runs on game shaders. Only the synthetic tests exercise it.
  • Defect 1: decode_reachable_direct defaults to mcpu="gfx1030" (tools/rdna2spirv.py:15733), and translate() calls it without passing a target (:15800). The linear decode in decode_binary_file uses decode_bytes's gfx1013 (:15726). This contradicts docs/design.md:262 ("The direct decoder defaults to gfx1013"). Synthetic FSSM test: v_mad_legacy_f32 (VOP3 0x140) followed by s_endpgm translates. The same code with one data word that an s_branch jumps over is refused as Unsupported(v_fma_legacy_f32).
  • Defect 2: decode_binary_file decodes FSPX .code with gfx1013 (the decode_bytes default, :15726). fspx_unpack.py --disasm defaults to gfx1030 because these are gfx103x programs (docs/fspx.md:144). Synthetic FSPX with VOP3 0x140: the .s path refuses v_fma_legacy_f32, but the direct .code path translates the word as the unfused v_mad_legacy_f32, which is different arithmetic. Fix: in decode_binary_file, set mcpu = "gfx1030" if path.endswith(".code") else "gfx1013", pass it to decode_bytes and store it in info, then call decode_reachable_direct(..., info["mcpu"]). I tried this locally: both synthetic cases then agree with the text path, and test_rdna2_direct_translate still passes. A 0x140 word in each format would make a good regression test.
  • Mutations: 10 of 16 were caught. Caught: reachable unknown word skipped instead of refused; decode_reachable_direct replaced by the linear sweep; unknown VOP3P length back to 4; permlane op_sel special case reverted; exp null kind back to target; preflight requiring llvm-mc under --disasm-backend python; fspx_unpack ignoring --backend; and three decoder field offsets (VOP3 src1, VOP1 vdst, DPP16 row_mask). Survived:
    • unknown VOP3 length back to 4: test_unknown_vop3p_and_vop3_preserve_full_instruction_size only builds a VOP3P word, despite its name;
    • shaders() dropping --backend python;
    • python_disasm_signature() ignoring file contents (the test checks only the digest length);
    • the overlap check in decode_reachable_direct removed;
    • .code ignoring the wave32 field in its json;
    • the CLI folder mode no longer falling back to .fssm/.code.
  • Spot checks against llvm-mc (gfx1013): I assembled 69 synthetic instructions covering every family (SOP*, SMEM, VOP1/2/C/3/3b/3P with literals, DPP16, DPP8, SDWA, MUBUF/MTBUF, MIMG including NSA, DS, GLOBAL/FLAT/SCRATCH, EXP, VINTRP), plus 11 wave64 VOPC/VOP3b forms. The permlane op_sel and exp null changes in this PR match llvm-mc. Two defects already on main, which the direct path now relies on: _HWREG_NAMES (tools/rdna2_decode.py:95) names ids 4/23/24 as HW_ID1/HW_ID2/POPS_PACKER, whereas LLVM on gfx10 prints 23 = HW_ID1, 24 = HW_ID2 and 4 as a number; and a scratch_* instruction with an saddr prints its vaddr field as a VGPR instead of off. Neither appears in the shard comparison, and the translator reads neither.
  • Smaller points: there are no docs for --disasm-backend, for fspx_unpack --backend or for .fssm/.code input to rdna2spirv.py, and rdna2spirv.py --help still says nothing about these inputs.
  • No GPU run: the PR adds no GPU fixture, and the default translator output is unchanged (hashes above).

AI-assisted.

kacper-serewis added a commit to kacper-serewis/Leonida that referenced this pull request Nov 23, 2026
Depends on: ItsNotRexed#5688 at 31ba693. Windows CPU: both focused tests and compileall passed. Re-ran both ItsNotRexed#2323 input paths at 6dcbcbd with local refusal recording on all 29 cached programs. spirv-val confirmed 18 retained and 11 newly validated identities, with no missing identities or regressions. The legacy run had 11 missing results, all explicit refusals in the updated listing run. No raw package or GPU. AI-assisted.
@SweatierKey
SweatierKey force-pushed the rdna2-direct-translate branch from 6dcbcbd to 039bdbb Compare November 23, 2026 14:52
@SweatierKey

Copy link
Copy Markdown
Contributor Author

Thanks @sovljanskii for the thorough corpus parity check (415/415 + 1,473/1,473 byte-identical, 758,098/758,098 instructions matched) and catching the mcpu target mismatch! Rebased onto main (1cc6e3c12) and pushed 039bdbb21:

  • Fixed Defect 1 & Defect 2 (tools/rdna2spirv.py): decode_binary_file now selects mcpu = "gfx1030" if path.endswith(".code") else "gfx1013", passes it to decode_bytes, records info["mcpu"], and passes it to decode_reachable_direct (whose default is now "gfx1013"). Also preserved main's fail-fast _out_inside_input ordering and added src help text for .s/.fssm/.code.
  • Regression & mutation-hardening tests:
    • tests/test_rdna2_direct_translate.py: added test_direct_mcpu_matches_text_path_for_vop3_0x140 (both plain and unreachable-data streams for .fssm = gfx1013 v_mad_legacy_f32 and .code = gfx1030 v_fma_legacy_f32), test_code_metadata_wave32_false_and_overlap_rejection, test_python_disasm_signature_tracks_file_contents, and CLI directory discovery on fspx/ (.code).
    • tests/test_rdna2_decode.py: added unknown 8-byte and 12-byte VOP3 (0x3FF) cases alongside VOP3P in test_unknown_vop3p_and_vop3_preserve_full_instruction_size.
    • tests/test_rdna2spirv_cli.py: updated the missing-src usage error check to match .s/.fssm/.code.

Verified locally on 039bdbb21 (Linux, Python 3.13.5, llvm-mc 18, spirv-as + spirv-val, LEONIDA_REQUIRE_SPIRV_TOOLS=1):

  • test_rdna2_direct_translate.py (9/9), test_rdna2_decode.py (16/16), test_rdna2spirv_cli.py (35/35, 1 skipped), test_make_game_argparse.py (36/36, 1 skipped), test_fspx_unpack.py (34/34, 1 skipped), test_shader_disasm.py (29/29) — all OK; py_compile and git diff --check clean.

@douline

douline commented Nov 23, 2026

Copy link
Copy Markdown

Tested 039bdbb on Intel Arc A770 (DG2), Mesa ANV 25.2.8, Ubuntu 24.04 / Linux 7.0, llvm-mc 21.1.8: pass, compared with main 399fa98 on the same machine.

  • run_gpu_tests.py: 171/235 passed, 61 skipped native (main: 173/237 passed, 61 skipped), 202/235 passed, 30 skipped with LEONIDA_W64_EMULATE=1 (main: 204/237 passed, 30 skipped). Translation: 241 shaders: 240 translated, 240 pass spirv-val.
  • No regressions against main.
  • Also failing on main on this GPU (known Mesa 25.2.8 issues, GPU test results (one comment per GPU and driver) #166): cs_fmt_int_narrow, cs_signed_zero_nan, ms_wave_info_s3
    No game files. Automated run on my machine, AI-assisted (Claude Code).

@Etr0p

Etr0p commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

FSPX backend comparison at the current head 2e2aa51 (base bc773d30), plus the cause of the pairs that still differ. My own Xbox 1.0.2.1 copy, Windows 11 Home 26200, Python 3.13, llvm-mc 23.1.6, --mcpu gfx1030, spirv-val from Vulkan SDK 1.4.363.0, CPU only:

llvm-mc listings --backend python
translated + spirv-val 21 / 29 (8 fall-through into undecodable words, SHADER-813) 29 / 29
of the 21 both accept, byte-identical SPIR-V 19

(fspx_unpack.py --disasm for each backend, then rdna2spirv.py --no-asm --wave64-emulate from this head for both. Main 09f6ce74 gives the same 21/29 and spirv-val results with the llvm-mc listings.)

The two differing pairs (programs 01 and 08) differ because of the wave size the listing is decoded with, not because of the decoder's spelling.

  • The dispatch state marks 5 of the 29 programs wave64 (kind 0 word 4 bit 20 clear): 00, 01, 06, 08, 09. 01 and 08 are the two that differ; 06 and 09 translate only through Python.
  • This branch passes wave32=meta.get("wave32", True) to the Python decoder, so those programs are printed in wave64 form (vcc, s[N:N+1] VOPC/VOP3 lane-mask operands). shader_disasm.disasm()'s llvm-mc path never passes a wave-size -mattr, so llvm-mc prints every program in wave32 form (vcc_lo, sN). That is also how the FSSM corpus listings look, wave64 or not.
  • Line classes that differ, 01: 28 spacing-only, 13 + 3 + 1 hex-vs-decimal immediates, 9 + 4 v_cmp_*_e64 sN vs s[N:N+1], 5 v_cmp_*_e32 vcc_lo vs vcc. 08: 3,584 v_dot4c_i32_i8 vs v_dot4c_i32_i8_e32, 27 v_cndmask_b32_e64 and 11 _e32 lane-mask operands, and a few more vcc_lo/vcc.
  • Check: I rewrote the llvm-mc listings of 01 and 08 into the Python spelling (v_dot4c_i32_i8_e32, NSA address lists without the space) and translated them with this head. The SPIR-V is byte-identical to the llvm-mc result, not the Python one. So only the lane-mask widths remain (01: 15,058 vs 15,250 SPIR-V instructions; 08: 133,795 vs 133,870).

Which form is right depends on how the translator reads a wave32-printed mask operand in a wave64 program. That is the convention every FSSM listing and the llvm-mc FSPX path use today, and the one the semantic tests were written against. Either pass wave32=True on the Python FSPX path for listing parity, or show (GPU readback on 01 or 08, or a semantic test) that the wave64 spelling translates to the same behaviour.

Counts and instruction classes only, nothing from the package leaves my machine. AI-assisted (Claude Code).

@TG0000

TG0000 commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Tested 2e2aa51 on AMD Radeon RX 6800 (RDNA2 gfx1030, AMD 26.11.2, Windows 11): pass

Trial merge of 2e2aa518 onto origin/main 8575d36e (clean merge, no C++/CMake changes, so the Vulkan test build from main was reused). Toolchain: clang 23.1.6 (llvm-mingw), llvm-mc 23.1.5, SPIRV-Tools v2026.4, CPython 3.12.10, pytest 9.2.0.

cmake -S runtime -B runtime/build-vk -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLEONIDA_BUILD_WINDOWS_RUNTIME=OFF
cmake --build runtime/build-vk
python -m compileall -q tools tests scripts make_game.py
python -I scripts/run_gpu_tests.py --llvm-mc <llvm-mc> --build runtime/build-vk --work <scratch>
python -m pytest -q tests/test_make_game_argparse.py tests/test_rdna2_decode.py tests/test_rdna2_direct_translate.py tests/test_rdna2spirv_cli.py
Check Bare main 8575d36e Merged
run_gpu_tests.py translate / spirv-val 245 / 245 245 / 245
run_gpu_tests.py GPU 221/239 pass, 17 skip, 1 fail 221/239 pass, 17 skip, 1 fail (same ms_wave_info_s3)
targeted pytest — 94 passed, 3 skipped, 520 subtests passed
  • The 17 skips are identical on main and the merge (13 run by the dedicated d3d12_* tests, ps_live_width by w64_graphics.py, ps_w64x_readlane: device cannot require a 64-wide subgroup).
  • The one failure is ms_wave_info_s3 (got (-1,-1,-1,-1)), a known failure on bare origin/main on this RX 6800, unrelated to this change.
  • No Vulkan validation errors or warnings in the logs. No game data was used; all inputs are the repository's hand-written fixtures.

AI-assisted (Claude Code).

@Hiiva

Hiiva commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Follow-up to the wave-size question in #2323 (comment): a synthetic semantic case supports keeping the dispatch-state wave size.

PR head was still 2e2aa5183935d11c68117b16e2087b5bd489f86a when I checked the discussion. These experiments use pristine main 99d799a648627a361ae7f1878a91622a25e91613 and its already-merged shader_disasm.disasm(..., backend="python", wave32=...) API, not a test of the entire PR head. Windows, CPython 3.14.6, llvm-mc 21.1.8, gfx1030, SPIRV-Tools v2026.4.rc2-0-gef96ed76 from Vulkan SDK 1.4.363.0.

The following wholly synthetic wave64 program was assembled with -mattr=+wavefrontsize64, decoded through each backend, then translated with a synthetic wave64 FSSM header:

s_mov_b32 s9, 0
v_cmp_eq_i32_e64 s[8:9], v0, 40
s_bcnt1_i32_b64 s10, s[8:9]
v_mov_b32_e32 v4, s10
v_lshlrev_b32_e32 v5, 2, v0
buffer_store_dword v4, v5, s[0:3], 0 offen
s_endpgm

One active comparison bit means every lane must store 1. Results from the existing native-wave and emulated-workgroup CPU interpreters agree:

Selected lane LLVM listing, default wave32 spelling Python wave32 spelling Python wave64 spelling
8, control 1 in all 64 lanes 1 in all 64 lanes 1 in all 64 lanes
40 0 in all 64 lanes 0 in all 64 lanes 1 in all 64 lanes

This demonstrates that forcing Python to wave32 for listing parity can lose an upper-half mask bit. It is not whole-program GPU equivalence evidence.

A separate existing LLVM21 text-path issue explains another differing shared translation: the existing synthetic test_fma_mix_literal.py values, decoded directly with LLVM21, retain the full literal in the printed encoding but truncate the text operand. Current repair only runs when the encoding bytes differ. The CPU result is 6.0 instead of 8.0; Python preserves the full literal and gives 8.0.

Private aggregate check at the same main pin: LLVM21 listings translate and validate 18/29 FSPX programs; Python listings using dispatch-state wave size translate and validate 29/29, with zero undecodable words. No game code or data is included here. No GPU test was run for this report.

@thiefyzheng

Copy link
Copy Markdown

checked: the three FAIL rows this PR's earlier GPU check surfaced are pre-existing on main, not introduced by this PR — measured at both the head and the merge base on two rigs (AI-assisted: an agent ran the filters; synthetic fixtures only, no game data; every line below verbatim from the runs):

  • 7900 XTX (RADV NAVI31, Mesa 25.2.8.2): head 2e2aa518: FAIL cs_w32_salu64 510274632 4660 0 4008636142 4008636142 4008636142 4008636142 4008636142 (105/110 passed, 4 SKIP). At the merge base bc773d30: the identical FAIL line, 0/1 passed.
  • Intel Arc (ARL, LEONIDA_W64_EMULATE=1): head: FAIL cs_fmt_int_narrow word 34: expected 0xffffffff, got 0x00000000 and FAIL cs_signed_zero_nan 0x80000000 0x80000000 0x80000000 0x8000 0x1 0x0 0x1 0x7c00 (104/110 passed, 4 SKIP). At the same merge base: both FAIL lines reproduce verbatim.

So the PR's compute state matches main's own on both vendors — the failing rows are main's, not this change's. Honest gap: main's full cs_ sweep at base did not complete on the XTX (a root-owned /tmp/leonida_cs_heap_init.bin collision in the harness between runs); the per-filter verdicts above are unaffected, and the sweep caveat is recorded as not run.

@SquishyGithub

Copy link
Copy Markdown

Tested 2e2aa5183 merged into main dde82f27e on NVIDIA GeForce RTX 3070 (Ampere), driver 620.70.06, Vulkan 1.4.357, subgroup 32..32, Linux (Bazzite 45; Fedora 45 distrobox, GCC 16.2.1, LLVM 23.1.5, SPIRV-Tools 2026.2, Python 3.15.2): pass

  • scripts/run_gpu_tests.py full suite: 192/241 passed, 48 skipped; with LEONIDA_W64_EMULATE=1: 223/241 passed, 17 skipped. Every test gives the same result as main at dde82f27e in both modes (the only failure in both is the known ms_wave_info_s3, fixed by rdna2spirv: store a mesh allocation from the first invocation of the wave that sends it (ms_wave_info_s3) #7136).
  • ctest: 61/61 passed.
  • pytest on the 4 changed test files (test_make_game_argparse, test_rdna2_decode, test_rdna2_direct_translate, test_rdna2spirv_cli): 95 passed, 2 skipped, 522 subtests passed.

One note: on main, test_rdna2_decode.py::test_parity_with_llvm_mc_on_shader_fixtures fails with llvm-mc 23.1.5 (v_permlane16_b32 in cs_w32_permlane_fi.asm: decoder op_sel:[0,1,0,0], llvm-mc op_sel:[0,1]). With this PR it passes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.