Skip to content

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

Draft
Tauwni wants to merge 2 commits into
ProjectLeonida:mainfrom
Tauwni:fix/bindless-atomic-skips-tex-checks
Draft

Tauwni wants to merge 2 commits into
ProjectLeonida:mainfrom
Tauwni:fix/bindless-atomic-skips-tex-checks

Conversation

@Tauwni

@Tauwni Tauwni commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

vk_bindless_test runs two shaders: ps_tex and ps_imgatomic. Commit 9f98dcc 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

…s, and fails on a compare mismatch

9f98dcc 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 <noreply@anthropic.com>
@real-rusher

Copy link
Copy Markdown

Verified on main a73a57e 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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants