mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:00:52 +01:00
[PR #857] [MERGED] tests: GPU fixtures for the ds_wrxchg2_rtn_b32 pair cases and ds_wrxchg2st64_rtn_b32 (TEST-WRXCHG2-B32-EXT) #895
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#895
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/857
Author: @ohshitwaddup
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/25/2026
Merged by: @aslan2142
Base:
main← Head:tests/gpu-wrxchg2-b32📝 Commits (1)
a9761abtests: GPU fixtures for the ds_wrxchg2_rtn_b32 pair cases and ds_wrxchg2st64_rtn_b32 (TEST-WRXCHG2-B32-EXT)📊 Changes
4 files changed (+201 additions, -5 deletions)
View changed files
📝
runtime/test/shaders/check.py(+8 -2)➕
runtime/test/shaders/cs_w32_wrxchg2_ext.asm(+91 -0)➕
runtime/test/shaders/cs_w32_wrxchg2st64.asm(+93 -0)📝
scripts/run_gpu_tests.py(+9 -3)📄 Description
Claimed in the coordination issue as: TEST-WRXCHG2-B32-EXT
Depends on: #413 (conflicts only — it rewrites this row's prose and I add fixtures plus runner lists; if it lands first I rebase onto it and re-check the row text).
What and why
docs/design.md'sds_wrxchg2_rtn_b32row namescs_w32_new_opsas its GPU fixture. That fixture compares only the first returned word anddata1in LDS — so four things the same row states had never run on a GPU:data0as the second exchange's return when both offsets name one dword,vdstaliasing the data VGPRs (the data must be read before the result is written),st64step at all (the row records it from a gfx1100 measurement, not from a fixture).Two branchless, one-lane fixtures (32 lanes on one LDS address would race — which lane's exchange runs first is up to the hardware, as the existing
cs_w32_new_opsheader notes):cs_w32_wrxchg2_ext.asm1/1on one dword: first exchange returns the old word, second returnsdata0(not the word the first wrote),M[0x204]ends asdata1, a seeded neighbour at0x700is untouched; thenvdstaliased onto the data VGPRscs_w32_wrxchg2st64.asmst64= 256 bytes: base0x80offsets1/2must address0x180/0x280The
st64fixture is built so the stride is proven, not assumed: it seeds0x84/0x88(where a 4-byte step would land) and0x140/0x2c0(one 256-byte step either side of the real elements), and requires all four to come back untouched. A translator that used the wrong unit fails on those words rather than passing by luck.Both judge all eight words in hex, and are registered in
runtime/test/shaders/check.py(CS_DUMPS,WAVE32_DUMPS,WAVE32_LANE_DUMPS) andscripts/run_gpu_tests.py(the shared branch, itscs_dump_wants, the wave32-waiver list and the hex list).Scope note: this deliberately does not edit the
docs/design.mdrow's prose — #413 is rewriting that row and owns it. Once #413 lands, the row can name these two fixtures in the same pass that names the others.Tested
On current
maind0da7da(the branch's base), Radeon RX 6900 XT (RDNA2 / GFX1030, Navi 21), RADV Mesa 26.2.4, Vulkan 1.4.354, Nobara Linux 44 (kernel 7.2.10), llvm-mc 22.1.8, SPIRV-Tools v2026.1, GCC 16.2.1:Both new fixtures pass in all four runs, with every word exact (16/16). Before this commit the same suite was 231/249 passed, 16 skipped, 2 failed on this card — the
+2 passedis exactly these two fixtures.The two failures in the full runs are
cs_imgload_tfeandcs_imgload_d16_tfe("r32 sint (sint view): 64 bad, texel(5,3) = 2071") — the pre-existing SHADER-1266 / #31 pair, reproduced from stockmainand unchanged by this commit.LEONIDA_W64_EMULATE=1gives byte-identical verdicts, as expected for single-lane shaders with no cross-lane operation.Also:
python -I scripts/check_no_game_data.pyon all four changed files is clean,python -m compileallontools tests scriptsand the two edited Python files passes, and the fixtures are LF with a trailing newline like the neighbouring.asmfiles.ctest/translator suite not run — no translator or runtime C++ change.GPUs tested: AMD Radeon RX 6900 XT (RDNA2, GFX1030, Navi 21, PCI 1002:73bf), RADV / Mesa 26.2.4, Vulkan 1.4.354, Nobara Linux 44 (Fedora 44), kernel 7.2.10-200.nobara.fc44.x86_64.
AI-assisted: yes (Hermes Agent) — wrote the two fixtures, derived their expected words from the ISA and the row, ran them, and registered them in both runners.
Checklist
mainand merges cleanly.docs/design.md— n/a, no translator change.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.