Skip to content

test(agc): skip the MSAA retirement storage promotion without shaderStorageImageMultisample - #8604

Merged
oneandonlydean merged 2 commits into
boykopovar:mainfrom
GiannisG1:test/msaa-retirement-skip-storage-without-feature
Nov 1, 2026
Merged

oneandonlydean merged 2 commits into
boykopovar:mainfrom
GiannisG1:test/msaa-retirement-skip-storage-without-feature

Conversation

@GiannisG1

@GiannisG1 GiannisG1 commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

What

agc_driver_multisample_retirement fails on devices without shaderStorageImageMultisample:

AGC graphics: the device cannot write the multisampled color target's format as a storage image at its sample count

StorageRemap asks for a storage view of the 4x target, and MultisampleTarget.cpp:383 refuses it. The test checks only framebufferColorSampleCounts for 4x.

The idle, recorded and sampled remap cases still run on such a device. Only the storage promotion is skipped, and the test then returns 77, so ctest reports it as skipped rather than passed. The check is context.storageImageMultisample, the same feature PlaceholderImageShapeForDevice gates multisampled storage on.

The skip return comes after the storage case, not before it, so a case added later still runs on these devices. A case that needs a storage view goes inside the guard; one that doesn't goes between it and the skip. run.StorageSrgbTwin() and run.OrderRemap() skip their own cases on such a device, and run.StorageTwin() runs only with context.storageImageMultisample, so those lines stay as they are, in main's order. #9455 (merged) changed lines inside StorageRemap, which this PR doesn't touch.

Tested

Linux Mint 22.3, kernel 7.0.0-38, GCC 13.3.0, Release, BUILD_TESTING=ON, rebased on main 750cf6cf4. The PR changes only this test's source, so every other test binary is the same as main's.

agc_driver_multisample_retirement:

Device main 750cf6cf4 this PR, 3 runs
Intel HD Graphics 630, Mesa 25.2.8 (shaderStorageImageMultisample false) fails in 4 of 4 runs (3 full ctest -j4 runs, 1 alone) skipped 3/3; StorageSrgbTwin and OrderRemap skip their own cases
NVIDIA GTX 1050 Ti, 580.178.04 passes passes 3/3, all storage cases run
llvmpipe, Mesa 25.2.8 passes passes 3/3, all storage cases run

With VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation (layers 1.3.275), ANYPS5_NO_SHADER_CACHE=1, ANYPS5_REQUIRE_VULKAN=1, ctest -V: no was not found but was requested by env var VK_INSTANCE_LAYERS; VUIDs the same on main 750cf6cf4 and this PR (none on the HD 630, VUID-VkDeviceCreateInfo-pNext-pNext on the other two). tools/check_skips.py accepts the skip (exit 0 on each HD 630 run's JUnit file).

Independently confirmed on Windows with an Intel Arc (Meteor Lake) GPU without shaderStorageImageMultisample by @BKlaasWerkman (comment above, on an earlier base).

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

@oneandonlydean

Copy link
Copy Markdown
Collaborator

The skip line doesn't match tools/check_skips.py's DEVICE_LIMITATION pattern, which needs skipped, (with the comma) before the device reason on the same line. "skipped the storage promotion, the device has no shaderStorageImageMultisample" has no skipped,, so a Linux CI job on a device without the feature would fail the skip check even though ctest reports 77. Reordering the words is enough, for example:

std::puts("storage promotion skipped, the device has no shaderStorageImageMultisample");

(Checked against main's pattern: the current text doesn't match, and this one does.) Everything else looks right to me: the skip comes after the three cases that still run, and the gate is the same storageImageMultisample that MultisampleTarget.cpp:258 refuses on.

@github-actions github-actions Bot added the agc libSceAgc* label Oct 20, 2026
@GiannisG1

Copy link
Copy Markdown
Contributor Author

Thanks, you're right. With the old text, tools/check_skips.py exits 1 on the JUnit file from an HD 630 run; with yours it exits 0. Changed in cdf6c28, as a separate commit so the change is easy to see (happy to squash).

Rerun after the change: skipped 3/3 on the HD 630, passed 3/3 on the GTX 1050 Ti and llvmpipe with the storage case running.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 21, 2026
@GiannisG1
GiannisG1 force-pushed the test/msaa-retirement-skip-storage-without-feature branch 3 times, most recently from cdf6c28 to 0089f4f Compare October 21, 2026 13:12
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 21, 2026

@jotitadev jotitadev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This guard covers the feature-absent case (no shaderStorageImageMultisample, the "the device cannot write the multisampled color target's format as a storage image at its sample count" throw). There is a sibling failure it does not cover: a device that has shaderStorageImageMultisample but whose MSAA color target is born storable.

On a device with programmable sample locations but only a 1x1 location grid, MayReorderSamples is true, so MultisampleTarget creates the 4x color target with VK_IMAGE_USAGE_STORAGE_BIT from the start (to write the guest's sample order back). MultisampleTargetStorageView then returns that already-storable image, makeStorable is a no-op, the owner's generation does not change, and StorageRemap fails its promoted.generation != old.generation assertion:

AGC graphics: MSAA storage promotion did not retain its source image

context.storageImageMultisample is true on such a device, so const bool storage = context.storageImageMultisample; if (storage) run.StorageRemap(); still runs StorageRemap and the test still fails. OrderRemap already handles exactly this device: its own guard is MayReorderSamples && SampleOrderStorageFormat != VK_FORMAT_UNDEFINED, which is the born-storable condition. Guarding the storage-promotion case the same way (in addition to the feature guard here) would skip it on born-storable devices too, where there is no promotion to retire.

This is Mesa-dependent, which is why your llvmpipe run (Mesa 25.2.8) passed: on Mesa 26.0.3 lavapipe advertises a 1x1 sample-location grid at every count and the target is born storable, so it fails on main and with this PR applied.

Tested

Ubuntu 26.04, i7-8700, Release, BUILD_TESTING=ON, ANYPS5_NO_SHADER_CACHE=1, device selected with VK_ICD_FILENAMES, run as ./agc_driver_multisample_retirement_tests. I applied this PR's change to agc_driver_multisample_retirement on top of current main a6dcea927.

agc_driver_multisample_retirement NVIDIA RTX 3070 (595.99.02) lavapipe (Mesa 26.0.3, LLVM 21.1.8)
main a6dcea927 pass 3/3 fail 3/3 (MSAA storage promotion did not retain its source image)
this PR on a6dcea927 pass 3/3 (storage case runs) fail 3/3 (same assertion; storageImageMultisample is true, so StorageRemap still runs)

Driver log confirms the mechanism:

  • NVIDIA: 4 samples 2x2 → MayReorderSamples false → target born color-only → StorageRemap promotes and passes.
  • lavapipe: 4 samples 1x1, 8 samples 1x1 → MayReorderSamples true → target born storable → makeStorable is a no-op → StorageRemap assertion fails.

GPUs tested: NVIDIA GeForce RTX 3070 (595.99.02, Linux) and lavapipe (Mesa 26.0.3, LLVM 21.1.8), Ubuntu 26.04.

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

@GiannisG1

Copy link
Copy Markdown
Contributor Author

Thanks, confirmed in the code on main 4777caca3: with MayReorderSamples and a sample-order storage format the target gets VK_IMAGE_USAGE_STORAGE_BIT at creation (MultisampleTarget.cpp:89-91), makeStorable returns early (:192), so the generation doesn't change and MultisampleRetirement.cpp:478 fails.

#9455 covers that case separately, which keeps each PR to one device condition, and the two merge cleanly. With both applied I ran the test on the three devices I have; results are on #9455, where the HD 630 is the 1x1-grid device without shaderStorageImageMultisample that its description lists as not run.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 22, 2026
@GiannisG1
GiannisG1 force-pushed the test/msaa-retirement-skip-storage-without-feature branch from 0089f4f to 83419fe Compare October 22, 2026 17:15
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 22, 2026
@BKlaasWerkman

Copy link
Copy Markdown
Contributor

Confirmed on a device without shaderStorageImageMultisample.

Windows 11 Pro 10.0.26300, WinLibs GCC 15.2.0 r7, Release, Intel Arc Graphics (Meteor Lake, 0x7d55, driver 101.9150; shaderStorageImageMultisample = false), with NVIDIA GeForce RTX 3060 Ti (driver 617.42; feature present) as the control. main b7a451d against main with head 83419fe merged (clean merge; the same tree also had #6782, which only changes VulkanDevice.cpp feature enabling). ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation (1.4.363).

agc_driver_multisample_retirement:

  • Intel Arc, main: fails with AGC graphics: the device cannot write the multisampled color target's format as a storage image at its sample count. It also failed in a full ctest run of main 83462cc on this device.
  • Intel Arc, this PR: skipped, with the device has no multisampled storage view for the sample-order target; its retirement case is skipped and storage promotion skipped, the device has no shaderStorageImageMultisample.
  • RTX 3060 Ti: passes on both sides.

No VUID- from this test on either side.

AI-assisted: yes (Claude Code)

@GiannisG1

Copy link
Copy Markdown
Contributor Author

@oneandonlydean the skipped, wording you asked for is in (83419fed8). Since then the branch was rebased for #6683 and #8847 and is on 8b3e39832, merging cleanly, and it has been confirmed on a second device without shaderStorageImageMultisample (Intel Arc on Windows, above). Ready for a build when you have a moment.

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 24, 2026
@GiannisG1

Copy link
Copy Markdown
Contributor Author

Closing for now to free my single open-PR slot; I'll reopen it once another PR of mine is merged.

GiannisG1 and others added 2 commits October 28, 2026 18:18
…torageImageMultisample

agc_driver_multisample_retirement failed on devices without
shaderStorageImageMultisample (Intel HD 630 on Mesa ANV): StorageRemap
asks for a storage view of the 4x target, and MultisampleTarget.cpp
refuses it ("the device cannot write the multisampled color target's
format as a storage image at its sample count"). The test checked only
the 4x color sample count.

The idle, recorded and sampled remap cases still run on such a device;
only the storage promotion is skipped, and the test reports 77 so ctest
shows it as not fully run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tools/check_skips.py accepts a Linux skip only when its output has
"skipped," before the device reason. The storage promotion skip read
"skipped the storage promotion, ...", so a CI device without
shaderStorageImageMultisample would fail the skip check although ctest
reports 77.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@GiannisG1 GiannisG1 reopened this Oct 28, 2026
@GiannisG1
GiannisG1 force-pushed the test/msaa-retirement-skip-storage-without-feature branch from b447249 to 51b2363 Compare October 28, 2026 16:41
@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head 51b2363 merged onto main bb04a4f · tested 2026-10-29 21:37 UTC · 14 min

GPU NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Vulkan 1.4.329
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 745 passed · 0 failed · 8 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 753 of 2,918 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (365 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) none
Validation IDs already present on main (3 IDs in 105 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (105 tests): agc_driver, agc_driver_address_passes_draw_transitions, agc_driver_address_passes_targets_split, agc_driver_buffer_unaligned_base, agc_driver_bvh64_intersect_ray, agc_driver_cache_control, agc_driver_cached_image_multisample_guard, agc_driver_clamped_global_fill, and 97 more
VUID-vkCmdCopyImage-srcImage-01548 (6 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (6 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
Skipped (8)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_msaa_dcc_compared_import_2: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_msaa_dcc_compared_import_4: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_msaa_dcc_compared_import_8: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
Reproduce
git fetch origin 51b236334efe86b17f11db53ffdb1b5e00bc798f bb04a4f1ea0175e9e4f149f0359a764d62ff3296
git checkout bb04a4f1ea0175e9e4f149f0359a764d62ff3296 && git merge --no-ff 51b236334efe86b17f11db53ffdb1b5e00bc798f
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 32 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 4 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 7642 core/libs/prx/libSceAgcDriver/tests/execution/MultisampleRetirement.cpp
PR 9508 core/libs/prx/libSceAgcDriver/tests/execution/MultisampleRetirement.cpp
PR 10193 core/libs/prx/libSceAgcDriver/tests/execution/MultisampleRetirement.cpp
PR 13928 core/libs/prx/libSceAgcDriver/tests/execution/MultisampleRetirement.cpp
PR 13929 core/libs/prx/libSceAgcDriver/tests/execution/MultisampleRetirement.cpp

@GiannisG1

Copy link
Copy Markdown
Contributor Author

The linux failure in Build 41241928767 is agc_driver_idle_store_yields (from #13621; its fixture race is what open #14066 fixes). This PR changes only MultisampleRetirement.cpp, and its agc_driver_multisample_retirement passed in the same run.

@oneandonlydean
oneandonlydean merged commit f57babe into boykopovar:main Nov 1, 2026
11 of 12 checks passed
@GiannisG1
GiannisG1 deleted the test/msaa-retirement-skip-storage-without-feature branch November 19, 2026 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc*

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants