Skip to content

test(shader): cover integer image atomics - #381

Closed
asimplestray wants to merge 1 commit into
boykopovar:mainfrom
asimplestray:feat/shader-image-atomics
Closed

asimplestray wants to merge 1 commit into
boykopovar:mainfrom
asimplestray:feat/shader-image-atomics

Conversation

@asimplestray

@asimplestray asimplestray commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

What

Test-only follow-up: the 6 integer image atomics (IMAGE_ATOMIC_CMPSWAP/SUB/SMIN/SMAX/INC/DEC) have since landed in main via other work with full SPIR-V backend plus a Vulkan execution test, so this PR keeps only the decode-level regression test.

Adds the image_atomics test (decode opcode + family + image classification plus translation emitting the expected IR op for all 6 encodings, including the dmask=3 requirement for cmpswap).

Tested

Linux (GCC, BUILD_TESTING=ON, ANYPS5_ENABLE_SPIRV_TOOLS=OFF): full build, new test passes. Note: agc_driver_pixel_helper_lanes fails on current main independent of this PR (Vulkan pixel-helper assertion, no shader implementation touched here).

Checklist

  • Based on current main; no other open PR adds the same test (checked open shader PRs)
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (decoding unknown opcodes still throws)
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source (none added)
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes

@github-actions github-actions Bot added build shader core/shader agc libSceAgc* labels Oct 2, 2026
@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 2, 2026
@asimplestray
asimplestray force-pushed the feat/shader-image-atomics branch from 85a2e71 to 2bbb026 Compare October 2, 2026 21:50
@github-actions github-actions Bot added needs rebase Conflicts with main, rebase needed and removed needs rebase Conflicts with main, rebase needed labels Oct 2, 2026
@asimplestray
asimplestray force-pushed the feat/shader-image-atomics branch from 2bbb026 to 1e300bd Compare October 3, 2026 14:32
@asimplestray asimplestray changed the title feat(shader): implement integer image atomics test(shader): cover integer image atomics Oct 3, 2026
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 3, 2026
@asimplestray asimplestray reopened this Oct 3, 2026
@github-actions github-actions Bot mentioned this pull request Oct 4, 2026
9 tasks done
@github-actions

github-actions Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#295 core/libs/prx/libSceAgcDriver/CMakeLists.txt L806
#375 core/libs/prx/libSceAgcDriver/CMakeLists.txt L806
#423 core/libs/prx/libSceAgcDriver/CMakeLists.txt L806
#448 core/libs/prx/libSceAgcDriver/CMakeLists.txt L806

@oneandonlydean

Copy link
Copy Markdown
Collaborator

Thanks for this. core/libs/prx/libSceAgcDriver/tests/execution/ImageAtomics.cpp on main already runs all six of these integer image atomics (sub, smin, smax, inc, dec, cmpswap) on the GPU and checks the results, and #667 added the bitwise and unsigned ones next to it. That covers decoding and translation too, so a separate decode-level test doesn't add coverage, and I think this can be closed. If you see a case the execution tests miss (another dmask or a 64-bit form, for example), adding it there would be welcome.

@oneandonlydean

Copy link
Copy Markdown
Collaborator

As I mentioned on 10-06, tests/execution/ImageAtomics.cpp on main already runs all six of these integer image atomics on the GPU and checks the results, and #667 added the bitwise and unsigned ones. So I'm closing this as superseded. Thanks for the work.

If you find a case those tests miss (another dmask or a 64-bit form, for example), a PR adding it there is welcome. If you think I've missed something here, please reopen.

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

Labels

agc libSceAgc* build shader core/shader

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants