cs_imgatomic_ext: use the volume T# key vk_store_test now expects (GPU-IMG-ATOMIC-EXT-VOLUME-TAG) #1518

Open
github-bot wants to merge 1 commit from github-bot/gh-1518 into main AGit
Owner

@⁠PierreEbele on GitHub · 2026-11-25 03:09 UTC · original
PierreEbele:imgatomic-ext-volume-tag → main · +2 −2 · 1 files · 1 commits · open

cs_imgatomic_ext fails on main (f7838564) on every device:

FAIL  cs_imgatomic_ext      6 of 64 sint words differ; first word 32: got 0x0badf00d, expected 0x00000101

db19bbd3 gave the 4x4x4 volume in runtime/test/vk_store_test.cpp the D3D12 layer's whole-mip UAV tag (word 4 0x80000055, word 7 0xd7801800) and updated cs_imgatomic3d.asm to match. cs_imgatomic_ext.asm (#345) landed separately and still built the old 0x55 words in s12/s15. Its six 3D cases (swap/inc/dec/fmin/fmax/fcmpswap with glc, sint words 32..37) therefore missed the descriptor-table entry: the data registers kept their inputs and the volume was never touched.

This PR changes only those two s_mov_b32 lines, the same edit db19bbd3 made to cs_imgatomic3d.asm.

Tested on Mesa llvmpipe, Linux arm64. I ran python3 -I scripts/run_gpu_tests.py --build runtime/build/linux --filter cs_imgatomic natively, with LEONIDA_W64_EMULATE=1 and with LEONIDA_BARY_FALLBACK=1:

  • this branch: 3/3 passed in all three modes (cs_imgatomic, cs_imgatomic3d, cs_imgatomic_ext: all 64 words exact);
  • main's fixture: cs_imgatomic_ext fails as above (the full suite fails the same way in all three modes); the other two pass.

scripts/check_no_game_data.py is clean on the changed file.

Claimed in the coordination issue as: GPU-IMG-ATOMIC-EXT-VOLUME-TAG

AI-assisted.

🤖 Generated with Claude Code

**@⁠PierreEbele** on GitHub · 2026-11-25 03:09 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1518) `PierreEbele:imgatomic-ext-volume-tag` → `main` · +2 −2 · 1 files · 1 commits · open `cs_imgatomic_ext` fails on main (f7838564) on every device: ``` FAIL cs_imgatomic_ext 6 of 64 sint words differ; first word 32: got 0x0badf00d, expected 0x00000101 ``` db19bbd3 gave the 4x4x4 volume in `runtime/test/vk_store_test.cpp` the D3D12 layer's whole-mip UAV tag (word 4 `0x80000055`, word 7 `0xd7801800`) and updated `cs_imgatomic3d.asm` to match. `cs_imgatomic_ext.asm` (#345) landed separately and still built the old `0x55` words in s12/s15. Its six 3D cases (swap/inc/dec/fmin/fmax/fcmpswap with glc, sint words 32..37) therefore missed the descriptor-table entry: the data registers kept their inputs and the volume was never touched. This PR changes only those two `s_mov_b32` lines, the same edit db19bbd3 made to `cs_imgatomic3d.asm`. Tested on Mesa llvmpipe, Linux arm64. I ran `python3 -I scripts/run_gpu_tests.py --build runtime/build/linux --filter cs_imgatomic` natively, with `LEONIDA_W64_EMULATE=1` and with `LEONIDA_BARY_FALLBACK=1`: - this branch: 3/3 passed in all three modes (`cs_imgatomic`, `cs_imgatomic3d`, `cs_imgatomic_ext`: all 64 words exact); - main's fixture: `cs_imgatomic_ext` fails as above (the full suite fails the same way in all three modes); the other two pass. `scripts/check_no_game_data.py` is clean on the changed file. Claimed in the coordination issue as: GPU-IMG-ATOMIC-EXT-VOLUME-TAG AI-assisted. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
db19bbd3 gave the 4x4x4 volume in vk_store_test the D3D12 layer's whole-mip
UAV tag (word 4 0x80000055, word 7 0xd7801800) and updated cs_imgatomic3d.asm
to match. cs_imgatomic_ext.asm (#345) landed separately and still built the
old key, so its six 3D cases missed the descriptor-table entry and the fixture
failed on every device (6 of 64 sint words, first word 32 = 0x0badf00d).

AI-assisted.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:55:07 +00:00
Author
Owner

@⁠GeorgiyDemo on GitHub · 2026-11-25 03:20 UTC · original

Tested 1bbf8a9b7 on Apple M5 Pro (16-core GPU), macOS 26.7.3 (25G342), against main 0bc810504:

  • Rebuilt this head's vk_store_test (the binaries at the old build 66d4f5aa3 predate the db19bbd3 volume-tag change in runtime/test/vk_store_test.cpp).
  • GPU, --filter cs_imgatomic_ext: 1/1 PASS on MoltenVK 1.4.2 and 1/1 PASS on KosmicKrisp (Mesa 26.3.1) — "all 64 words of the uint image, the sint image and the volume exact".
  • Coverage: with the same binary and main's cs_imgatomic_ext.asm swapped in, the test FAILS with exactly the reported symptom: "6 of 64 sint words differ; first word 32: got 0x0badf00d, expected 0x00000101". So the two s_mov_b32 T# words are what fixes it.
  • --filter cs_imgatomic3d: PASS, the sibling volume fixture is unaffected.

AI-assisted; synthetic fixtures only, no game data.

**@⁠GeorgiyDemo** on GitHub · 2026-11-25 03:20 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1518#issuecomment-7151826379) Tested `1bbf8a9b7` on Apple M5 Pro (16-core GPU), macOS 26.7.3 (25G342), against `main` `0bc810504`: - Rebuilt this head's `vk_store_test` (the binaries at the old build `66d4f5aa3` predate the `db19bbd3` volume-tag change in `runtime/test/vk_store_test.cpp`). - GPU, `--filter cs_imgatomic_ext`: **1/1 PASS** on **MoltenVK 1.4.2** and **1/1 PASS** on **KosmicKrisp** (Mesa 26.3.1) — "all 64 words of the uint image, the sint image and the volume exact". - Coverage: with the same binary and `main`'s `cs_imgatomic_ext.asm` swapped in, the test **FAILS** with exactly the reported symptom: "6 of 64 sint words differ; first word 32: got 0x0badf00d, expected 0x00000101". So the two `s_mov_b32` T# words are what fixes it. - `--filter cs_imgatomic3d`: PASS, the sibling volume fixture is unaffected. AI-assisted; synthetic fixtures only, no game data.
Author
Owner

@⁠ytsodacan on GitHub · 2026-11-25 03:33 UTC · original · edited 2026-11-25 03:45 UTC

[KEEP]

  • Change is minimal and correct: two s_mov_b32 lines in runtime/test/shaders/cs_imgatomic_ext.asm (s12 = 0x80000055, s15 = 0xd7801800), matching the volume T# tag db19bbd3 gave cs_imgatomic3d.asm.
  • Independent verification exists in the existing comment (MoltenVK and KosmicKrisp pass; main's fixture reproduces the failure), and no overlapping open PR was found.
  • Holding only because CI is still pending (linux-gpu-tools, macos, windows, no-game-data, change-scope); mergeStateStatus is UNSTABLE, no conflicts. Looks ready to merge once those go green.
**@⁠ytsodacan** on GitHub · 2026-11-25 03:33 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1518#issuecomment-7152031230) · edited 2026-11-25 03:45 UTC **[KEEP]** - Change is minimal and correct: two `s_mov_b32` lines in `runtime/test/shaders/cs_imgatomic_ext.asm` (s12 = 0x80000055, s15 = 0xd7801800), matching the volume T# tag db19bbd3 gave `cs_imgatomic3d.asm`. - Independent verification exists in the existing comment (MoltenVK and KosmicKrisp pass; main's fixture reproduces the failure), and no overlapping open PR was found. - Holding only because CI is still pending (`linux-gpu-tools`, `macos`, `windows`, `no-game-data`, `change-scope`); mergeStateStatus is UNSTABLE, no conflicts. Looks ready to merge once those go green.
Author
Owner

@⁠adrianmjim on GitHub · 2026-11-25 07:54 UTC · original

Checked 1bbf8a9b7 on AMD: Radeon RX 7900 XT (RDNA3), AMD driver 32.0.32029.2010 (26.11.2), Windows 11 build 26300, test programs from a main 42537e7b6 build.

  • main's fixture fails here the same way: cs_imgatomic_ext gives 6 of 64 sint words differ; first word 32: got 0x0badf00d, expected 0x00000101. It is the only failure in the whole GPU suite (244/263 passed, 18 skipped).
  • With this PR, --filter cs_imgatomic passes all three fixtures, natively and with LEONIDA_W64_EMULATE=1: cs_imgatomic, cs_imgatomic3d and cs_imgatomic_ext, "all 64 words of the uint image, the sint image and the volume exact".

No game files.

**@⁠adrianmjim** on GitHub · 2026-11-25 07:54 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1518#issuecomment-7156381432) Checked `1bbf8a9b7` on AMD: Radeon RX 7900 XT (RDNA3), AMD driver 32.0.32029.2010 (26.11.2), Windows 11 build 26300, test programs from a `main` `42537e7b6` build. - `main`'s fixture fails here the same way: `cs_imgatomic_ext` gives `6 of 64 sint words differ; first word 32: got 0x0badf00d, expected 0x00000101`. It is the only failure in the whole GPU suite (244/263 passed, 18 skipped). - With this PR, `--filter cs_imgatomic` passes all three fixtures, natively and with `LEONIDA_W64_EMULATE=1`: `cs_imgatomic`, `cs_imgatomic3d` and `cs_imgatomic_ext`, "all 64 words of the uint image, the sint image and the volume exact". No game files.
Author
Owner

@⁠3L1A5-1 on GitHub · 2026-11-25 08:13 UTC · original

Checked 1bbf8a9b7 on NVIDIA, on native Windows: RTX 2060 SUPER 8 GB (Turing), driver 617.14, Windows 11 26300, 16 GB RAM. I used the test programs from a main 3f81d46ac build and ran scripts/run_gpu_tests.py --filter cs_imgatomic with only this PR's fixture swapped in.

  • main's fixture fails as described: cs_imgatomic_ext reports 6 of 64 sint words differ; first word 32: got 0x0badf00d, expected 0x00000101. cs_imgatomic and cs_imgatomic3d pass.
  • With this branch's fixture, all 3 tests pass natively (wave32) and with LEONIDA_W64_EMULATE=1. All 64 words are exact in each.

In the full suite on main 3f81d46ac, this is the only GPU test that fails here: 209/263 passed natively, 243/263 with LEONIDA_W64_EMULATE=1.

AI-assisted: yes

**@⁠3L1A5-1** on GitHub · 2026-11-25 08:13 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1518#issuecomment-7156770361) Checked `1bbf8a9b7` on NVIDIA, on native Windows: RTX 2060 SUPER 8 GB (Turing), driver 617.14, Windows 11 26300, 16 GB RAM. I used the test programs from a `main` `3f81d46ac` build and ran `scripts/run_gpu_tests.py --filter cs_imgatomic` with only this PR's fixture swapped in. - `main`'s fixture fails as described: `cs_imgatomic_ext` reports `6 of 64 sint words differ; first word 32: got 0x0badf00d, expected 0x00000101`. `cs_imgatomic` and `cs_imgatomic3d` pass. - With this branch's fixture, all 3 tests pass natively (wave32) and with `LEONIDA_W64_EMULATE=1`. All 64 words are exact in each. In the full suite on `main` `3f81d46ac`, this is the only GPU test that fails here: 209/263 passed natively, 243/263 with `LEONIDA_W64_EMULATE=1`. AI-assisted: yes
Author
Owner

@⁠minimob1337 on GitHub · 2026-11-25 09:20 UTC · original

Tested on an RTX 4060 (NVIDIA 610.88, Windows 11, Vulkan SDK 1.4.363, llvm-mc 21.1.8) at main 237deb64c.

Without this PR, cs_imgatomic_ext fails: "6 of 64 sint words differ; first word 32: got 0x0badf00d, expected 0x00000101". None of the six 3D atomics touch the volume, and each data register keeps its D. With the same two-word T# change it passes, both native and with LEONIDA_W64_EMULATE=1.

A first-parent bisect of main puts the break at e79906a42 (the merge of #939). That merge made 3D atomics require the volume-UAV tag (docs/design.md, "1D and 3D texture UAVs") and updated cs_imgatomic3d's T#, but not this fixture's.

With the change applied, the full suite under LEONIDA_W64_EMULATE=1 is 244/263 passed, 19 skipped, 0 failed.

AI-assisted (Claude Code). No game files.

**@⁠minimob1337** on GitHub · 2026-11-25 09:20 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1518#issuecomment-7158198008) Tested on an RTX 4060 (NVIDIA 610.88, Windows 11, Vulkan SDK 1.4.363, llvm-mc 21.1.8) at main `237deb64c`. Without this PR, `cs_imgatomic_ext` fails: "6 of 64 sint words differ; first word 32: got 0x0badf00d, expected 0x00000101". None of the six 3D atomics touch the volume, and each data register keeps its D. With the same two-word T# change it passes, both native and with `LEONIDA_W64_EMULATE=1`. A first-parent bisect of main puts the break at `e79906a42` (the merge of #939). That merge made 3D atomics require the volume-UAV tag (`docs/design.md`, "1D and 3D texture UAVs") and updated `cs_imgatomic3d`'s T#, but not this fixture's. With the change applied, the full suite under `LEONIDA_W64_EMULATE=1` is 244/263 passed, 19 skipped, 0 failed. AI-assisted (Claude Code). No game files.
Author
Owner

@⁠mcpeacebir-lang on GitHub · 2026-11-25 09:51 UTC · original

Tested on real AMD hardware: RX 7800 XT (RDNA3, GFX1101), AMD 26.11.2 (LLPC), Windows 11, main 3f81d46ac.

Without this change: cs_imgatomic_ext fails 3 of 3 with "6 of 64 sint words differ; first word 32: got 0x0badf00d, expected 0x00000101", natively and under LEONIDA_W64_EMULATE=1.
With this PR's two-line change to cs_imgatomic_ext.asm: --filter cs_imgatomic passed 3 of 3 runs natively and 3 of 3 under LEONIDA_W64_EMULATE=1 (cs_imgatomic, cs_imgatomic3d, cs_imgatomic_ext: all 64 words exact).

**@⁠mcpeacebir-lang** on GitHub · 2026-11-25 09:51 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1518#issuecomment-7158894118) Tested on real AMD hardware: RX 7800 XT (RDNA3, GFX1101), AMD 26.11.2 (LLPC), Windows 11, main 3f81d46ac. Without this change: cs_imgatomic_ext fails 3 of 3 with "6 of 64 sint words differ; first word 32: got 0x0badf00d, expected 0x00000101", natively and under LEONIDA_W64_EMULATE=1. With this PR's two-line change to cs_imgatomic_ext.asm: --filter cs_imgatomic passed 3 of 3 runs natively and 3 of 3 under LEONIDA_W64_EMULATE=1 (cs_imgatomic, cs_imgatomic3d, cs_imgatomic_ext: all 64 words exact).
Author
Owner

@⁠Tauwni on GitHub · 2026-11-25 10:02 UTC · original

Tested on an Apple M3 (macOS 26.5.1) at main 626d1281a, on three Vulkan drivers:

Driver main with this PR
MoltenVK 1.4.2 FAIL (20/20, 6 of 64 sint words differ; first word 32: got 0x0badf00d, expected 0x00000101) PASS
KosmicKrisp (Mesa 26.3.1) FAIL (20/20, same words) PASS
llvmpipe (Mesa 26.3.1) FAIL (same words) PASS

cs_imgatomic and cs_imgatomic3d pass on all three either way. On main the volume keeps every fill and sint words 32-37 hold their data registers, so none of the six 3D ops runs. The fixture passes at 367d91ef, where it was added; git bisect --first-parent gives #939 as the first bad commit, which is where 3D atomics started to require the volume UAV tag and cs_imgatomic3d got it (db19bbd34). Same two lines as here. AI-assisted (Claude Code).

**@⁠Tauwni** on GitHub · 2026-11-25 10:02 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1518#issuecomment-7159135586) Tested on an Apple M3 (macOS 26.5.1) at `main` `626d1281a`, on three Vulkan drivers: | Driver | `main` | with this PR | |---|---|---| | MoltenVK 1.4.2 | FAIL (20/20, `6 of 64 sint words differ; first word 32: got 0x0badf00d, expected 0x00000101`) | PASS | | KosmicKrisp (Mesa 26.3.1) | FAIL (20/20, same words) | PASS | | llvmpipe (Mesa 26.3.1) | FAIL (same words) | PASS | `cs_imgatomic` and `cs_imgatomic3d` pass on all three either way. On `main` the volume keeps every fill and sint words 32-37 hold their data registers, so none of the six 3D ops runs. The fixture passes at `367d91ef`, where it was added; `git bisect --first-parent` gives #939 as the first bad commit, which is where 3D atomics started to require the volume UAV tag and `cs_imgatomic3d` got it (`db19bbd34`). Same two lines as here. AI-assisted (Claude Code).
Author
Owner

@⁠Anzymanz on GitHub · 2026-11-25 13:45 UTC · original

Confirmed on real RDNA4: AMD Radeon RX 9070 XT, RADV (Mesa 26.2.6), CachyOS, at main 5e95fa2. On main, cs_imgatomic_ext fails with the same signature (6 of 64 sint words, word 32 got 0x0badf00d) in the full suite and in 3 of 3 isolated reruns. With this branch applied, cs_imgatomic, cs_imgatomic3d and cs_imgatomic_ext all pass (64 words exact), both native and LEONIDA_W64_EMULATE=1, and the full run_gpu_tests.py goes from 243/263 (1 failed) to 244/263 (0 failed). Recorded in #1870. AI-assisted.

**@⁠Anzymanz** on GitHub · 2026-11-25 13:45 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1518#issuecomment-7164250537) Confirmed on real RDNA4: AMD Radeon RX 9070 XT, RADV (Mesa 26.2.6), CachyOS, at main 5e95fa2. On main, `cs_imgatomic_ext` fails with the same signature (6 of 64 sint words, word 32 got 0x0badf00d) in the full suite and in 3 of 3 isolated reruns. With this branch applied, `cs_imgatomic`, `cs_imgatomic3d` and `cs_imgatomic_ext` all pass (64 words exact), both native and `LEONIDA_W64_EMULATE=1`, and the full `run_gpu_tests.py` goes from 243/263 (1 failed) to 244/263 (0 failed). Recorded in #1870. AI-assisted.
Author
Owner

@⁠fiestorra on GitHub · 2026-11-25 13:56 UTC · original

Replication data point for this fixture, from a native RDNA2 device, in case it helps confirm the change:

  • Host: Windows 11, Ryzen 7 7800X3D, AMD Radeon gfx1036 iGPU, driver 32.0.21045.29003, main 77baf9062, vk_compute_test.exe built from 98c2f77 (RelWithDebInfo, MSVC 14.44), llvm-mc 21.1.8.
  • python -I scripts/run_gpu_tests.py --filter cs_imgatomic_ext: FAIL cs_imgatomic_ext 6 of 64 sint words differ; first word 32: got 0x0badf00d, expected 0x00000101, deterministic (4 of 4 runs, two of them with LEONIDA_W64_EMULATE=1 forced, same six words).
  • On the same tree an RTX 4090 (driver 32.0.16.2124) with LEONIDA_W64_EMULATE=1 passes this fixture with PASS cs_imgatomic_ext, in the full suite as well (243/264 passed, 20 skipped, 0 failed).
  • Full suite on the gfx1036: 237/264 passed, 26 skipped, and this fixture is the only failure.

I have not tested this pull request, so I cannot say it fixes the gfx1036 case: the six words at 32 and up are consistent with the volume half of the fixture writing through the wrong key, which is what the change here is about, but that is an inference from the word index and not a measurement.

Written with an AI assistant.

**@⁠fiestorra** on GitHub · 2026-11-25 13:56 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1518#issuecomment-7164511523) Replication data point for this fixture, from a native RDNA2 device, in case it helps confirm the change: - Host: Windows 11, Ryzen 7 7800X3D, AMD Radeon gfx1036 iGPU, driver 32.0.21045.29003, `main` `77baf9062`, `vk_compute_test.exe` built from `98c2f77` (RelWithDebInfo, MSVC 14.44), llvm-mc 21.1.8. - `python -I scripts/run_gpu_tests.py --filter cs_imgatomic_ext`: `FAIL cs_imgatomic_ext 6 of 64 sint words differ; first word 32: got 0x0badf00d, expected 0x00000101`, deterministic (4 of 4 runs, two of them with `LEONIDA_W64_EMULATE=1` forced, same six words). - On the same tree an RTX 4090 (driver 32.0.16.2124) with `LEONIDA_W64_EMULATE=1` passes this fixture with `PASS cs_imgatomic_ext`, in the full suite as well (243/264 passed, 20 skipped, 0 failed). - Full suite on the gfx1036: 237/264 passed, 26 skipped, and this fixture is the only failure. I have not tested this pull request, so I cannot say it fixes the gfx1036 case: the six words at 32 and up are consistent with the volume half of the fixture writing through the wrong key, which is what the change here is about, but that is an inference from the word index and not a measurement. Written with an AI assistant.
Author
Owner

@⁠fiestorra on GitHub · 2026-11-25 14:04 UTC · original

Correction to my comment above: I misread my own run. The RTX 4090 does not pass this fixture — it fails with the same six words — so the failure is device-independent on current main, which fits the fixture-key change here.

The two numbers, side by side:

Run Result
what I wrote above "RTX 4090 ... PASS cs_imgatomic_ext ... 243/264 passed, 20 skipped, 0 failed"
what the log says (logs/gpu_4090_20261125.txt, rc=1) FAIL cs_imgatomic_ext 6 of 64 sint words differ; first word 32: got 0x0badf00d, expected 0x00000101; 243/264 passed, 20 skipped — 243 + 20 = 263 of 264, so one failed, and it is this one

I had taken 243/264 passed, 20 skipped for a clean run without adding the two numbers up. I also re-ran the whole suite after rebuilding vk_compute_test.exe at main 77baf9062 (the first runs used the 98c2f77 binaries): FAIL cs_imgatomic_ext at 243/264 passed and 20 skipped on the RTX 4090 with LEONIDA_W64_EMULATE=1, and at 237/264 passed and 26 skipped on the AMD gfx1036 iGPU (driver 32.0.21045.29003). The six words and the first divergent word (32) are the same in all of them, and forcing LEONIDA_W64_EMULATE=1 on the gfx1036 changes nothing.

So on 77baf9062 this fixture fails on an AMD RDNA2 device and on an NVIDIA device under the wave64 emulation alike, and it is the only failure in both suites. That strengthens the case for the change here rather than pointing at a driver.

Written with an AI assistant.

**@⁠fiestorra** on GitHub · 2026-11-25 14:04 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1518#issuecomment-7164711888) Correction to my comment above: I misread my own run. The RTX 4090 does **not** pass this fixture — it fails with the same six words — so the failure is device-independent on current `main`, which fits the fixture-key change here. The two numbers, side by side: | Run | Result | |---|---| | what I wrote above | "RTX 4090 ... `PASS cs_imgatomic_ext` ... 243/264 passed, 20 skipped, 0 failed" | | what the log says (`logs/gpu_4090_20261125.txt`, rc=1) | `FAIL cs_imgatomic_ext 6 of 64 sint words differ; first word 32: got 0x0badf00d, expected 0x00000101`; `243/264 passed, 20 skipped` — 243 + 20 = 263 of 264, so one failed, and it is this one | I had taken `243/264 passed, 20 skipped` for a clean run without adding the two numbers up. I also re-ran the whole suite after rebuilding `vk_compute_test.exe` at `main` `77baf9062` (the first runs used the `98c2f77` binaries): `FAIL cs_imgatomic_ext` at 243/264 passed and 20 skipped on the RTX 4090 with `LEONIDA_W64_EMULATE=1`, and at 237/264 passed and 26 skipped on the AMD gfx1036 iGPU (driver 32.0.21045.29003). The six words and the first divergent word (32) are the same in all of them, and forcing `LEONIDA_W64_EMULATE=1` on the gfx1036 changes nothing. So on `77baf9062` this fixture fails on an AMD RDNA2 device and on an NVIDIA device under the wave64 emulation alike, and it is the only failure in both suites. That strengthens the case for the change here rather than pointing at a driver. Written with an AI assistant.
Author
Owner

@⁠ammonium231 on GitHub · 2026-11-26 00:04 UTC · original

Tested the fixture from 1bbf8a9b7 on RTX 3090 (NVIDIA 621.40, Windows 11 26320) at main db1a22d2.
On main, cs_imgatomic_ext is the only GPU failure (209/264 native, 243/264 with LEONIDA_W64_EMULATE=1): "6 of 64 sint words differ; first word 32: got 0x0badf00d, expected 0x00000101". With this change it passes both modes: "all 64 words of the uint image, the sint image and the volume exact".

**@⁠ammonium231** on GitHub · 2026-11-26 00:04 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1518#issuecomment-7178357674) Tested the fixture from 1bbf8a9b7 on RTX 3090 (NVIDIA 621.40, Windows 11 26320) at main db1a22d2. On main, cs_imgatomic_ext is the only GPU failure (209/264 native, 243/264 with LEONIDA_W64_EMULATE=1): "6 of 64 sint words differ; first word 32: got 0x0badf00d, expected 0x00000101". With this change it passes both modes: "all 64 words of the uint image, the sint image and the volume exact".
Author
Owner

@⁠kevincommits on GitHub · 2026-11-26 09:12 UTC · original

Independent run on Apple hardware. Apple M5 Pro (20-core GPU), macOS 27.2.1 (26B131), MoltenVK and the Vulkan loader from Homebrew, Python 3.14.2, Homebrew LLVM 23.1.6. I merged main at a73a57e13 into the branch locally (584 commits behind, no conflicts). Head tested: 1bbf8a9b7.

On this GPU cs_imgatomic_ext fails on main exactly as described, and passes with this change.

Command on both trees: python3 -I scripts/run_gpu_tests.py --build <build dir> --filter cs_imgatomic

tree cs_imgatomic cs_imgatomic3d cs_imgatomic_ext
main at a73a57e13 PASS PASS FAIL: 6 of 64 sint words differ; first word 32: got 0x0badf00d, expected 0x00000101
this branch merged with main PASS PASS PASS: all 64 words of the uint image, the sint image and the volume exact

The two new words also match what the test program builds for the volume on main (runtime/test/vk_store_test.cpp: {0x5000, fmts[1] << 20, 0x55, 0x55, 0x80000055, 0x55, 0x55, 0xd7801800}) and what cs_imgatomic3d.asm already loads.

One caveat about my setup: both rows use the same test programs, which I built from main earlier in this session (an older commit than a73a57e13, already with the whole-mip volume tag); only the shader fixtures differ between the rows.

Not tested: other GPUs and the rest of the GPU suite with this change. No game files used. AI-assisted.

**@⁠kevincommits** on GitHub · 2026-11-26 09:12 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1518#issuecomment-7187587750) Independent run on Apple hardware. Apple M5 Pro (20-core GPU), macOS 27.2.1 (26B131), MoltenVK and the Vulkan loader from Homebrew, Python 3.14.2, Homebrew LLVM 23.1.6. I merged `main` at `a73a57e13` into the branch locally (584 commits behind, no conflicts). Head tested: `1bbf8a9b7`. **On this GPU `cs_imgatomic_ext` fails on `main` exactly as described, and passes with this change.** Command on both trees: `python3 -I scripts/run_gpu_tests.py --build <build dir> --filter cs_imgatomic` | tree | `cs_imgatomic` | `cs_imgatomic3d` | `cs_imgatomic_ext` | |---|---|---|---| | `main` at `a73a57e13` | PASS | PASS | FAIL: `6 of 64 sint words differ; first word 32: got 0x0badf00d, expected 0x00000101` | | this branch merged with `main` | PASS | PASS | PASS: `all 64 words of the uint image, the sint image and the volume exact` | The two new words also match what the test program builds for the volume on `main` (`runtime/test/vk_store_test.cpp`: `{0x5000, fmts[1] << 20, 0x55, 0x55, 0x80000055, 0x55, 0x55, 0xd7801800}`) and what `cs_imgatomic3d.asm` already loads. One caveat about my setup: both rows use the same test programs, which I built from `main` earlier in this session (an older commit than `a73a57e13`, already with the whole-mip volume tag); only the shader fixtures differ between the rows. Not tested: other GPUs and the rest of the GPU suite with this change. No game files used. AI-assisted.
Author
Owner

@⁠real-rusher on GitHub · 2026-11-26 09:34 UTC · original

Verified on current main (a73a57e) with Mesa llvmpipe on x86-64 (Mesa 25.2.8, LLVM 20.1.2, 256 bits, Ubuntu 24.04, no GPU). Runtime built with GCC and Ninja, llvm-mc 21.1.8.

  • main alone: cs_imgatomic_ext fails, "6 of 64 sint words differ; first word 32: got 0x0badf00d, expected 0x00000101".
  • With this PR's change to runtime/test/shaders/cs_imgatomic_ext.asm applied on top of a73a57e (it applies cleanly): run_gpu_tests.py --filter cs_imgatomic passes 3/3 (cs_imgatomic, cs_imgatomic3d, cs_imgatomic_ext) in 3 of 3 runs natively and in 3 of 3 runs with LEONIDA_W64_EMULATE=1.

AI-assisted: yes (Claude Code)

**@⁠real-rusher** on GitHub · 2026-11-26 09:34 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1518#issuecomment-7188173304) Verified on current main (a73a57e) with Mesa llvmpipe on x86-64 (Mesa 25.2.8, LLVM 20.1.2, 256 bits, Ubuntu 24.04, no GPU). Runtime built with GCC and Ninja, llvm-mc 21.1.8. - main alone: cs_imgatomic_ext fails, "6 of 64 sint words differ; first word 32: got 0x0badf00d, expected 0x00000101". - With this PR's change to runtime/test/shaders/cs_imgatomic_ext.asm applied on top of a73a57e (it applies cleanly): run_gpu_tests.py --filter cs_imgatomic passes 3/3 (cs_imgatomic, cs_imgatomic3d, cs_imgatomic_ext) in 3 of 3 runs natively and in 3 of 3 runs with LEONIDA_W64_EMULATE=1. AI-assisted: yes (Claude Code)
Author
Owner

@⁠Bonchaloo on GitHub · 2026-11-26 14:06 UTC · original

Verified on Apple M5 Max, macOS 27.3 (26C5047e), MoltenVK 1.4.2. On Leonida 1e0de21b0, cs_imgatomic_ext failed in both the default mode and with LEONIDA_W64_EMULATE=1: 6 of 64 signed-image words differed; word 32 was 0x0badf00d, expected 0x00000101.

Applied only this PR’s fixture diff from 1bbf8a9b7 to that checkout and kept the GPU harness binaries unchanged. Reran scripts/run_gpu_tests.py --filter cs_imgatomic_ext --require-pass with wave64 emulation off and on. Both passed: all 64 words matched for the unsigned image, signed image, and volume.

AI-assisted: yes.

**@⁠Bonchaloo** on GitHub · 2026-11-26 14:06 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1518#issuecomment-7194292823) Verified on Apple M5 Max, macOS 27.3 (26C5047e), MoltenVK 1.4.2. On Leonida `1e0de21b0`, `cs_imgatomic_ext` failed in both the default mode and with `LEONIDA_W64_EMULATE=1`: 6 of 64 signed-image words differed; word 32 was `0x0badf00d`, expected `0x00000101`. Applied only this PR’s fixture diff from `1bbf8a9b7` to that checkout and kept the GPU harness binaries unchanged. Reran `scripts/run_gpu_tests.py --filter cs_imgatomic_ext --require-pass` with wave64 emulation off and on. Both passed: all 64 words matched for the unsigned image, signed image, and volume. AI-assisted: yes.
Author
Owner

@⁠real-rusher on GitHub · 2026-11-26 14:25 UTC · original

Verified on two real GPUs on Windows 10 22H2 (19045.6456), with this PR's change to runtime/test/shaders/cs_imgatomic_ext.asm applied on main 73516a2 (it applies cleanly), standalone Vulkan test programs built with llvm-mingw, llvm-mc 23.1.6:

  • NVIDIA RTX PRO 3000 Blackwell Generation Laptop GPU (NVIDIA 610.47, Vulkan 1.4.341)
  • Intel Arrow Lake-HX iGPU (Intel 101.8132, Vulkan 1.4.325)

run_gpu_tests.py --filter cs_imgatomic: cs_imgatomic, cs_imgatomic3d and cs_imgatomic_ext pass 3/3 ("all 64 words of the uint image, the sint image and the volume exact") on both GPUs, native and with LEONIDA_W64_EMULATE=1. On main alone, cs_imgatomic_ext fails on both in both modes ("6 of 64 sint words differ; first word 32: got 0x0badf00d, expected 0x00000101"). Full runs are in #2348. This was also checked earlier on Mesa llvmpipe.

AI-assisted: yes (Claude Code)

**@⁠real-rusher** on GitHub · 2026-11-26 14:25 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1518#issuecomment-7194798959) Verified on two real GPUs on Windows 10 22H2 (19045.6456), with this PR's change to runtime/test/shaders/cs_imgatomic_ext.asm applied on main 73516a2 (it applies cleanly), standalone Vulkan test programs built with llvm-mingw, llvm-mc 23.1.6: - NVIDIA RTX PRO 3000 Blackwell Generation Laptop GPU (NVIDIA 610.47, Vulkan 1.4.341) - Intel Arrow Lake-HX iGPU (Intel 101.8132, Vulkan 1.4.325) run_gpu_tests.py --filter cs_imgatomic: cs_imgatomic, cs_imgatomic3d and cs_imgatomic_ext pass 3/3 ("all 64 words of the uint image, the sint image and the volume exact") on both GPUs, native and with LEONIDA_W64_EMULATE=1. On main alone, cs_imgatomic_ext fails on both in both modes ("6 of 64 sint words differ; first word 32: got 0x0badf00d, expected 0x00000101"). Full runs are in #2348. This was also checked earlier on Mesa llvmpipe. AI-assisted: yes (Claude Code)
github-bot force-pushed github-bot/gh-1518 from 1bbf8a9b70 to 7bcb5ba529 2026-11-26 16:01:26 +00:00 Compare
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1518/head:github-bot/gh-1518'
git switch 'github-bot/gh-1518'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1518'
git switch 'github-bot/gh-1518'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1518'
git switch 'github-bot/gh-1518'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1518'
git switch 'main'
git merge --squash 'github-bot/gh-1518'
git switch 'main'
git merge --ff-only 'github-bot/gh-1518'
git switch 'main'
git merge 'github-bot/gh-1518'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.