test(agc): pin the 64-bit atomics emission failures #1563

Merged
kr4y4 merged 1 commit from upstream-pr/1563 into main 2026-10-09 08:04:03 +00:00
kr4y4 commented 2026-10-08 12:43:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by kr4y4 on 2026-10-08T12:43:34Z.


What

From the #1213 review: nothing pinned the FailEmit that #1213 added for 64-bit buffer atomics without shaderBufferInt64Atomics. The one next to it, for 64-bit image atomics without VK_EXT_shader_image_atomic_int64, had no test either.

verifyInt64AtomicCapabilities in ShaderMemory.cpp recompiles two compute programs, each against a target with and without the capability:

  • buffer_atomic_inc_x2 on a buffer:
    • without Int64Atomics, emission fails with 64-bit buffer atomics need shaderBufferInt64Atomics;
    • with it, the module declares Int64Atomics.
  • image_atomic_swap on a 32_32 UINT image:
    • without Int64ImageEXT, emission fails with 64-bit image atomics need VK_EXT_shader_image_atomic_int64;
    • with it, the module declares Int64ImageEXT.

It runs without a Vulkan device and sits next to verifyComputedTexelOffsets, the other capability-gated emission test. That placement keeps it clear of the open PRs that add tests at the end of main; git merge-tree shows no conflicts with any open PR that touches ShaderMemory.cpp.

The capability constants repeated in the tests, the other point from #1213, are in #1558.

Tested

Windows 11 (26200), WinLibs GCC 15.2.0 r7, CI configure flags, main at 07c2405c: agc_shader_memory passes.

Checked that the test catches each failure. Replacing either FailEmit with a no-op makes agc_shader_memory fail:

  • 64-bit atomics: a buffer_atomic_inc_x2 compiled without shaderBufferInt64Atomics
  • 64-bit atomics: an image_atomic_swap on a 32_32 image compiled without shaderImageInt64Atomics

Checklist

  • Based on current main; no other open PR implements the same thing
  • One topic per PR
  • No comments in code except technical debt
  • No silent stubs added
  • No notes, investigation files or images added to the repository
  • No new third-party code
  • Generic, not specific to one title
  • Depends on: none
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4786971913 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1563). Originally posted by [kr4y4](https://github.com/kr4y4) on 2026-10-08T12:43:34Z. --- ### What From the #1213 review: nothing pinned the `FailEmit` that #1213 added for 64-bit buffer atomics without `shaderBufferInt64Atomics`. The one next to it, for 64-bit image atomics without `VK_EXT_shader_image_atomic_int64`, had no test either. `verifyInt64AtomicCapabilities` in `ShaderMemory.cpp` recompiles two compute programs, each against a target with and without the capability: - `buffer_atomic_inc_x2` on a buffer: - without `Int64Atomics`, emission fails with `64-bit buffer atomics need shaderBufferInt64Atomics`; - with it, the module declares `Int64Atomics`. - `image_atomic_swap` on a 32_32 UINT image: - without `Int64ImageEXT`, emission fails with `64-bit image atomics need VK_EXT_shader_image_atomic_int64`; - with it, the module declares `Int64ImageEXT`. It runs without a Vulkan device and sits next to `verifyComputedTexelOffsets`, the other capability-gated emission test. That placement keeps it clear of the open PRs that add tests at the end of `main`; `git merge-tree` shows no conflicts with any open PR that touches `ShaderMemory.cpp`. The capability constants repeated in the tests, the other point from #1213, are in #1558. ### Tested Windows 11 (26200), WinLibs GCC 15.2.0 r7, CI configure flags, main at 07c2405c: `agc_shader_memory` passes. Checked that the test catches each failure. Replacing either `FailEmit` with a no-op makes `agc_shader_memory` fail: - `64-bit atomics: a buffer_atomic_inc_x2 compiled without shaderBufferInt64Atomics` - `64-bit atomics: an image_atomic_swap on a 32_32 image compiled without shaderImageInt64Atomics` ### Checklist - [x] Based on current `main`; no other open PR implements the same thing - [x] One topic per PR - [x] No comments in code except technical debt - [x] No silent stubs added - [x] No notes, investigation files or images added to the repository - [x] No new third-party code - [x] Generic, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No reviewers
No labels
No milestone
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.

Reference
boykopovar/AnyPS5!1563
No description provided.