test(agc): skip 2D MSAA resinfo fragment counts the device cannot render #25334

Merged
peacocksir merged 1 commit from upstream-pr/25334 into main 2026-11-22 00:47:34 +00:00
peacocksir commented 2026-11-21 23:07:53 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by peacocksir on 2026-11-21T23:07:53Z.


What

agc_driver_image_resinfo_dimension fails on main on Mesa lavapipe, the Vulkan device of the Linux CI job: AGC graphics: the device cannot render color with the target's sample count. #19682 added 2D MSAA T#s with 2, 4 and 8 fragments to it, and binding one goes through MultisampleTarget.cpp, which requires the count in framebufferColorSampleCounts. lavapipe reports only SAMPLE_COUNT_1_BIT and SAMPLE_COUNT_4_BIT, so the 2-fragment case throws and the 4- and 8-fragment cases never run. main's own Linux job shows the same failure at ef7dc4452d (run 44949893769, job linux, runner anyps5-3-linux-2).

Each 2D MSAA case now catches exactly that message, the way ResolveTests in PackedFloatColorTarget.cpp does, and prints <n>-fragment 2D MSAA resinfo skipped, the device lacks <n>-sample color attachments (matched by DEVICE_LIMITATION in tools/check_skips.py). Any other exception is rethrown, and the remaining fragment counts still run. A device that supports all three counts runs exactly what main runs. No production code changes.

Tested

Ubuntu 24.04.4, kernel 6.8, GCC 13.3.0, Ninja, Release, BUILD_TESTING=ON. Head f7a60a3842 on main d3a7b0bcd8. GPU: Mesa lavapipe 25.2.8 (llvmpipe (LLVM 20.1.2, 256 bits), 8-lane subgroups), /dev/udmabuf available. Validation layer built from source, 1.4.335.

Focused run, main's test file and this branch's in the same build tree, 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 -R '^agc_driver_image_resinfo_dimension$' -V:

Result Output
main Failed AGC graphics: the device cannot render color with the target's sample count
this PR Passed 2-fragment 2D MSAA resinfo skipped, the device lacks 2-sample color attachments, 8-fragment ... 8-sample ..., image resinfo dimension tests passed

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 VUID-.

The 4-fragment case still runs on lavapipe and still checks #19682's fix: with #19682's two shader changes (ResourceMaterializer.cpp, SpirvImageEmitter.cpp) reverted locally, this branch fails with image_get_resinfo: the 2D MSAA query returned 8x8x0 levels 0, RDNA 2 returns 8x8x0 levels 1 after the 2-fragment skip line. That was checked at the first base, ef7dc4452d; since then main changed neither the test file, MultisampleTarget.cpp nor check_skips.py.

Full ctest --test-dir build --output-on-failure -j6 at the head above: 6550/6556 pass. The 6 failures are in other executables, which this change does not touch, and each also fails with main's code on this machine:

  • agc_driver_scattered_runs: Mesa before 26 (#21649).
  • agc_driver_integer_sdwa_output_modifiers: #25298, on main's Linux job too; the open #25300 reverts #19566.
  • agc_driver_draw_allocations, agc_driver_draw_allocations_draw_pipeline, agc_driver_draw_allocations_plan_verify: [compute dispatch] reports about 480 to 570 allocations per warmed dispatch here. They also fail at main 3fc5088db0, with and without the validation layer, and pass on main's Linux job; I have not found the cause.
  • nkwebkit_wtf: aborts here, also at main 3fc5088db0; passes on main's Linux job.

On an earlier full run at ef7dc4452d, agc_driver_frame_replay_rewind_copy failed once (no memory delta was read while 1 submissions waited for the CPU) and then passed 3 of 3 on its own.

python3 tools/check_conventions.py --base origin/main: all checks passed. tools/pr_overlap.py --branch could not compare #7085 and #22724, both of which conflict with main. I compared them by hand: both add mip-level cases to this file and neither touches the 2D MSAA loop.

Not tested: real GPUs (no Windows or NVIDIA, AMD or Intel run), macOS, titles. On a device that supports 2, 4 and 8 color samples, the new catch is never reached.

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: Mesa lavapipe 25.2.8 (llvmpipe, LLVM 20.1.2), Ubuntu 24.04, CPU Vulkan only
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5433405787 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/25334). Originally posted by [peacocksir](https://github.com/peacocksir) on 2026-11-21T23:07:53Z. --- ### What `agc_driver_image_resinfo_dimension` fails on `main` on Mesa lavapipe, the Vulkan device of the Linux CI job: `AGC graphics: the device cannot render color with the target's sample count`. #19682 added 2D MSAA T#s with 2, 4 and 8 fragments to it, and binding one goes through `MultisampleTarget.cpp`, which requires the count in `framebufferColorSampleCounts`. lavapipe reports only `SAMPLE_COUNT_1_BIT` and `SAMPLE_COUNT_4_BIT`, so the 2-fragment case throws and the 4- and 8-fragment cases never run. `main`'s own Linux job shows the same failure at `ef7dc4452d` (run 44949893769, job `linux`, runner `anyps5-3-linux-2`). Each 2D MSAA case now catches exactly that message, the way `ResolveTests` in `PackedFloatColorTarget.cpp` does, and prints `<n>-fragment 2D MSAA resinfo skipped, the device lacks <n>-sample color attachments` (matched by `DEVICE_LIMITATION` in `tools/check_skips.py`). Any other exception is rethrown, and the remaining fragment counts still run. A device that supports all three counts runs exactly what `main` runs. No production code changes. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> Ubuntu 24.04.4, kernel 6.8, GCC 13.3.0, Ninja, Release, `BUILD_TESTING=ON`. Head `f7a60a3842` on `main` `d3a7b0bcd8`. GPU: Mesa lavapipe 25.2.8 (`llvmpipe (LLVM 20.1.2, 256 bits)`, 8-lane subgroups), `/dev/udmabuf` available. Validation layer built from source, 1.4.335. Focused run, `main`'s test file and this branch's in the same build tree, 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 -R '^agc_driver_image_resinfo_dimension$' -V`: | | Result | Output | |---|---|---| | `main` | Failed | `AGC graphics: the device cannot render color with the target's sample count` | | this PR | Passed | `2-fragment 2D MSAA resinfo skipped, the device lacks 2-sample color attachments`, `8-fragment ... 8-sample ...`, `image resinfo dimension tests passed` | 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 `VUID-`. The 4-fragment case still runs on lavapipe and still checks #19682's fix: with #19682's two shader changes (`ResourceMaterializer.cpp`, `SpirvImageEmitter.cpp`) reverted locally, this branch fails with `image_get_resinfo: the 2D MSAA query returned 8x8x0 levels 0, RDNA 2 returns 8x8x0 levels 1` after the 2-fragment skip line. That was checked at the first base, `ef7dc4452d`; since then `main` changed neither the test file, `MultisampleTarget.cpp` nor `check_skips.py`. Full `ctest --test-dir build --output-on-failure -j6` at the head above: 6550/6556 pass. The 6 failures are in other executables, which this change does not touch, and each also fails with `main`'s code on this machine: - `agc_driver_scattered_runs`: Mesa before 26 (#21649). - `agc_driver_integer_sdwa_output_modifiers`: #25298, on `main`'s Linux job too; the open #25300 reverts #19566. - `agc_driver_draw_allocations`, `agc_driver_draw_allocations_draw_pipeline`, `agc_driver_draw_allocations_plan_verify`: `[compute dispatch]` reports about 480 to 570 allocations per warmed dispatch here. They also fail at `main` `3fc5088db0`, with and without the validation layer, and pass on `main`'s Linux job; I have not found the cause. - `nkwebkit_wtf`: aborts here, also at `main` `3fc5088db0`; passes on `main`'s Linux job. On an earlier full run at `ef7dc4452d`, `agc_driver_frame_replay_rewind_copy` failed once (`no memory delta was read while 1 submissions waited for the CPU`) and then passed 3 of 3 on its own. `python3 tools/check_conventions.py --base origin/main`: all checks passed. `tools/pr_overlap.py --branch` could not compare #7085 and #22724, both of which conflict with `main`. I compared them by hand: both add mip-level cases to this file and neither touches the 2D MSAA loop. Not tested: real GPUs (no Windows or NVIDIA, AMD or Intel run), macOS, titles. On a device that supports 2, 4 and 8 color samples, the new catch is never reached. ### 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: Mesa lavapipe 25.2.8 (llvmpipe, LLVM 20.1.2), Ubuntu 24.04, CPU Vulkan only - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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!25334
No description provided.