test(agc): skip the GDS M0 base 64-bit add without shaderBufferInt64Atomics #24072

Merged
Romannachwievor merged 1 commit from upstream-pr/24072 into main 2026-11-27 12:49:34 +00:00
Romannachwievor commented 2026-11-20 05:05:22 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Romannachwievor on 2026-11-20T05:05:22Z.


What

agc_driver_gds_m0_base runs a 64-bit GDS add as its last step. On a device without shaderBufferInt64Atomics the recompiler refuses that shader on purpose (64-bit GDS atomics need shaderBufferInt64Atomics, the rejection agc_driver_gds_integer_atomics64 checks), so the whole test fails there, after the 32-bit add and read steps already passed. This happens on Apple GPUs through MoltenVK.

The test now runs the 64-bit add only when the target has CapabilityInt64Atomics, and prints that it skipped it otherwise. The 32-bit add and read checks still run on every device. GdsIntegerAtomics64.cpp already skips on the same capability.

Tested

macOS 26.5, Apple M1, x86_64 Release under Rosetta 2, MoltenVK from LunarG SDK 1.4.363.0. Tree: main a4d1053d4b + #17425 and #11049 (needed to build on macOS), with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer, ctest --test-dir build-full -R '^agc_driver_gds_m0_base$' -V:

  • main: fails with ShaderRecompiler::Recompile: SPIR-V module emission failed: 64-bit GDS atomics need shaderBufferInt64Atomics.
  • This change: passes 3 of 3 runs and prints skipping the 64-bit add, the device has no shaderBufferInt64Atomics.
  • Both logs show Insert instance layer "VK_LAYER_KHRONOS_validation", neither shows was not found but was requested by env var VK_INSTANCE_LAYERS, and neither contains a VUID- message.

Not tested on a device that has shaderBufferInt64Atomics; there the code path is the same as before.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt and the licence notice of code adapted from upstream (see AGENTS.md)
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • 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
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: Apple M1 (8-core GPU), MoltenVK from LunarG SDK 1.4.363.0, macOS 26.5
  • AI-assisted: yes (Claude Code)

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5408085179 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/24072). Originally posted by [Romannachwievor](https://github.com/Romannachwievor) on 2026-11-20T05:05:22Z. --- ### What `agc_driver_gds_m0_base` runs a 64-bit GDS add as its last step. On a device without `shaderBufferInt64Atomics` the recompiler refuses that shader on purpose (`64-bit GDS atomics need shaderBufferInt64Atomics`, the rejection `agc_driver_gds_integer_atomics64` checks), so the whole test fails there, after the 32-bit add and read steps already passed. This happens on Apple GPUs through MoltenVK. The test now runs the 64-bit add only when the target has `CapabilityInt64Atomics`, and prints that it skipped it otherwise. The 32-bit add and read checks still run on every device. `GdsIntegerAtomics64.cpp` already skips on the same capability. ### Tested macOS 26.5, Apple M1, x86_64 Release under Rosetta 2, MoltenVK from LunarG SDK 1.4.363.0. Tree: `main` `a4d1053d4b` + #17425 and #11049 (needed to build on macOS), with `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer`, `ctest --test-dir build-full -R '^agc_driver_gds_m0_base$' -V`: - `main`: fails with `ShaderRecompiler::Recompile: SPIR-V module emission failed: 64-bit GDS atomics need shaderBufferInt64Atomics`. - This change: passes 3 of 3 runs and prints `skipping the 64-bit add, the device has no shaderBufferInt64Atomics`. - Both logs show `Insert instance layer "VK_LAYER_KHRONOS_validation"`, neither shows `was not found but was requested by env var VK_INSTANCE_LAYERS`, and neither contains a `VUID-` message. Not tested on a device that has `shaderBufferInt64Atomics`; there the code path is the same as before. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) and the licence notice of code adapted from upstream (see AGENTS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: Apple M1 (8-core GPU), MoltenVK from LunarG SDK 1.4.363.0, macOS 26.5 - [x] AI-assisted: yes (Claude Code) AI-assisted: yes (Claude Code)
MarcZX10 commented 2026-11-20 05:47:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T05:47:37Z.

Review: APPROVED


Reviewed — looks good

The reviewed change conditionally skips the 64-bit GDS add when the target lacks CapabilityInt64Atomics, while preserving the 32-bit add and read checks.

What I ran

Reviewed head f4e894d9ba59bcc034c1a62210b05e66fd1cec65 using the prepared review bundle and repo_read.py. No tests were run.

Results

Check Result Note
Diff and changed file passed One file reviewed
Tests not run Author-reported runs only

Findings

Blocking

None.

Non-blocking

None.

Not verified

No test execution was performed. The PR description reports three successful runs on macOS 26.5 with an Apple M1 under Rosetta 2 and MoltenVK; those results were not independently verified. No other files were changed or excluded according to the manifest.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5988115257 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/24072#pullrequestreview-5988115257). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-20T05:47:37Z. **Review:** APPROVED --- # Reviewed — looks good The reviewed change conditionally skips the 64-bit GDS add when the target lacks `CapabilityInt64Atomics`, while preserving the 32-bit add and read checks. ## What I ran Reviewed head `f4e894d9ba59bcc034c1a62210b05e66fd1cec65` using the prepared review bundle and `repo_read.py`. No tests were run. ## Results | Check | Result | Note | |---|---|---| | Diff and changed file | passed | One file reviewed | | Tests | not run | Author-reported runs only | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified No test execution was performed. The PR description reports three successful runs on macOS 26.5 with an Apple M1 under Rosetta 2 and MoltenVK; those results were not independently verified. No other files were changed or excluded according to the manifest. ## To get this to a good state Nothing is required.
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!24072
No description provided.