test(agc): check MSAA storage emission without the device's support #2016

Merged
arvindfroi merged 1 commit from upstream-pr/2016 into main 2026-10-10 06:07:19 +00:00
arvindfroi commented 2026-10-09 05:07:54 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by arvindfroi on 2026-10-09T05:07:54Z.


What

PrepareMultisampledStorage in agc_driver_prepared_shaders (from 3e47c30e, 4b5a3952) only inspects the SPIR-V the recompiler emits for multisampled storage writes and atomics. It takes its target from the device, though. On a device without shaderStorageImageMultisample, such as MoltenVK, the emission fails with storage image multisampling is unavailable on the target device. The test and its _indirect, _uncached and _debug variants then fail.

The target now has the StorageImageMultisample capability, so the emission is checked on every device. The check that a target without it is refused still removes it. Nothing else changes.

Tested

macOS 27.0, Apple M3 Pro, MoltenVK 1.4.2. main does not build on macOS yet, and its GPU tests only run there with #2015, so I tested on main merged locally with the arm64 macOS libraries (mugurc/AnyPS5#3) and #2015.

  • Before: agc_driver_prepared_shaders, _indirect, _uncached and _debug failed with the message above.
  • After: all five agc_driver_prepared_shaders* tests pass.
  • On a device with shaderStorageImageMultisample, the target already had the capability, so nothing changes. Not run on Linux or Windows here.

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
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • 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 is added)
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes (Claude Code, Claude Opus 5.5)

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4796247152 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2016). Originally posted by [arvindfroi](https://github.com/arvindfroi) on 2026-10-09T05:07:54Z. --- ### What `PrepareMultisampledStorage` in `agc_driver_prepared_shaders` (from 3e47c30e, 4b5a3952) only inspects the SPIR-V the recompiler emits for multisampled storage writes and atomics. It takes its target from the device, though. On a device without `shaderStorageImageMultisample`, such as MoltenVK, the emission fails with `storage image multisampling is unavailable on the target device`. The test and its `_indirect`, `_uncached` and `_debug` variants then fail. The target now has the `StorageImageMultisample` capability, so the emission is checked on every device. The check that a target without it is refused still removes it. Nothing else changes. ### Tested macOS 27.0, Apple M3 Pro, MoltenVK 1.4.2. `main` does not build on macOS yet, and its GPU tests only run there with #2015, so I tested on `main` merged locally with the arm64 macOS libraries (mugurc/AnyPS5#3) and #2015. - Before: `agc_driver_prepared_shaders`, `_indirect`, `_uncached` and `_debug` failed with the message above. - After: all five `agc_driver_prepared_shaders*` tests pass. - On a device with `shaderStorageImageMultisample`, the target already had the capability, so nothing changes. Not run on Linux or Windows here. ### Checklist - [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) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [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 (none is added) - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes (Claude Code, Claude Opus 5.5) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Zheorgyan commented 2026-10-09 09:47:06 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Zheorgyan on 2026-10-09T09:47:06Z.


same setup as on #2015, all five agc_driver_prepared_shaders* tests pass on an M1 Pro with MoltenVK

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6078483912 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2016#issuecomment-6078483912). Originally posted by [Zheorgyan](https://github.com/Zheorgyan) on 2026-10-09T09:47:06Z. --- same setup as on #2015, all five `agc_driver_prepared_shaders*` tests pass on an M1 Pro with MoltenVK
rmz-24 commented 2026-10-09 11:54:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by rmz-24 on 2026-10-09T11:54:08Z.


Windows results on a device that has shaderStorageImageMultisample, as the description notes this wasn't run on Linux or Windows: Windows 11 Pro 25H2 (10.0.26200.9457), RTX 5060 Ti (NVIDIA 617.42), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON. 7fc025e1 cherry-picked onto current main d70b8998 (it applies cleanly).

  • All five agc_driver_prepared_shaders* tests pass, including _debug_failure.
  • Full ctest: 510/510 (one environment skip, guest_video_out_wqhd_detection_no_vulkan, same as on main).

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6080330420 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2016#issuecomment-6080330420). Originally posted by [rmz-24](https://github.com/rmz-24) on 2026-10-09T11:54:08Z. --- Windows results on a device that has `shaderStorageImageMultisample`, as the description notes this wasn't run on Linux or Windows: Windows 11 Pro 25H2 (10.0.26200.9457), RTX 5060 Ti (NVIDIA 617.42), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release, `-DANYPS5_ENABLE_SPIRV_TOOLS=ON`. 7fc025e1 cherry-picked onto current `main` d70b8998 (it applies cleanly). - All five `agc_driver_prepared_shaders*` tests pass, including `_debug_failure`. - Full ctest: 510/510 (one environment skip, `guest_video_out_wqhd_detection_no_vulkan`, same as on `main`). AI-assisted: yes
adriadam10 commented 2026-10-10 06:07:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-10T06:07:16Z.


Checked the change is test-only and keeps the "target without the capability is refused" case (it still erases the capability afterwards). agc_driver_prepared_shaders* (all five) pass locally on Linux/RADV, CI is green, and the M1 Pro (MoltenVK) and Windows/RTX 5060 Ti runs above confirm both sides; merging.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6094497075 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2016#issuecomment-6094497075). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-10T06:07:16Z. --- Checked the change is test-only and keeps the "target without the capability is refused" case (it still erases the capability afterwards). `agc_driver_prepared_shaders*` (all five) pass locally on Linux/RADV, CI is green, and the M1 Pro (MoltenVK) and Windows/RTX 5060 Ti runs above confirm both sides; merging.
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!2016
No description provided.