tests: image atomics guard keeps a dynamic EXEC case #394
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!394
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/394/head"
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?
@Okamizs on GitHub · 2026-11-24 04:28 UTC · original
Okamizs:test-image-atomics-dynamic-exec→main· +41 −0 · 1 files · 1 commits · merged 2026-11-24 05:08 UTCClaimed in the coordination issue as: TEST-ATOMIC-GUARD follow-up (finding comment in #14)
What and why
Before: since #20 (by @wavehs),
find_guarded_texel_blockaccepts the foldedif (%true)guard when a shader never writes EXEC. Every case intest_image_atomics_guard.pyleaves EXEC alone, so all 49 subtests take that path and the check that a lane switched off at run time skips the image atomic was never exercised.After: a new test,
test_dynamic_exec_keeps_the_real_active_guard, switches lanes off before the atomic withv_cmp_gt_u32+s_and_saveexec_b32and withv_cmpx_gt_u32, coveringimage_atomic_add,swap,incandcmpswapon 2D and 3D images (16 subtests). Each case asserts the module stores to%activeand the atomic's block is entered through a branch on the loaded%active, then swaps that condition for%trueand asserts the helper rejects it.Test only: one file, 41 lines added. No translator change, so no new rule for
docs/design.md. Builds on #20 and does not change it. Stays off SHADER-1264: the EXEC writes here come from per-lane compares, not a computed SGPR value.Tested
python -m pytest tests/semantic/test_image_atomics_guard.py: before 49 subtests passed, after 65.exec_is_constant_truetoTruemakes the 16 new subtests fail while the old 49 still pass.python -I scripts/run_semantic_tests.py tests/semantic -j 4: 6103 tests before, 6104 after. The same 2 files failed in both runs (see limitations).python -m pytest tests/test_semantic_translator_use.py: 3 passed.Ran on the CPU only, in a Linux container with Python 3.13.
GPUs tested: n/a
Known limitations
spirv-asandspirv-valweren't installed locally, sotest_sopc_validationandtest_unary_f16_validationfailed before and after, and the new cases weren't run throughspirv-val. CI has SPIRV-Tools.spirv_wave_interp.pydoesn't model storage images yet.AI-assisted: yes (Claude helped write the test and this description)