test(agc): skip the readback test's storage migration without multisampled storage images #22078

Merged
GiannisG1 merged 1 commit from upstream-pr/22078 into main 2026-11-27 16:03:41 +00:00
GiannisG1 commented 2026-11-17 04:18:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by GiannisG1 on 2026-11-17T04:18:46Z.


What

agc_driver_native_color_readback fails on main (b412486d3e, after #20579) on an Intel HD Graphics 630 (Mesa 25.2.8 ANV, which reports shaderStorageImageMultisample = false):

native color readback: RGBA16F samples=2 coverage/fill/refusals/chunks passed
native color readback: RGBA16F samples=2 signed zeros/subnormals/infinities/NaN payload bits preserved
ShaderRecompiler::Recompile: SPIR-V module emission failed: storage image multisampling is unavailable on the target device

The four-sample pass of Readback() checks storage migration (fragments == Samples). It writes per-sample values with StoreSamples, a guest compute store to the multisampled target, which the recompiler can emit only with shaderStorageImageMultisample (SpirvDescriptors.cpp:139). The backtrace at ShaderRecompiler::FailEmit is Readback → StoreSamples → CompileProgram → ShaderRecompiler::Recompile. The test's fixture fails, not the driver's readback: the two-sample pass before it reads back through the same driver path and passes. Because the test stops there, its four- and eight-sample, integer-format and refusal cases never ran on such a device.

The stencil-plane check in the same file already gates its StoreSamples on context.storageImageMultisample (the if (context.storageImageMultisample) block in CheckClaimedTargets), and #7191 skips the multisampled target test the same way. This PR gates only the storage migration step on that flag and prints native color readback: storage migration skipped, the device lacks multisampled storage images. The sampled load before it (CheckUniform(LoadSamples(...), Ones, "before storage migration")) still runs on every device.

Tested

Linux Mint 22.3, kernel 7.0.0-38, GCC 13.3.0, Release, head on main b412486d3e, under Xvfb. ctest -R '^agc_driver_native_color_' (10 tests), 3 runs per device:

Device main this PR
Intel HD Graphics 630 (Mesa 25.2.8) 9 pass, native_color_readback fails as above 10 pass; the readback test prints the skip line, then passes its 4- and 8-sample, integer (elementBytes 1–16) and refusal cases
llvmpipe (Mesa 25.2.8) 10 pass 10 pass, storage migration still checked
NVIDIA GTX 1050 Ti (580.178.04) not rerun: the device has multisampled storage images, so the gated step runs as before 10 pass, storage migration still checked
  • llvmpipe with shaderStorageImageMultisample masked off (Khronos profiles layer) takes the skip and passes.
  • Validation layer (Khronos 1.4.363.1 from the LunarG SDK): VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, VK_LOADER_DEBUG=layer, ANYPS5_NO_SHADER_CACHE=1, ANYPS5_REQUIRE_VULKAN=1, ctest -V -j1 -R '^agc_driver_native_color_', on main 0766863ef6 and this PR's commit on it (it merges cleanly), on the HD 630, the GTX, llvmpipe and lavapipe (Mesa 26.0.8). The loader inserts the layer in all 10 tests on each device and none reports it as not found; neither side logs a VUID-, SYNC-HAZARD-, UNASSIGNED- or other validation message. On 0766863ef6, native_color_readback fails on the HD 630 as above and passes on the other three; with this PR all 10 pass on all four, and the HD 630 prints the skip line.
  • check_conventions.py, check_main_sync.py (merges cleanly) and check_compile.py are clean.
  • pr_overlap.py --branch could not compare #6808, #7642, #9508, #10193, #13928, #13929, #17338, #17956 and #19557, which conflict with main and change this file. None of their diffs changes a line of this block or the lines next to it.

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: Intel HD Graphics 630 (Mesa 25.2.8 ANV, Linux), NVIDIA GeForce GTX 1050 Ti (580.178.04, Linux), llvmpipe (Mesa 25.2.8, Linux), lavapipe (Mesa 26.0.8, built locally, Linux; validation run only)
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5350577479 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/22078). Originally posted by [GiannisG1](https://github.com/GiannisG1) on 2026-11-17T04:18:46Z. --- ### What `agc_driver_native_color_readback` fails on `main` (`b412486d3e`, after #20579) on an Intel HD Graphics 630 (Mesa 25.2.8 ANV, which reports `shaderStorageImageMultisample = false`): ``` native color readback: RGBA16F samples=2 coverage/fill/refusals/chunks passed native color readback: RGBA16F samples=2 signed zeros/subnormals/infinities/NaN payload bits preserved ShaderRecompiler::Recompile: SPIR-V module emission failed: storage image multisampling is unavailable on the target device ``` The four-sample pass of `Readback()` checks storage migration (`fragments == Samples`). It writes per-sample values with `StoreSamples`, a guest compute store to the multisampled target, which the recompiler can emit only with `shaderStorageImageMultisample` (`SpirvDescriptors.cpp:139`). The backtrace at `ShaderRecompiler::FailEmit` is `Readback` → `StoreSamples` → `CompileProgram` → `ShaderRecompiler::Recompile`. The test's fixture fails, not the driver's readback: the two-sample pass before it reads back through the same driver path and passes. Because the test stops there, its four- and eight-sample, integer-format and refusal cases never ran on such a device. The stencil-plane check in the same file already gates its `StoreSamples` on `context.storageImageMultisample` (the `if (context.storageImageMultisample)` block in `CheckClaimedTargets`), and #7191 skips the multisampled target test the same way. This PR gates only the storage migration step on that flag and prints `native color readback: storage migration skipped, the device lacks multisampled storage images`. The sampled load before it (`CheckUniform(LoadSamples(...), Ones, "before storage migration")`) still runs on every device. ### Tested Linux Mint 22.3, kernel 7.0.0-38, GCC 13.3.0, Release, head on `main` `b412486d3e`, under Xvfb. `ctest -R '^agc_driver_native_color_'` (10 tests), 3 runs per device: | Device | `main` | this PR | |---|---|---| | Intel HD Graphics 630 (Mesa 25.2.8) | 9 pass, `native_color_readback` fails as above | 10 pass; the readback test prints the skip line, then passes its 4- and 8-sample, integer (`elementBytes` 1–16) and refusal cases | | llvmpipe (Mesa 25.2.8) | 10 pass | 10 pass, storage migration still checked | | NVIDIA GTX 1050 Ti (580.178.04) | not rerun: the device has multisampled storage images, so the gated step runs as before | 10 pass, storage migration still checked | - llvmpipe with `shaderStorageImageMultisample` masked off (Khronos profiles layer) takes the skip and passes. - Validation layer (Khronos 1.4.363.1 from the LunarG SDK): `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, `VK_LOADER_DEBUG=layer`, `ANYPS5_NO_SHADER_CACHE=1`, `ANYPS5_REQUIRE_VULKAN=1`, `ctest -V -j1 -R '^agc_driver_native_color_'`, on `main` `0766863ef6` and this PR's commit on it (it merges cleanly), on the HD 630, the GTX, llvmpipe and lavapipe (Mesa 26.0.8). The loader inserts the layer in all 10 tests on each device and none reports it as not found; neither side logs a `VUID-`, `SYNC-HAZARD-`, `UNASSIGNED-` or other validation message. On `0766863ef6`, `native_color_readback` fails on the HD 630 as above and passes on the other three; with this PR all 10 pass on all four, and the HD 630 prints the skip line. - `check_conventions.py`, `check_main_sync.py` (merges cleanly) and `check_compile.py` are clean. - `pr_overlap.py --branch` could not compare #6808, #7642, #9508, #10193, #13928, #13929, #17338, #17956 and #19557, which conflict with `main` and change this file. None of their diffs changes a line of this block or the lines next to it. ### 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: Intel HD Graphics 630 (Mesa 25.2.8 ANV, Linux), NVIDIA GeForce GTX 1050 Ti (580.178.04, Linux), llvmpipe (Mesa 25.2.8, Linux), lavapipe (Mesa 26.0.8, built locally, Linux; validation run only) - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Jazeupoi commented 2026-11-18 14:54:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Jazeupoi on 2026-11-18T14:54:07Z.

Review: COMMENTED


Tested on a second device without multisampled storage images: Apple M4 with MoltenVK 1.4.2 (Vulkan SDK 1.4.363.1), macOS 27.0.1, x86_64 Release under Rosetta.

Base: main 3055e5830c with #17425 and #11049 (needed for the macOS build) and #22932 (libc paths, unrelated). "This PR" is the same tree with head 56c515a27f merged. All ^agc_driver_native_color tests (10), 3 runs each, with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, VK_LOADER_DEBUG=layer, ANYPS5_NO_SHADER_CACHE=1 and ANYPS5_REQUIRE_VULKAN=1 (ctest -V):

result layer inserted not found lines VUID-
base 9/10, 3/3 runs: agc_driver_native_color_readback fails 10 per run 0 0
this PR 10/10, 3/3 runs 10 per run 0 0

On the base it stops as in the description, right after the two-sample pass: SPIR-V module emission failed: storage image multisampling is unavailable on the target device. With this PR it prints storage migration skipped, the device lacks multisampled storage images, and the cases that never ran before now pass: the 4-sample RGBA16F pass, the integer formats with element sizes 1 to 16 bytes, and the refusal checks.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5959015357 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/22078#pullrequestreview-5959015357). Originally posted by [Jazeupoi](https://github.com/Jazeupoi) on 2026-11-18T14:54:07Z. **Review:** COMMENTED --- Tested on a second device without multisampled storage images: Apple M4 with MoltenVK 1.4.2 (Vulkan SDK 1.4.363.1), macOS 27.0.1, x86_64 Release under Rosetta. Base: `main` `3055e5830c` with #17425 and #11049 (needed for the macOS build) and #22932 (libc paths, unrelated). "This PR" is the same tree with head `56c515a27f` merged. All `^agc_driver_native_color` tests (10), 3 runs each, with `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, `VK_LOADER_DEBUG=layer`, `ANYPS5_NO_SHADER_CACHE=1` and `ANYPS5_REQUIRE_VULKAN=1` (`ctest -V`): | | result | layer inserted | `not found` lines | `VUID-` | |---|---|---|---|---| | base | 9/10, 3/3 runs: `agc_driver_native_color_readback` fails | 10 per run | 0 | 0 | | this PR | 10/10, 3/3 runs | 10 per run | 0 | 0 | On the base it stops as in the description, right after the two-sample pass: `SPIR-V module emission failed: storage image multisampling is unavailable on the target device`. With this PR it prints `storage migration skipped, the device lacks multisampled storage images`, and the cases that never ran before now pass: the 4-sample RGBA16F pass, the integer formats with element sizes 1 to 16 bytes, and the refusal checks. AI-assisted: yes (Claude Code)
MarcZX10 commented 2026-11-19 04:18:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-19T04:18:41Z.

Review: APPROVED


Reviewed — looks good

The change guards the test’s multisampled storage migration with the device capability while retaining the sampled readback check on devices without that capability.

What I ran

Reviewed head 56c515a27f85dfbd22e1f82920302033283f757b and its prepared diff. No commands or tests were run.

Results

Check Result Note
Diff and changed code passed One changed test file read
Tests not run Author reports device and validation runs

Findings

Blocking

None.

Non-blocking

None.

Not verified

No tests were run in this review. The author-reported results were not independently verified. The only changed file, core/libs/prx/libSceAgcDriver/tests/execution/SampleMultisampleTarget.cpp, was read around the changed block and its Readback function; other portions of the 2,355-line file were not read. No files were excluded by the manifest.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5969248701 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/22078#pullrequestreview-5969248701). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-19T04:18:41Z. **Review:** APPROVED --- # Reviewed — looks good The change guards the test’s multisampled storage migration with the device capability while retaining the sampled readback check on devices without that capability. ## What I ran Reviewed head `56c515a27f85dfbd22e1f82920302033283f757b` and its prepared diff. No commands or tests were run. ## Results | Check | Result | Note | |---|---|---| | Diff and changed code | passed | One changed test file read | | Tests | not run | Author reports device and validation runs | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified No tests were run in this review. The author-reported results were not independently verified. The only changed file, `core/libs/prx/libSceAgcDriver/tests/execution/SampleMultisampleTarget.cpp`, was read around the changed block and its `Readback` function; other portions of the 2,355-line file were not read. No files were excluded by 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!22078
No description provided.