Repository navigation
rdna2spirv: lower rotate and FFT wave swizzles - #4245
thatirishguyyy wants to merge 1812 commits into
Conversation
|
Tested 90c18f3 (merged with main aa2988c). The numeric path is correct: One regression: LLVM 20+ disassembles these offsets symbolically for gfx9+ (gfx1013 included), as
Main refuses these forms, while this PR translates them into a wrong lane mapping. Suggested fix: when Repro (from AI-assisted (Devin), CPU-only. |
Kam471
left a comment
There was a problem hiding this comment.
Ran this at 90c18f34 on Windows 11 with LLVM 21 and the SDK tools on the environment: python -I -m pytest tests/test_swizzle_numeric.py -q -> 7 passed; compileall and git diff --check clean. (Without the tools the module skips, which is the intended requires_tools behavior.)
The translator now decodes the numeric ds_swizzle_b32 offset: forms: 0xC000 rotates the low 5 lane bits by the encoded amount (with the direction bit), 0xE000 is the FFT butterfly (bit-reverse, then shift down by 27 + popcount(mask)), and both preserve the high lane bits and the mask bit. The new tests exercise the encoded offsets; the existing textual swizzle(...) and BITMASK paths still pass. No blocking issue.
|
Re-tested at d4faae7: the symbolic-operand fix works. One problem in the new test file: on its own it no longer collects.
AI-assisted (Devin), CPU-only. |
Flyander
left a comment
There was a problem hiding this comment.
At b98edb9 the root-level test import issue is fixed, and the symbolic ROTATE/FFT operands decode to the same lane arithmetic as their numeric encodings in the added cases. Independent review found no remaining actionable issue.
|
Tested |
|
Full-corpus check on the game copy (Xbox Series 1.0.2.1; Windows 11, RX 9070 XT). Counts only, no shader names or data. PR head Result: byte-identical to main.
No shipped shader is refused on main either: 26,503 of 26,503 translate. So the game corpus never reaches the rotate/FFT |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> # Conflicts: # docs/d3d12_vulkan.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> # Conflicts: # docs/design.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> # Conflicts: # docs/d3d12_vulkan.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er that main's planner no longer makes Since 70e739f (coalesce hoisted spine guards) the tail program is one tail scheduler, so test_tail_scheduler_after_a_mini_scheduler and the interpreter check of the mini scheduler's clears fail after the merge, though they pass on the branch (based on aa2988c). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…SHADER-820 (ItsNotRexed#4620) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…gn.md a file generated from docs/contracts/*.json The generated page was already out of step with this round's rows (test_design_contracts), and the PR also changes AGENTS.md, the PR template, ci.yml and adds an agent skill. docs/design.md keeps its current rows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…kips, v_cmpx's EXEC def, wave32-half shuffles, OpFOrdLessThanEqual in spirv_interp, fixed f64 div_fixup divergence, 10_11_11 stores; the macOS runtime configure requires Vulkan Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed shader_diff run exits 2 (ItsNotRexed#4448) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… does not carry The branch's only commit adds test_signature_includes_the_disassembler_tool_digest; llvm_mc_signature() still returns just the command and the version, so the test fails on the branch itself. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…are {} index is translated again (dry run), and the exported-asset credit tests use ItsNotRexed#3974's 370 GiB
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ItsNotRexed#4544's message), the readback test pins the PerVertexKHR fallbacks off, ttpf listings skip the decoder record, image_fuzz refuses a file --work before opening the oracle (ItsNotRexed#4087) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tsNotRexed#521), three close-parity copies now match WARP, the source-size checks start from 300x200 again after ResizeTarget, one test_attribute_trace in xmem_test Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rame (please rebase and split) With it, d3d12_xs reads list slot 48 as the console's IASetVertexBuffers, so the PC-shaped fixture list's ClearRenderTargetView never runs and Close fails. The branch also changes runtime/src/pe_loader.cpp and carried committed conflict markers in docs/fssm_crosscheck.md. Its docs rows go with it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ItsNotRexed#3315's, and xdxr_build_check fails with both Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…_xdxr_build_test writes (ItsNotRexed#2753's check) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s BLAS index check, not on the builder Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Tested
There is still no fixture in the repository for the rotate and FFT encodings, so this run shows that nothing else moved on Apple. It doesn't check the new lane mapping on a GPU. Your 384/384 RX 9070 XT check is the only hardware evidence for that. No game files. AI-assisted. |
|
Tested
The PR's diff is byte-identical to What was run
Negative control Anything surprising
AI-assisted (Claude Code). |
|
Tested
No game files. AI-assisted (Claude Code). |
PR 4245Head 48962db, merged onto origin/main 3faac55 with no conflicts (merge-tree ca894100). Verdict: pass. Raw logs: /tmp/claude-0/leonida-gpu/logs/gpu_p4245_*.log, p4245_swz.log, p4245_sem.log, main_sem.log Comment (not posted)Tested 48962db on NVIDIA GeForce RTX 5080 (driver 580.65.06), Linux, merged onto main 3faac55: pass
No game files. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> # Conflicts: # .github/workflows/runtime.yml # tests/test_first_look_shim_report.py
|
Tested AI-assisted. |
|
Tested f0bff79 merged with main 561b65a on Linux (WSL2), CPython 3.12.16, CPU only, and native Windows (CPython 3.13.1, llvm-mc 23.1.6 and spirv-as/spirv-val on PATH): pass.
|
|
Tested
No game files. AI-assisted. |
Review the five-file diff against upstream
561b65a. The default Files changed view includes upstream changes from the older PR base.Claimed in the coordination issue.
What and why
LLVM 18 emits numeric
ds_swizzle_b32offsets for rotate and FFT on synthetic gfx1013 inputs. This change lowers those encodings, selects lanes within each 32-lane half, and reuses the lane-read helper. Related to #3126, which covers inactive source lanes. Lane mapping reference: omonkeyz/xbox-emulator#186.Tested
aa2988c, minimal rotate and FFT shaders were refused withds_swizzle pattern. Both translate and passspirv-valwith this change.Checklist
docs/design.mdcontract table.AI-assisted (Codex).