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

Open
opened 2026-11-26 21:20:26 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/2211
Author: @Tauwni
Created: 11/26/2026
Status: 🔄 Open

Base: main ← Head: fix/bindless-atomic-skips-tex-checks


📝 Commits (1)

  • 04a9f3a vk_bindless_test: ps_imgatomic skips the ps_tex mirror and 3D T# draws, and fails on a compare mismatch

📊 Changes

1 file changed (+4 additions, -3 deletions)

View changed files

📝 runtime/test/vk_bindless_test.cpp (+4 -3)

📄 Description

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


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/2211 **Author:** [@Tauwni](https://github.com/Tauwni) **Created:** 11/26/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/bindless-atomic-skips-tex-checks` --- ### 📝 Commits (1) - [`04a9f3a`](https://github.com/ubiquitarianism/leonida/commit/04a9f3a594c84426b990b5b5eeb80b687b8eb0ee) vk_bindless_test: ps_imgatomic skips the ps_tex mirror and 3D T# draws, and fails on a compare mismatch ### 📊 Changes **1 file changed** (+4 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `runtime/test/vk_bindless_test.cpp` (+4 -3) </details> ### 📄 Description `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) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#2214
No description provided.