test(agc): skip the multisample target checks without formatless multisampled storage writes #17152

Merged
GiannisG1 merged 1 commit from upstream-pr/17152 into main 2026-11-12 23:22:19 +00:00
GiannisG1 commented 2026-11-08 12:18:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by GiannisG1 on 2026-11-08T12:18:31Z.


What

Since #16086 (45414a37af), a draw over nonuniform initial multisample color contents uploads them. The upload needs shaderStorageImageMultisample and shaderStorageImageWriteWithoutFormat. Without them, PrepareMultisampleTargetForDraw_nid_no_patch still refuses with initial multisample color samples require enabled formatless multisampled storage image writes (MultisampleTarget.cpp:1466). The tests that came with the upload assume every device has both features. On a device without shaderStorageImageMultisample, five of them fail on main:

Test Failure on main
agc_driver_native_color_initial_nonuniform, _lifetime, _hook the refusal above
agc_driver_native_color_initial_nonuniform_capabilities initial upload capability refusal differs: …: the device's own refusal comes before the storage-range and image-format refusals the test expects
agc_driver_sample_multisample_target the refusal above, from CheckOverwrittenTarget's draw over a partly overwritten target, which runs before this test's own shaderStorageImageMultisample skip

Here that device is an Intel HD Graphics 630 (Mesa ANV). The same five fail on an HD 520 in the test runs of #17056 and #16967. CI's lavapipe has both features, so CI doesn't see this.

This PR changes only SampleMultisampleTarget.cpp, and the library is unchanged:

  • When the device lacks either feature, each of the four --initial-nonuniform* modes returns 77 after printing … skipped, the device does not enable multisampled formatless storage writes. That is the wording MultisampleReadback.cpp uses for the same pair of features. Before skipping, _lifetime still runs its uniform half (a clear, with no upload). _capabilities still checks the three missing-capability refusals and the unsupported-tiling refusal. The tiling check moves ahead of the skip because the library checks tiling first.
  • On a device that can upload, CheckOverwrittenTarget is unchanged. On a device that can't, it expects the draw to refuse with the capability message and to leave guest memory unchanged. It then zeroes the color memory and draws again, the flow it had before #16086, so the guard checks after the draw still run on every device.
  • The default mode's skip before the fill, store and swizzle checks now requires both features, not only shaderStorageImageMultisample, because the guest color upload those checks reach requires both (MultisampleTarget.cpp:245). Its line becomes multisampled target fills, stores and swizzle modes skipped, the device does not enable multisampled formatless storage writes.

The skip lines on the HD 630:

nonuniform initial contents skipped, the device does not enable multisampled formatless storage writes
native color initial lifetime: uniform contents survive completion and three resident reuses without retaining initialization bytes
native color initial lifetime: varying contents skipped, the device does not enable multisampled formatless storage writes
nonuniform initial upload: missing capabilities and an unsupported tiling refuse without ownership or byte changes; storage range, image format and chunked upload checks skipped, the device does not enable multisampled formatless storage writes
nonuniform initial capture skipped, the device does not enable multisampled formatless storage writes
multisampled target fills, stores and swizzle modes skipped, the device does not enable multisampled formatless storage writes

Tested

Linux Mint 22.3, kernel 7.0.0-38, GCC 13.3.0, Release, BUILD_TESTING=ON, on main 105c9e4d91. The PR changes only this test's source, so every other test binary is the same as main's; the split suite on main 105c9e4d91 shows these five as the only HD 630 failures in this binary.

The ten tests of agc_driver_sample_multisample_target_tests (agc_driver_sample_multisample_target, the seven agc_driver_native_color_initial_*, agc_driver_native_fmask, agc_driver_native_msaa_vertex_input), under Xvfb, tools/check_skips.py on each run's JUnit file:

Device main this PR, 3 runs
Intel HD Graphics 630, Mesa 25.2.8 (shaderStorageImageMultisample false) 5 failed, 3/3 4 passed, 6 skipped with the lines above (native_fmask as before), 3/3; check_skips.py exit 0
NVIDIA GTX 1050 Ti, 580.178.04 10 passed 10 passed, 3/3
llvmpipe, Mesa 25.2.8 9 passed, native_fmask skipped the same, 3/3

With the Khronos profiles layer (SDK 1.3.275) reporting one feature as false, ctest once per device:

Feature reported false main this PR
shaderStorageImageMultisample, on all three devices the same 5 fail on each 0 failed; the 4 modes and sample_multisample_target skip; check_skips.py exit 0
shaderStorageImageWriteWithoutFormat, on all three devices the same 5 fail on each 0 failed; same skips; check_skips.py exit 0

The second row is why the default mode's skip now requires both features: with this PR's other changes but the old skip, sample_multisample_target got past CheckOverwrittenTarget on the GTX and llvmpipe and then failed in the fill checks with uploading multisampled guest color requires formatless multisampled storage image writes.

With VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation (layers 1.3.275), ANYPS5_REQUIRE_VULKAN=1, ctest -V, once per device: no was not found but was requested by env var VK_INSTANCE_LAYERS; VUIDs the same on main and this PR (none on the HD 630, 30 × VUID-VkDeviceCreateInfo-pNext-pNext on the other two).

The 264 source-scanning tests (conventions_*, public_headers*, check_*, tools_*) pass. check_conventions.py, check_test_registration.py, check_main_sync.py (1 ahead, merges cleanly) and check_compile.py --build build (1 translation unit) are clean. tools/pr_overlap.py --branch compared 3 of the 12 PRs that share the file. The other nine conflict with main elsewhere, so I merged the file three-way with each PR head: #6987, #6989, #6995, #7002, #7642, #9508, #9915, #10193, #10233, #13928 and #13929 merge cleanly with this PR, and #6808 has the same 6 conflicts with main with or without it.

Amoenus (who wrote #16086's fixtures) reviewed this head and ran the ten modes on Windows 11 with an RTX 5080 and an AMD Radeon (1002:13c0): 40 passed, 0 skipped, 0 failed, no VUIDs or sync hazards: https://github.com/boykopovar/AnyPS5/pull/17152#issuecomment-6743368293

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 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), NVIDIA GeForce GTX 1050 Ti (580.178.04), llvmpipe (Mesa 25.2.8); Linux Mint 22.3, kernel 7.0.0-38
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5211237728 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/17152). Originally posted by [GiannisG1](https://github.com/GiannisG1) on 2026-11-08T12:18:31Z. --- ### What Since #16086 (45414a37af), a draw over nonuniform initial multisample color contents uploads them. The upload needs `shaderStorageImageMultisample` and `shaderStorageImageWriteWithoutFormat`. Without them, `PrepareMultisampleTargetForDraw_nid_no_patch` still refuses with `initial multisample color samples require enabled formatless multisampled storage image writes` (`MultisampleTarget.cpp:1466`). The tests that came with the upload assume every device has both features. On a device without `shaderStorageImageMultisample`, five of them fail on `main`: | Test | Failure on `main` | |---|---| | `agc_driver_native_color_initial_nonuniform`, `_lifetime`, `_hook` | the refusal above | | `agc_driver_native_color_initial_nonuniform_capabilities` | `initial upload capability refusal differs: …`: the device's own refusal comes before the storage-range and image-format refusals the test expects | | `agc_driver_sample_multisample_target` | the refusal above, from `CheckOverwrittenTarget`'s draw over a partly overwritten target, which runs before this test's own `shaderStorageImageMultisample` skip | Here that device is an Intel HD Graphics 630 (Mesa ANV). The same five fail on an HD 520 in the test runs of #17056 and #16967. CI's lavapipe has both features, so CI doesn't see this. This PR changes only `SampleMultisampleTarget.cpp`, and the library is unchanged: - When the device lacks either feature, each of the four `--initial-nonuniform*` modes returns 77 after printing `… skipped, the device does not enable multisampled formatless storage writes`. That is the wording `MultisampleReadback.cpp` uses for the same pair of features. Before skipping, `_lifetime` still runs its uniform half (a clear, with no upload). `_capabilities` still checks the three missing-capability refusals and the unsupported-tiling refusal. The tiling check moves ahead of the skip because the library checks tiling first. - On a device that can upload, `CheckOverwrittenTarget` is unchanged. On a device that can't, it expects the draw to refuse with the capability message and to leave guest memory unchanged. It then zeroes the color memory and draws again, the flow it had before #16086, so the guard checks after the draw still run on every device. - The default mode's skip before the fill, store and swizzle checks now requires both features, not only `shaderStorageImageMultisample`, because the guest color upload those checks reach requires both (`MultisampleTarget.cpp:245`). Its line becomes `multisampled target fills, stores and swizzle modes skipped, the device does not enable multisampled formatless storage writes`. The skip lines on the HD 630: ``` nonuniform initial contents skipped, the device does not enable multisampled formatless storage writes native color initial lifetime: uniform contents survive completion and three resident reuses without retaining initialization bytes native color initial lifetime: varying contents skipped, the device does not enable multisampled formatless storage writes nonuniform initial upload: missing capabilities and an unsupported tiling refuse without ownership or byte changes; storage range, image format and chunked upload checks skipped, the device does not enable multisampled formatless storage writes nonuniform initial capture skipped, the device does not enable multisampled formatless storage writes multisampled target fills, stores and swizzle modes skipped, the device does not enable multisampled formatless storage writes ``` ### Tested Linux Mint 22.3, kernel 7.0.0-38, GCC 13.3.0, Release, `BUILD_TESTING=ON`, on `main` `105c9e4d91`. The PR changes only this test's source, so every other test binary is the same as `main`'s; the split suite on `main` `105c9e4d91` shows these five as the only HD 630 failures in this binary. The ten tests of `agc_driver_sample_multisample_target_tests` (`agc_driver_sample_multisample_target`, the seven `agc_driver_native_color_initial_*`, `agc_driver_native_fmask`, `agc_driver_native_msaa_vertex_input`), under Xvfb, `tools/check_skips.py` on each run's JUnit file: | Device | `main` | this PR, 3 runs | |---|---|---| | Intel HD Graphics 630, Mesa 25.2.8 (`shaderStorageImageMultisample` false) | 5 failed, 3/3 | 4 passed, 6 skipped with the lines above (`native_fmask` as before), 3/3; `check_skips.py` exit 0 | | NVIDIA GTX 1050 Ti, 580.178.04 | 10 passed | 10 passed, 3/3 | | llvmpipe, Mesa 25.2.8 | 9 passed, `native_fmask` skipped | the same, 3/3 | With the Khronos profiles layer (SDK 1.3.275) reporting one feature as false, `ctest` once per device: | Feature reported false | `main` | this PR | |---|---|---| | `shaderStorageImageMultisample`, on all three devices | the same 5 fail on each | 0 failed; the 4 modes and `sample_multisample_target` skip; `check_skips.py` exit 0 | | `shaderStorageImageWriteWithoutFormat`, on all three devices | the same 5 fail on each | 0 failed; same skips; `check_skips.py` exit 0 | The second row is why the default mode's skip now requires both features: with this PR's other changes but the old skip, `sample_multisample_target` got past `CheckOverwrittenTarget` on the GTX and llvmpipe and then failed in the fill checks with `uploading multisampled guest color requires formatless multisampled storage image writes`. With `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation` (layers 1.3.275), `ANYPS5_REQUIRE_VULKAN=1`, `ctest -V`, once per device: no `was not found but was requested by env var VK_INSTANCE_LAYERS`; VUIDs the same on `main` and this PR (none on the HD 630, 30 × `VUID-VkDeviceCreateInfo-pNext-pNext` on the other two). The 264 source-scanning tests (`conventions_*`, `public_headers*`, `check_*`, `tools_*`) pass. `check_conventions.py`, `check_test_registration.py`, `check_main_sync.py` (1 ahead, merges cleanly) and `check_compile.py --build build` (1 translation unit) are clean. `tools/pr_overlap.py --branch` compared 3 of the 12 PRs that share the file. The other nine conflict with `main` elsewhere, so I merged the file three-way with each PR head: #6987, #6989, #6995, #7002, #7642, #9508, #9915, #10193, #10233, #13928 and #13929 merge cleanly with this PR, and #6808 has the same 6 conflicts with `main` with or without it. Amoenus (who wrote #16086's fixtures) reviewed this head and ran the ten modes on Windows 11 with an RTX 5080 and an AMD Radeon (1002:13c0): 40 passed, 0 skipped, 0 failed, no VUIDs or sync hazards: https://github.com/boykopovar/AnyPS5/pull/17152#issuecomment-6743368293 ### 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) - [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), NVIDIA GeForce GTX 1050 Ti (580.178.04), llvmpipe (Mesa 25.2.8); Linux Mint 22.3, kernel 7.0.0-38 - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
coptergui-ops commented 2026-11-08 12:57:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by coptergui-ops on 2026-11-08T12:57:18Z.

Review: APPROVED


Reviewed at current head. Pure test change in tests/execution/SampleMultisampleTarget.cpp: adds FormatlessMultisampleWrites helper (storageImageMultisample && storageImageWriteWithoutFormat) and either skips (VulkanTestSkipped / case-continue) or exercises a device-own-refusal branch in the five tests that assume both features, matching the PR body's per-test failure table on Intel HD 630 (Mesa ANV). Production code untouched; refusal-message assertions pin the exact error text from MultisampleTarget.cpp:1466. No bot pending pairs; no shared files with any other open PR in this wave. Conventions checker: 11 findings, all pre-existing on main (baseline noise), no new findings.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5817971107 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/17152#pullrequestreview-5817971107). Originally posted by [coptergui-ops](https://github.com/coptergui-ops) on 2026-11-08T12:57:18Z. **Review:** APPROVED --- Reviewed at current head. Pure test change in tests/execution/SampleMultisampleTarget.cpp: adds FormatlessMultisampleWrites helper (storageImageMultisample && storageImageWriteWithoutFormat) and either skips (VulkanTestSkipped / case-continue) or exercises a device-own-refusal branch in the five tests that assume both features, matching the PR body's per-test failure table on Intel HD 630 (Mesa ANV). Production code untouched; refusal-message assertions pin the exact error text from MultisampleTarget.cpp:1466. No bot pending pairs; no shared files with any other open PR in this wave. Conventions checker: 11 findings, all pre-existing on main (baseline noise), no new findings.
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!17152
No description provided.