vk_bindless_test: ps_imgatomic no longer runs (and ignores) the ps_tex mirror and 3D T# checks #2211

Open
github-bot wants to merge 2 commits from github-bot/gh-2211 into main AGit
Owner

@⁠Tauwni on GitHub · 2026-11-26 06:19 UTC · original
Tauwni:fix/bindless-atomic-skips-tex-checks → main · +4 −3 · 1 files · 2 commits · draft

vk_bindless_test runs two shaders: ps_tex and ps_imgatomic. Commit 9f98dcc61 added two blocks of checks before the if (atomic_mode) block: the mirror/alias draws and the "a 3D T# read by a 2D op" draw. Those checks are written for ps_tex, since they expect its texels (orange, zeros) in the render target.

With ps_imgatomic they still run, using the atomic shader. Every compare() misses, because that target holds 1.0 or the 0.25 clear. The mismatches go to stderr, and the atomic path's return wrong || bad_rt ? 1 : 0; never looks at mismatches. run_gpu_tests.py then shows the first stderr line as the PASS detail. Seen on main a73a57e13 (Apple M3, MoltenVK 1.4.2):

PASS  ps_imgatomic          mirror: a 2D-array T# read by a 2D op pixel (5, 0): got 0.25 0.25 0.25 0.25, want 1 0.501961 0 1

The change:

  • The two blocks run only when !atomic_mode. ps_tex still runs them unchanged.
  • The atomic return also counts mismatches, so a ps_tex check misplaced ahead of it in the future fails instead of passing quietly.

After the change, on an Apple M3 (macOS 26.5.1), through scripts/run_gpu_tests.py --filter ps_tex / --filter ps_imgatomic:

Driver ps_tex ps_imgatomic
MoltenVK 1.4.2 PASS, 15 draws, 0 bad pixels PASS, 0 of 256 texels, 0 of 4096 RT pixels wrong
KosmicKrisp (Mesa 26.3.1) PASS, 38 draws, 0 bad pixels PASS, same
llvmpipe (Mesa 26.3.1) PASS, 38 draws, 0 bad pixels PASS, same

These were not run under the validation layer: on a Mac it needs the loader portability opt-in from #2178. The change is test-only and adds no Vulkan call.

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

🤖 Generated with Claude Code

**@⁠Tauwni** on GitHub · 2026-11-26 06:19 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2211) `Tauwni:fix/bindless-atomic-skips-tex-checks` → `main` · +4 −3 · 1 files · 2 commits · draft `vk_bindless_test` runs two shaders: `ps_tex` and `ps_imgatomic`. Commit 9f98dcc61 added two blocks of checks before the `if (atomic_mode)` block: the mirror/alias draws and the "a 3D T# read by a 2D op" draw. Those checks are written for `ps_tex`, since they expect its texels (orange, zeros) in the render target. With `ps_imgatomic` they still run, using the atomic shader. Every `compare()` misses, because that target holds 1.0 or the 0.25 clear. The mismatches go to stderr, and the atomic path's `return wrong || bad_rt ? 1 : 0;` never looks at `mismatches`. `run_gpu_tests.py` then shows the first stderr line as the PASS detail. Seen on `main` `a73a57e13` (Apple M3, MoltenVK 1.4.2): ```text PASS ps_imgatomic mirror: a 2D-array T# read by a 2D op pixel (5, 0): got 0.25 0.25 0.25 0.25, want 1 0.501961 0 1 ``` The change: - The two blocks run only when `!atomic_mode`. `ps_tex` still runs them unchanged. - The atomic return also counts `mismatches`, so a `ps_tex` check misplaced ahead of it in the future fails instead of passing quietly. After the change, on an Apple M3 (macOS 26.5.1), through `scripts/run_gpu_tests.py --filter ps_tex` / `--filter ps_imgatomic`: | Driver | `ps_tex` | `ps_imgatomic` | |---|---|---| | MoltenVK 1.4.2 | PASS, 15 draws, 0 bad pixels | PASS, 0 of 256 texels, 0 of 4096 RT pixels wrong | | KosmicKrisp (Mesa 26.3.1) | PASS, 38 draws, 0 bad pixels | PASS, same | | llvmpipe (Mesa 26.3.1) | PASS, 38 draws, 0 bad pixels | PASS, same | These were not run under the validation layer: on a Mac it needs the loader portability opt-in from #2178. The change is test-only and adds no Vulkan call. AI-assisted (Claude Code). No game data. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
9f98dcc61 put the mirror/alias and 3D-T#-read-by-a-2D-op checks before the
atomic_mode block, so ps_imgatomic drew them with its own shader: every
compare() missed (the target holds 1.0/0.25, not orange or zeros), the
mismatches went to stderr, and the atomic return ignored them. The runner
showed the first mismatch line as a PASS detail.

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

@⁠real-rusher on GitHub · 2026-11-26 10:06 UTC · original

Verified on main a73a57e1 with Mesa llvmpipe (Mesa 25.2.8, LLVM 20.1.2, 256 bits, Ubuntu 24.04 x86-64, no GPU), GCC 13, Ninja, llvm-mc 21.1.8. Merges cleanly.

  • main: run_gpu_tests.py --filter ps_imgatomic reports PASS, with a mismatch as its detail: "mirror: a 2D-array T# read by a 2D op pixel (5, 0): got 0.25 0.25 0.25 0.25, want 1 0.501961 0 1". This is the false pass the PR describes.
  • With this PR: ps_imgatomic PASS, "0 of 256 texels wrong (2D umax/umin/or 8x8 each, 3D umax 4x4x4); 0 of 4096 render-target pixels wrong (odd columns discarded)".
  • ps_tex is unchanged on both: PASS, 38 draws read back, 0 bad pixels.

AI-assisted: yes (Claude Code)

**@⁠real-rusher** on GitHub · 2026-11-26 10:06 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2211#issuecomment-7188922418) Verified on main a73a57e1 with Mesa llvmpipe (Mesa 25.2.8, LLVM 20.1.2, 256 bits, Ubuntu 24.04 x86-64, no GPU), GCC 13, Ninja, llvm-mc 21.1.8. Merges cleanly. - main: run_gpu_tests.py --filter ps_imgatomic reports PASS, with a mismatch as its detail: "mirror: a 2D-array T# read by a 2D op pixel (5, 0): got 0.25 0.25 0.25 0.25, want 1 0.501961 0 1". This is the false pass the PR describes. - With this PR: ps_imgatomic PASS, "0 of 256 texels wrong (2D umax/umin/or 8x8 each, 3D umax 4x4x4); 0 of 4096 render-target pixels wrong (odd columns discarded)". - ps_tex is unchanged on both: PASS, 38 draws read back, 0 bad pixels. AI-assisted: yes (Claude Code)
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/2211/head:github-bot/gh-2211'
git switch 'github-bot/gh-2211'

Merge

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