test(agc): skip the MSAA retirement storage promotion without shaderStorageImageMultisample #8604
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/8604"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by GiannisG1 on 2026-10-20T18:09:08Z.
What
agc_driver_multisample_retirementfails on devices withoutshaderStorageImageMultisample:StorageRemapasks for a storage view of the 4x target, andMultisampleTarget.cpp:383refuses it. The test checks onlyframebufferColorSampleCountsfor 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 featurePlaceholderImageShapeForDevicegates 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()andrun.OrderRemap()skip their own cases on such a device, andrun.StorageTwin()runs only withcontext.storageImageMultisample, so those lines stay as they are, inmain's order. #9455 (merged) changed lines insideStorageRemap, 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 onmain750cf6cf4. The PR changes only this test's source, so every other test binary is the same asmain's.agc_driver_multisample_retirement:main750cf6cf4shaderStorageImageMultisamplefalse)ctest -j4runs, 1 alone)StorageSrgbTwinandOrderRemapskip their own casesWith
VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation(layers 1.3.275),ANYPS5_NO_SHADER_CACHE=1,ANYPS5_REQUIRE_VULKAN=1,ctest -V: nowas not found but was requested by env var VK_INSTANCE_LAYERS; VUIDs the same onmain750cf6cf4and this PR (none on the HD 630,VUID-VkDeviceCreateInfo-pNext-pNexton the other two).tools/check_skips.pyaccepts the skip (exit 0 on each HD 630 run's JUnit file).Independently confirmed on Windows with an Intel Arc (Meteor Lake) GPU without
shaderStorageImageMultisampleby @BKlaasWerkman (comment above, on an earlier base).Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-20T18:13:40Z.
The skip line doesn't match
tools/check_skips.py'sDEVICE_LIMITATIONpattern, which needsskipped,(with the comma) before the device reason on the same line. "skipped the storage promotion, the device has no shaderStorageImageMultisample" has noskipped,, 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:(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
storageImageMultisamplethatMultisampleTarget.cpp:258refuses on.Imported from boykopovar/AnyPS5. Originally posted by GiannisG1 on 2026-10-20T20:40:22Z.
Thanks, you're right. With the old text,
tools/check_skips.pyexits 1 on the JUnit file from an HD 630 run; with yours it exits 0. Changed in cdf6c2857, 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.
Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-21T22:34:05Z.
Review: COMMENTED
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 hasshaderStorageImageMultisamplebut whose MSAA color target is born storable.On a device with programmable sample locations but only a 1x1 location grid,
MayReorderSamplesis true, soMultisampleTargetcreates the 4x color target withVK_IMAGE_USAGE_STORAGE_BITfrom the start (to write the guest's sample order back).MultisampleTargetStorageViewthen returns that already-storable image,makeStorableis a no-op, the owner's generation does not change, andStorageRemapfails itspromoted.generation != old.generationassertion:context.storageImageMultisampleis true on such a device, soconst bool storage = context.storageImageMultisample; if (storage) run.StorageRemap();still runsStorageRemapand the test still fails.OrderRemapalready handles exactly this device: its own guard isMayReorderSamples && 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
mainand with this PR applied.Tested
Ubuntu 26.04, i7-8700, Release,
BUILD_TESTING=ON,ANYPS5_NO_SHADER_CACHE=1, device selected withVK_ICD_FILENAMES, run as./agc_driver_multisample_retirement_tests. I applied this PR's change toagc_driver_multisample_retirementon top of currentmaina6dcea927.agc_driver_multisample_retirementmaina6dcea927MSAA storage promotion did not retain its source image)a6dcea927storageImageMultisampleis true, soStorageRemapstill runs)Driver log confirms the mechanism:
4 samples 2x2→MayReorderSamplesfalse → target born color-only →StorageRemappromotes and passes.4 samples 1x1, 8 samples 1x1→MayReorderSamplestrue → target born storable →makeStorableis a no-op →StorageRemapassertion 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.
Imported from boykopovar/AnyPS5. Originally posted by GiannisG1 on 2026-10-22T11:42:25Z.
Thanks, confirmed in the code on
main4777caca3: withMayReorderSamplesand a sample-order storage format the target getsVK_IMAGE_USAGE_STORAGE_BITat creation (MultisampleTarget.cpp:89-91),makeStorablereturns early (:192), so the generation doesn't change andMultisampleRetirement.cpp:478fails.#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
shaderStorageImageMultisamplethat its description lists as not run.