Skip to content

fix(agc): claim a multisampled color target that a single-sample storage image store overlaps - #13248

Merged
oneandonlydean merged 8 commits into
boykopovar:mainfrom
hugodearaujo:fix/agc-msaa-storage-claim
Nov 14, 2026
Merged

oneandonlydean merged 8 commits into
boykopovar:mainfrom
hugodearaujo:fix/agc-msaa-storage-claim

Conversation

@hugodearaujo

@hugodearaujo hugodearaujo commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

What

#8223 retires a multisampled color target that the title reused: a CPU write over it, or a depth, stencil, HTILE or color target bound over its memory, claims it, and the next guarded access retires it. A title can also reuse that memory through a dispatch, by storing to a single-sample storage image that overlaps it. That store gets none of #8223's evidence, so the cached image check in Revalidate (or the storage image lookup of a fresh build) still throws "overlaps multisampled color target … whose samples are only on the host".

This PR counts that store as a claim, like the binds in #8223:

  • resolveImageBinding: a storage image element that the binding records as stored (imageWritten[element]) claims, before its own guard, every target whose guarded ranges overlap the bytes of the level it stores to (WrittenStorageBytes, the same whole-block ranges main uses to retire covered depth surfaces). The element's descriptor words and level are kept in its DescribedRange.
  • revalidateFull: a kept stored element claims the same way before its a cached image access guard, so a resource set built before the target existed passes too. Ranges keep the build's binding order, so a read that comes before the store in the same set is still refused.
  • MultisampleTarget.cpp: MultisampleColorTargetOverlaps (a cheap check before the level's bytes are described) and ClaimMultisampleTargetStore, which sets fix(agc): retire a multisampled color target the title wrote over #8223's claimed flag on the overlapped non-FMASK ranges and logs the first 8 claims.

Still refused: an element the binding does not record as stored (an empty imageWritten, which main treats as written for store-back), an element that only reads, any other access to the memory, and a one-fragment target's FMASK guard (never claimed, as in #8223). Unlike #10049, the store does not have to cover the whole target, and a store whose shader also loads the image counts too, as a color target bound with blending does in #8223. A new debt entry, "Multisampled color targets under single-sample storage stores", says what is not exact: a target still sampled after such a store loses its samples, and where the store leaves the target's memory unwritten, guest memory keeps the bytes it held before the target instead of its samples.

Why: Assassin's Creed Mirage (PPSA13960 01.007.000). With #8223, the title stops at 73-85 s on

compute shader 0x1000810a00: AGC graphics: a cached image access of 0x10dc1d0000+0x480000 overlaps multisampled color target 0x10dc450000+0x480000 (4 samples), whose samples are only on the host: guest access to it is not implemented

As traced in this #8223 comment and the following one: every frame draws a 1x 1920x1080 color target at 0x10dc1d0000 and samples it, then draws the 4x 960x540 target at 0x10dc450000 (guarded for 0x480000 bytes, so its first 0x200000 bytes are the 1x image's last 0x200000), then compute shader 0x1000810a00, a 14-instruction clear with one image_store and no image load, writes the whole 1x image, and the next draws render into the 1x target again. The clear covers 0x200000 of the target's 0x480000 bytes, so #10049's full-cover rule does not fire. The resource set was built before the target first appeared, so the refusal comes from Revalidate.

A diagnostic build that logs every color target, guard, claim and retirement over that range shows the patched sequence on each of the 16 frames of that screen: the 4x target is guarded at its draw, the clear's Revalidate claims it (claim-by-store 0x10dc450000+0x480000 by 0x10dc450000+0x70000), the same cached image access retires it, and the next frame draws and guards it again.

#8223 (claimed, TargetUse) is merged now; this branch merged main 42d009f (11cfa16), so its diff against main is this change only.

Tested

Linux 7.2.11, RADV (Mesa 26.2.6), AMD Radeon RX 9070 XT, Release, BUILD_TESTING=ON, on main 3b32cc7 + #8223 d488531 (base 3ce340bf7a), this change on top (6a40548; the same commit was first tested on main 66b8e90).

  • After fix(agc): retire a multisampled color target the title wrote over #8223 was merged: main 42d009f merged in (11cfa16; the only conflict was the debt file, where this PR's new entry sits next to fix(agc): refuse buffer aliases of native MSAA targets #6498's). Paired validation on main 42d009f and this head, the same 56 entries with the Khronos layer: 55 of 56 on both with identical per-test results and no VUID- lines (agc_driver_native_multisample_depth fails on both on this machine, as below). Negative control: main 42d009f with only this PR's CachedImageMultisampleGuard.cpp fails agc_driver_cached_image_multisample_guard with a cached image access of …+0x4000 overlaps multisampled color target …+0x10000 (4 samples).
  • agc_driver_cached_image_multisample_guard, new CheckStoredImage, for compute and draw sets: a 64x64 linear storage image whose last 8 KiB overlap the first 8 KiB of a 4x 64x64 target (64 KiB guarded, different base):
    • stored: the set is built before the target is drawn. Revalidate passes and the target no longer reports host-only samples, and a read of its unstored half passes. The target is drawn again and guarded again; a fresh build passes and retires it; drawn once more, it is guarded.
    • read-only (imageWritten = {false}) and unknown use (imageWritten = {}): Revalidate and a fresh build both throw, and the target stays guarded.
    • a one-fragment target's FMASK guard under the same stored image: both throw with the FMASK message, and the guard stays.
  • Mutations, one at a time, each failing at its own check: no claims at all, and no claim in Revalidate: a cached image access of …+0x4000 overlaps multisampled color target …+0x10000 (4 samples); no claim in the build: a storage image access of …+0x4000 overlaps multisampled color target …; claiming for elements of unknown use: a fresh storage image that does not store over the guarded memory was accepted; claiming FMASK ranges: a cached storage image that does not store over the guarded memory was accepted.
  • Validation layer on the base and on this change, same machine and the same 56 ctest entries (every MSAA, FMASK, cached image, depth storage, storage cache, image table and draw cache reuse test), ctest -V with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_NO_SHADER_CACHE=1, ANYPS5_REQUIRE_VULKAN=1: 55/56 on both. The one failure on both, agc_driver_native_multisample_depth (the native depth buffer-write fixture was not bound as a host import, after host import … failed at vkAllocateMemory (-1000072003)), also fails on plain main on this machine. Neither log has a VUID- line or was not found but was requested; both have the same 25 Undefined-Value-ShaderOutputNotConsumed warnings from tests in main.
  • Assassin's Creed Mirage, Cross every 30 s from 60 s:
    • main 3b32cc7: stops at 73 s on a storage image access of 0x10dfd20000+0x1fe0000 overlaps multisampled color target 0x10e0720000+0x870000, then a CPU read of the same range in presentation (66b8e90: same, 73 s).
    • main + fix(agc): retire a multisampled color target the title wrote over #8223: stops at 73 s on the cached image access above (66b8e90 + fix(agc): retire a multisampled color target the title wrote over #8223: 81 s).
    • main + fix(agc): retire a multisampled color target the title wrote over #8223 + this PR: the store claims the target each frame ([gpu] a single-sample storage image store to 0x10dc450000+0x70000 claims the memory of multisampled color target 0x10dc450000+0x480000 (4 samples), 8 of 8 reports). In 12 of 14 runs (300 s or 110 s, on both bases) the title gets past the autosave notice where the two builds above stop, shows "Update! New Game+ Available", accepts Cross, and reaches the Menu Narration screen, still there at 300 s (about 15 frames per 10 s from 70 s on). In 2 of 14 runs it stops at 79 s on a different refusal, a follow-up this PR does not touch: [videoout] presentation failed: AGC graphics: a CPU read of 0x10dc1d0000+0x480000 overlaps multisampled color target 0x10dc450000+0x870000 (4 samples). That is a second 4x target (960x540, B10G11R11, 4-byte texels) drawn at the same address right after the last claim, and the read covers exactly the 1x image the clear stored.
  • tools/check_conventions.py --base 3ce340bf7a passes.
  • Linux and Windows, by milescoviello (comment), Release, GCC 15.2:
    • Ubuntu 26.04.1, RTX 4070 Ti (NVIDIA 615.71.09): head bf30501d66 merged onto main b8194198cf; agc_driver_cached_image_multisample_guard passes 3 of 3. With only this PR's test file on main b8194198cf, it fails at checking a compute storage image store over part of a 4x target with a cached image access of ... overlaps multisampled color target ... (4 samples), whose samples are only on the host.
    • Windows 11 VM, GeForce GT 1030 (WinLibs GCC 15.2 UCRT): this head merged onto main 5546586fb1; the test passes 3 of 3. main alone, with its own version of the test, passes 3 of 3 too.
  • Windows, AMD driver, by Ethan-Hainline (comment): head bf30501d66 merged onto main 510d0bf986, Windows 11 Pro, Radeon Vega iGPU (GCN, Ryzen 5 7530U), AMD driver 23.19.24.04, WinLibs GCC 16.2.0, Release, with the validation layer. agc_driver_cached_image_multisample_guard passes 3 of 3, the log has the store's claim of the 4x target, and no VUID- line.

Checklist

@github-actions github-actions Bot added the unblocks title Names a title ID on the Unblocks line label Oct 30, 2026
@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 18369 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp L1505

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 4448 docs/dev/debt/libSceAgcDriver.md
PR 5925 docs/dev/debt/libSceAgcDriver.md
PR 6186 docs/dev/debt/libSceAgcDriver.md
PR 6192 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6280 docs/dev/debt/libSceAgcDriver.md
PR 6340 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6412 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6481 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6804 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6808 core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7085 docs/dev/debt/libSceAgcDriver.md
PR 7256 docs/dev/debt/libSceAgcDriver.md
PR 7449 docs/dev/debt/libSceAgcDriver.md
PR 7642 core/libs/prx/libSceAgcDriver/Graphics/include/MultisampleTarget.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7689 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 8592 docs/dev/debt/libSceAgcDriver.md
PR 9335 docs/dev/debt/libSceAgcDriver.md
PR 9356 docs/dev/debt/libSceAgcDriver.md
PR 9387 docs/dev/debt/libSceAgcDriver.md
PR 9508 core/libs/prx/libSceAgcDriver/Graphics/include/MultisampleTarget.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 9712 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 9852 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 9895 docs/dev/debt/libSceAgcDriver.md
PR 9897 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 9950 docs/dev/debt/libSceAgcDriver.md
PR 10049 core/libs/prx/libSceAgcDriver/Graphics/include/MultisampleTarget.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/execution/CachedImageMultisampleGuard.cpp
docs/dev/debt/libSceAgcDriver.md
PR 10193 core/libs/prx/libSceAgcDriver/Graphics/include/MultisampleTarget.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 10351 docs/dev/debt/libSceAgcDriver.md
PR 10359 docs/dev/debt/libSceAgcDriver.md
PR 10442 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 10894 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 11444 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 11551 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 11825 docs/dev/debt/libSceAgcDriver.md
PR 12575 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 12904 docs/dev/debt/libSceAgcDriver.md
PR 13809 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 13863 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
docs/dev/debt/libSceAgcDriver.md
PR 13920 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
docs/dev/debt/libSceAgcDriver.md
PR 13928 core/libs/prx/libSceAgcDriver/Graphics/include/MultisampleTarget.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 13929 core/libs/prx/libSceAgcDriver/Graphics/include/MultisampleTarget.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 14032 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 14262 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 14344 docs/dev/debt/libSceAgcDriver.md
PR 14944 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 15136 docs/dev/debt/libSceAgcDriver.md
PR 15456 docs/dev/debt/libSceAgcDriver.md
PR 15529 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 15548 docs/dev/debt/libSceAgcDriver.md
PR 15570 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 15621 docs/dev/debt/libSceAgcDriver.md
PR 15659 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 16054 docs/dev/debt/libSceAgcDriver.md
PR 16483 core/libs/prx/libSceAgcDriver/Graphics/include/MultisampleTarget.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
docs/dev/debt/libSceAgcDriver.md
PR 16831 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 17024 docs/dev/debt/libSceAgcDriver.md
PR 17056 docs/dev/debt/libSceAgcDriver.md
PR 17611 docs/dev/debt/libSceAgcDriver.md
PR 17788 docs/dev/debt/libSceAgcDriver.md
PR 17796 docs/dev/debt/libSceAgcDriver.md
PR 17899 docs/dev/debt/libSceAgcDriver.md
PR 18082 docs/dev/debt/libSceAgcDriver.md
PR 18101 docs/dev/debt/libSceAgcDriver.md
PR 18102 docs/dev/debt/libSceAgcDriver.md
PR 18139 docs/dev/debt/libSceAgcDriver.md
PR 18155 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 18390 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 18455 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 18515 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 19191 docs/dev/debt/libSceAgcDriver.md
PR 19620 docs/dev/debt/libSceAgcDriver.md

@bunbeans2-arch

Copy link
Copy Markdown
Contributor

Windows data point to go with the RADV run in the description: AMD Radeon RX 9070 XT (RDNA 4) on AMD's Windows driver 32.0.32015.7029, Windows 11 Pro 22631, MSYS2 UCRT64 GCC 16.1, Release, BUILD_TESTING=ON, with the Khronos validation layer loaded.

Tree: main 409fe64199 with this PR merged on top. Every test executable was rebuilt for each tree before running.

main with this PR
agc_driver_sample_multisample_target passes 3 of 3 passes 3 of 3
agc_driver_cached_image_multisample_guard passes 3 of 3 passes 3 of 3
agc_driver_native_multisample_depth and native_depth_* (5 tests) pass 3 of 3 pass 3 of 3
VUID- lines 0 0

None of these skipped. I did not run the changed tests against main's driver code, so this shows no regression on this driver, not that the tests catch the bug here.

AI-assisted: yes (Claude Code)

@hugodearaujo

Copy link
Copy Markdown
Contributor Author

@bunbeans2-arch thanks for the RDNA 4 run on AMD's Windows driver; good to have the multisample and native-depth tests clean there too.

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head 6a40548 merged onto main 98ddd9c · tested 2026-10-30 10:17 UTC · 23 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 ✅ 2,282 passed · 4 failed (0 new, 2 also fail on main, 2 unstable on main) · 40 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 2,326 of 2,987 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 (861 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_bda_device 56.1 s
Unstable on main (2, these also failed in recent main runs on this machine; not counted against this PR)
agc_submit_progress: failed in 5 of the last 8 main runs
agc_submit_progress_no_timeline: failed in 6 of the last 8 main runs
Failing on main too (2, not counted against this PR)
guest_mmap_executable
guest_socket_options_multicast
Validation IDs already present on main (4 IDs in 390 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (390 tests): agc_compute_pipeline_replay, agc_driver, agc_driver_address_passes_draw_transitions, agc_driver_address_passes_targets_split, agc_driver_array_layer_target_cpu, agc_driver_bda_span_reads_draw_pipeline, agc_driver_bindless_images, agc_driver_branch_past_endpgm, and 382 more
VUID-vkCmdCopyImage-srcImage-01548 (13 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_plane_sampling, and 5 more
VUID-vkCmdCopyImage-srcImage-01551 (13 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_plane_sampling, and 5 more
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (2 tests): agc_driver_prepared_exports, agc_driver_srgb8_color_target
Skipped (40)
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_driver_sample_order_grid_reference: skipped, the device does not keep depth drawn at custom sample locations at those locations, even after a transition that names them: the composite of uniform renders holds the guest's depth in 0 of 3005 sloped samples, so no path can be compared with it bit for bit
agc_driver_stencil_ref_export: skipped, the device lacks VK_EXT_shader_stencil_export
agc_driver_vertex_elected_atomic_max: skipped, the device runs vertex programs in subgroups, so they keep their cross-lane reductions
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
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip_in_order: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_main: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_fresh: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_labels: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is eithe
Reproduce
git fetch origin 6a40548ab241405796805bed5413963d2e7bcc4b 98ddd9c1792bbab016ceed5db267a93d1d61f00a
git checkout 98ddd9c1792bbab016ceed5db267a93d1d61f00a && git merge --no-ff 6a40548ab241405796805bed5413963d2e7bcc4b
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.

@oneandonlydean oneandonlydean self-assigned this Oct 30, 2026
# Conflicts:
#	docs/dev/debt/libSceAgcDriver.md
@JJenkx

JJenkx commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Windows GPU run of head 11cfa16b5e, merged onto main 1c6b316cf7 (clean merge, local only).

Windows 11 Enterprise 10.0.22621, Ryzen 9 5950X, Radeon RX 6700 XT with AMD proprietary driver 26.10.1 (Vulkan 1.4.315), WinLibs GCC 15.2.0 UCRT r7, Ninja, Release, BUILD_TESTING=ON. Khronos validation layer 1.4.309 requested for every test (VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation).

  • agc_driver_cached_image_multisample_guard, built from the test files this PR changes: pass, 3 of 3 runs each (--repeat until-fail:3), no failures, no skips.
  • They create Vulkan instances on the RX 6700 XT: the validation layer was inserted 3 times across the runs and reported no VUIDs.
  • Negative control: this PR's test files on main sources (one run) fail: agc_driver_cached_image_multisample_guard. So the test catches what the change fixes on this GPU.

AI-assisted: yes (Claude Code).

@TechLevelZero

TechLevelZero commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head 11cfa16 merged onto main f2d874c · tested 2026-11-02 01:32 UTC · 33 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 ✅ 2,444 passed · 7 failed (0 new, 4 also fail on main, 3 unstable on main) · 46 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 2,497 of 3,168 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 (936 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.1 s, ⚠️ agc_driver_lookup_log_fits_build 85.7 s, ⚠️ agc_driver_graphics_maps_fallback 31.2 s, ⚠️ agc_driver_graphics 30.2 s
Intermittent validation messages (1, seen once in the parallel run, not reproduced when the test was re-run alone 2 times; not counted against this PR)
agc_driver_depth_clear_hle: VUID-vkCmdCopyBuffer-commonparent (6x)
Unstable on main (3, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_depth_clear_hle: failed in 1 of the last 10 main runs
agc_driver_pipeline_journal: failed in 1 of the last 10 main runs
agc_submit_progress: failed in 6 of the last 10 main runs
Failing on main too (4, not counted against this PR)
agc_driver_dcc_keys_first_write
agc_driver_image_table
guest_mmap_executable
guest_socket_options_multicast
Validation IDs already present on main (5 IDs in 484 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (484 tests): agc_driver, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, and 476 more
VUID-vkCmdCopyImage-srcImage-01548 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_prepared_exports
VUID-VkShaderModuleCreateInfo-pCode-08737 (1 test): agc_driver_image_sample_derivatives
Skipped (46)
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_sample_order_grid_reference: skipped, the device does not keep depth drawn at custom sample locations at those locations, even after a transition that names them: the composite of uniform renders holds the guest's depth in 0 of 3005 sloped samples, so no path can be compared with it bit for bit
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_pipeline_binary_vulkan: skipped, the device lacks VK_KHR_pipeline_binary
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip_in_order: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_dcc: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_deferred: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_main: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_fps_limit: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL
Reproduce
git fetch origin 11cfa16b5e4bd19714b154aa35f460e32eb3a4fa f2d874c1fdccf781c0fa5d86619bb5dd8894b958
git checkout f2d874c1fdccf781c0fa5d86619bb5dd8894b958 && git merge --no-ff 11cfa16b5e4bd19714b154aa35f460e32eb3a4fa
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 added docs agc libSceAgc* labels Oct 30, 2026
@jacknieland

Copy link
Copy Markdown
Contributor

NVIDIA on Windows, for head 11cfa16b5e merged into main 6a691f69ee (clean merge). Earlier runs here are RADV on Linux and NVIDIA RTX 2000 Ada on Linux.

GPU: NVIDIA GeForce GTX 1650 (Turing, 0x1f91), driver 566.41, Vulkan 1.3.289. The driver logs Selected GPU name=NVIDIA GeForce GTX 1650. Host: Windows 11 Pro 26200, i7-9750H, WinLibs GCC 15.2.0 (x86_64-ucrt-posix-seh, r7), Release, BUILD_TESTING=ON. Vulkan SDK 1.4.363.0 validation layer.

ctest -R cached_image_multisample_guard -V, on main and on the merge, from the same machine and GPU with ANYPS5_GPU=NVIDIA, ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation:

  • main: agc_driver_cached_image_multisample_guard passes, with 0 VUID- lines.
  • This PR: passes, with 0 VUID- lines. The new compute and draw storage-image cases over 4x and one-fragment targets run, and the claim message is logged.
  • Neither log contains was not found but was requested by env var VK_INSTANCE_LAYERS. A separate run with VK_LOADER_DEBUG=layer shows the loader inserting VK_LAYER_KHRONOS_validation.
  • Red/green: this PR's CachedImageMultisampleGuard.cpp on main's driver fails at "a compute storage image store over part of a 4x target" with a cached image access of 0x20000e000+0x4000 overlaps multisampled color target 0x200010000+0x10000 (4 samples), whose samples are only on the host: guest access to it is not implemented.

Only this test target was built, not the full suite, and no title was run. AI-assisted.

@github-actions github-actions Bot added review queue Next in the maintainer review queue: checks pass, no open change request, no conflict and removed review queue Next in the maintainer review queue: checks pass, no open change request, no conflict labels Nov 2, 2026

@XairRrR XairRrR 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.

Reviewed — approved

A storage image element that the binding records as stored now claims the multisampled color targets it overlaps, both in a fresh build and in Revalidate. The change builds, and the changed test passes here and fails against main's driver code.

What I ran

Head 11cfa16b5e4bd19714b154aa35f460e32eb3a4fa, main 9090972b7e91fd266819cbd77a8b058e177b5682, merged with --no-ff in a clean worktree. Machine: Debian 13 VM, GCC 14.2.0, Release, Ninja, lavapipe (Mesa 26.1.6, LLVM 19), no GPU.

git diff --check 9090972b7e91fd266819cbd77a8b058e177b5682...11cfa16b5e4bd19714b154aa35f460e32eb3a4fa
python3 tools/check_conventions.py --base 9090972b7e91fd266819cbd77a8b058e177b5682
ctest --test-dir build -j8 --test-load 32 --output-on-failure -R "cached_image_multisample_guard|multisample_retirement|multisample_srgb_twin|multisample_fill_host_only|sample_multisample_target|agc_multisample_guest_access"
ctest --test-dir build -V -R cached_image_multisample_guard
# negative control
git show 9090972b7e:<4 production files> > <path>
ninja -C build -j32 -l32 agc_driver_cached_image_multisample_guard_tests
ctest --test-dir build --output-on-failure -R cached_image_multisample_guard
git show 780aab9dc2:<4 production files> > <path>
ninja -C build -j32 -l32 agc_driver_cached_image_multisample_guard_tests
ctest --test-dir build -R cached_image_multisample_guard
git status --porcelain

Results

Check Result
git diff --check clean
check_conventions.py All conventions checks passed
Configure, build, libs (script) ok
Selected tests (script, 2038 run) no new failures, no timeouts. The 7 known failures (agc_driver_division, the denormal-mode tests, unwrap_self, vector_constant_factor_tininess) also fail on main
Validation layer (script, 757 tests, layer loaded in 756, missing in none) 0 tests with new VUID- lines compared with main
6 focused multisample tests 6/6 pass. The longest is agc_driver_sample_multisample_target at 8.2 s
agc_driver_cached_image_multisample_guard passes in 0.21 s. All 8 new CheckStoredImage cases run (compute and draw × store / read / unknown use / FMASK), and the claim line is printed 4 times
New cases in the changed test
[gpu] a single-sample storage image store to 0x7f1bdde9e000+0x4000 claims the memory of multisampled color target 0x7f1bddea0000+0x10000 (4 samples)
...
checking a compute storage image store over part of a 4x target
checking a compute storage image read over part of a 4x target
checking a compute storage image of unknown use over part of a 4x target
checking a compute storage image store over a one-fragment target's FMASK
checking a draw storage image store over part of a 4x target
checking a draw storage image read over part of a 4x target
checking a draw storage image of unknown use over part of a 4x target
checking a draw storage image store over a one-fragment target's FMASK
cached image multisample guard tests passed

Negative control

I restored MultisampleTarget.hpp, ShaderResources.hpp, MultisampleTarget.cpp and ShaderResources.cpp from main and kept the PR's test, then rebuilt. The test failed at the first new case:

Output
checking a compute storage image store over part of a 4x target
AGC graphics: a cached image access of 0x7fe6c461e000+0x4000 overlaps multisampled color target 0x7fe6c4620000+0x10000 (4 samples), whose samples are only on the host: guest access to it is not implemented
0% tests passed, 1 tests failed out of 1

This matches the negative controls JJenkx and jacknieland reported. After I restored the merged files and rebuilt, the test passes again and git status --porcelain is empty.

Findings

Blocking

None.

Non-blocking

  • Unblocks line has no Game bring-up discussion. CONTRIBUTING asks for the title ID together with its Game bring-up discussion (Unblocks: PPSA01325 #3232). The line names PPSA13960 but no discussion. Please add the discussion number if one exists.
  • A claim survives a build that is refused later. In core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp:5196 the claim is made before the element's own lookup and before the later bindings of the same set. If a later binding is refused (for example a read of a different, still-guarded range), the target is already claimed, and the next guarded access anywhere retires it. This is the same "a bind counts as reuse" trade-off as #8223, and the new debt entry covers the visible effect (a target sampled after the store loses its samples). I mention it so the reconciliation with #10049 that the description already plans can take it into account.

On the code itself:

  • The decode used in revalidateFull (DecodeTextureResource(*range.storedWords)) matches the build. record->resource comes from the same DecodeTextureResource(words) (ShaderResources.cpp:4972), and the stored mip already includes the dedupe mipOffset.
  • ClaimMultisampleTargetStore changes only the atomic claimed flag, under the shared lock. Retirement still happens under the unique lock in RequireNoMultisampleColorTarget.
  • k2DMsaa storage elements leave through the earlier continue at ShaderResources.cpp:5172-5187, so they never claim.

Not verified

  • No hardware GPU here: the tests ran only on lavapipe. Other people's comments cover RADV (RX 9070 XT), AMD Windows (RX 9070 XT, RX 6700 XT) and NVIDIA (RTX 2000 Ada Linux, GTX 1650 Windows).
  • The Assassin's Creed Mirage (PPSA13960) results: I launched no titles.
  • The epoch fast path of Revalidate (ShaderResources.cpp:3663-3678) skips both the claim and the guard, as it already did on main. No test here exercises a target guarded between two epoch-proved reuses.
  • The interaction with #10049 and #12745, which touch the same functions.

@github-actions github-actions Bot added review queue Next in the maintainer review queue: checks pass, no open change request, no conflict and removed review queue Next in the maintainer review queue: checks pass, no open change request, no conflict labels Nov 2, 2026
@adam25136

adam25136 commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Windows and NVIDIA Blackwell run, for head 11cfa16b5e merged into main 1e658521a0 (git merge --no-ff, clean merge).

GPU NVIDIA GeForce RTX 5080 (10de:2c02), driver 617.42 (32.0.16.1742), Vulkan 1.4.351
Host Windows 10 Pro 22H2 (19045), i9-12900KF, WinLibs GCC 15.2.0 r7, Release, BUILD_TESTING=ON
Selection 2,178 of 3,924 tests, chosen by tools/select_tests.py select from main's build graph for the 6 changed files
Run select_tests.py ctest build --parallel 4 --timeout 120 with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1; main ran the full suite the same way on this machine
Result 2,164 passed, 12 skipped (the same 12 as on main), 2 failed, 0 new

Both failures fail on main here too: agc_driver_store_over_untracked (#15559, since b6c6549) and agc_driver_direct_write_completion, which fails on main on this machine as well, also when run on its own (33 of 34 runs). No selected test took over 30 s.

Not run: the Khronos validation layer is not installed on this machine, so this says nothing about VUIDs. No title was run.

AI-assisted: yes. Claude Code ran the builds and tests and drafted this comment; the numbers are from the runs on this machine.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 4, 2026
# Conflicts:
#	docs/dev/debt/libSceAgcDriver.md
@hugodearaujo

Copy link
Copy Markdown
Contributor Author

Merged current main (c2eafe4) in 01ef7271b7. The only conflict was in docs/dev/debt/libSceAgcDriver.md: main added the "Written type-0 and type-1 texture descriptors" entry and extended "Multisampled color targets", and this PR adds the entry after them. All three are kept. On the merge, with the validation layer, agc_driver_cached_image_multisample_guard and agc_driver_native_multisample_depth pass (100% tests passed out of 2), with no VUID- line.

@github-actions github-actions Bot removed needs rebase Conflicts with main, rebase needed review queue Next in the maintainer review queue: checks pass, no open change request, no conflict labels Nov 4, 2026
@TechLevelZero

TechLevelZero commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head 01ef727 merged onto main 5299939 · tested 2026-11-06 17:54 UTC · 16 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 ✅ 2,931 passed · 4 failed (0 new, 4 also fail on main) · 52 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 2,987 of 4,210 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 (986 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 115.9 s
Failing on main too (4, not counted against this PR)
agc_driver_image_table
guest_mmap_executable
guest_socket_options_multicast
web_library_assets
Validation IDs already present on main (9 IDs in 594 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (594 tests): agc_driver, agc_driver_address_draw_space_reuse, agc_driver_address_passes, agc_driver_address_passes_targets_split, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, and 586 more
VUID-VkShaderModuleCreateInfo-pCode-08737 (14 tests): agc_driver_dpp16_operands, agc_driver_dpp8_pk_fmac, agc_driver_dx10_clamp, agc_driver_f16_fma_denormal_modes, agc_driver_f16_fma_invalid_nan, agc_driver_float16_fma_rounding, agc_driver_float16_modifiers, agc_driver_float16_native, and 6 more
VUID-VkShaderModuleCreateInfo-pCode-08739 (14 tests): agc_driver_dpp16_operands, agc_driver_dpp8_pk_fmac, agc_driver_dx10_clamp, agc_driver_f16_fma_denormal_modes, agc_driver_f16_fma_invalid_nan, agc_driver_float16_fma_rounding, agc_driver_float16_modifiers, agc_driver_float16_native, and 6 more
VUID-VkShaderModuleCreateInfo-pCode-08741 (14 tests): agc_driver_dpp16_operands, agc_driver_dpp8_pk_fmac, agc_driver_dx10_clamp, agc_driver_f16_fma_denormal_modes, agc_driver_f16_fma_invalid_nan, agc_driver_float16_fma_rounding, agc_driver_float16_modifiers, agc_driver_float16_native, and 6 more
VUID-vkCmdCopyImage-srcImage-01548 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_prepared_exports
VUID-VkPipelineShaderStageCreateInfo-module-parameter (1 test): agc_driver_float16_unused_nan_payloads
VUID-VkPipelineShaderStageCreateInfo-pSpecializationInfo-06849 (1 test): agc_driver_float16_unused_nan_payloads
Skipped (52)
agc_driver_gcn_display_present: skipped, no display: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
agc_driver_sample_order_grid_reference: skipped, the device does not keep depth drawn at custom sample locations at those locations, even after a transition that names them: the composite of uniform renders holds the guest's depth in 0 of 3005 sloped samples, so no path can be compared with it bit for bit
agc_driver_scattered_runs: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_vertex_elected_atomic_max: skipped, the device runs vertex programs in subgroups, so they keep their cross-lane reductions
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_net_ctl_disconnected: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_device_capability: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_host_resolution_disabled: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_host_resolution_four_k: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_host_resolution_height_only: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_host_resolution_limit: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_host_resolution_malformed: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_host_resolution_width_only: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip_in_order: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_dcc: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not a
Reproduce
git fetch origin 01ef7271b7703a5be91caa874af987b654fd2b7f 5299939ecfa9e186e1eb457c6f4bd133bdb087c7
git checkout 5299939ecfa9e186e1eb457c6f4bd133bdb087c7 && git merge --no-ff 01ef7271b7703a5be91caa874af987b654fd2b7f
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.

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ AMD GPU test: passed

PR head 01ef727 merged onto main 5b1d381 · tested 2026-11-04 09:47 UTC · 37 min

GPU AMD Radeon RX 6300 (RADV NAVI24), driver Mesa 25.2.8-0ubuntu0.24.04.4, Vulkan 1.4.318
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-42-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,755 passed · 8 failed (0 new, 7 also fail on main, 1 unstable on main) · 58 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 2,821 of 3,883 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 (973 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.3 s, ⚠️ public_headers 48.6 s, ⚠️ agc_driver_image_sample_unnormalized 47.0 s, ⚠️ agc_driver_sample_multisample_target 38.8 s, ⚠️ agc_driver_lazy_resolved_abi 38.5 s
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 8 of the last 10 main runs
Failing on main too (7, not counted against this PR)
agc_driver_image_table
agc_driver_native_depth_bda_clear
agc_driver_native_multisample_depth
agc_submit_progress
agc_submit_progress_no_timeline
guest_mmap_executable
guest_socket_options_multicast
Validation IDs already present on main (8 IDs in 544 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (544 tests): agc_driver, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, and 536 more
VUID-vkCmdCopyImage-srcImage-01548 (4 tests): agc_driver_depth_clear_hle, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (4 tests): agc_driver_depth_clear_hle, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (2 tests): agc_driver_prepared_exports, agc_driver_srgb8_color_target
VUID-VkSamplerCreateInfo-addressModeU-01079 (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeU-parameter (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeV-parameter (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeW-parameter (1 test): agc_driver_image_gather_volume
Skipped (58)
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_copied_writer_label_order: skipped, the device reports a minStorageBufferOffsetAlignment of 4, so the dispatch binds its record at +0x1004 in place and nothing is written back; the test needs an alignment above 4
agc_driver_float16_unused_nan_payloads: skipped, the device has no native f16 conversions with RTE rounding and kept f16 denormals
agc_driver_gcn_display_present: skipped, no display: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
agc_driver_image_table_vouched_lookups: skipped, the device reports 4 of 4 host-imported pages written after a GPU read, so a watched imported table cannot be vouched for
agc_driver_linear_target_direct_write_completion: skipped, the device does not keep host imports write-watched, so no completion stamp over the target is tracked
agc_driver_ngg_vertex_wave_reduction: skipped, s3 describes a 32-lane wave only on 32-lane subgroups, and the device has 64 lanes
agc_driver_scattered_runs: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_sparse_dma_buf_import: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_unit_shadow: skipped, the device does not import watched host memory for unit shadows
agc_driver_unit_shadow_budget: skipped, the device does not import watched host memory for unit shadows
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_idle_publish_wait: skipped, the device reports 4 of 4 host-imported pages written after a GPU read, so a forced watch of the import reads its submissions as CPU stores
agc_shadowed_key_stores: skipped, the device imports no watched host memory under a unit shadow
agc_small_tiled_shadow_label: skipped, host imports are unavailable: the test block is not imported and watched
agc_storage_clear_hand_over: skipped, the device imports no watched host memory for the clear-key hand-over
agc_storage_pending_key_refresh: skipped, refreshes over a pending key store are not testable here
agc_unit_shadow: skipped, the device does not import watched host memory for unit shadows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or plat
Reproduce
git fetch origin 01ef7271b7703a5be91caa874af987b654fd2b7f 5b1d381d5ad5d9f923326b18479c3bd889cdd588
git checkout 5b1d381d5ad5d9f923326b18479c3bd889cdd588 && git merge --no-ff 01ef7271b7703a5be91caa874af987b654fd2b7f
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 12 --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 16 --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 AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@DonRyuzaki

Copy link
Copy Markdown
Contributor

Windows AMD RX 7800 XT data point for exact head 01ef727, merged alone into main b611e63 (local merge 2a20b30a94d437c1762df57747fd12af5d643132, clean tree).

Windows x64 build 26300.9711, AMD driver 26.10.1 (LLPC), Vulkan 1.4.359, WinLibs GCC 15.2.0 UCRT, Release. agc_driver_cached_image_multisample_guard passed on main and this head; the PR extends that test with the storage-image claim cases. agc_driver_native_multisample_depth also passed on this head (24 cases, none unavailable). Logs selected AMD Radeon RX 7800 XT (1002:747e).

I ran ctest --test-dir R:/b-latest -V with ANYPS5_GPU=7800 XT, ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation. The layer loaded from Steam's CEF bundle. It uses older Vulkan headers and reports VUID-VkDeviceCreateInfo-pNext-pNext for unknown extension structs on both main and this head; no additional VUID ID appeared. That limits the validation conclusion. AI-assisted local test; no game or FPS claim.

@ryanc2112

Copy link
Copy Markdown
Contributor

A GFX8 data point: AMD Radeon RX 570 (RADV POLARIS10), Mesa 26.2.5, SteamOS 3.8.28 (Arch distrobox), GCC 16.2.1, Release. Head 01ef7271b7 merged onto main b11c7bf84f (clean merge), with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation and ctest -V --no-tests=error. No log reports was not found but was requested by env var VK_INSTANCE_LAYERS.

agc_driver_cached_image_multisample_guard, 3 runs each:

main This PR
Result passes, 3 of 3 passes, 3 of 3
VUID- errors 0 0

The 1,327 AGC, shader, VideoOut and Vulkan tests, once each:

AI-assisted: yes (Claude Code)

@NathanFahey23

Copy link
Copy Markdown
Contributor

Windows and NVIDIA run on the current head, for 01ef7271b7 merged with --no-ff onto main f1030687de (df62783d24, clean merge). The earlier Windows runs here were for 11cfa16b5e.

GPU NVIDIA GeForce RTX 4080 (10de:2704, discrete), driver 32.0.16.2101
Host Windows 11 Home 10.0.26300, WinLibs GCC 15.2.0 UCRT posix-seh r7, Release, BUILD_TESTING=ON
Environment ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1, Selected GPU name=NVIDIA GeForce RTX 4080; no validation layer on this machine
Tests ctest -R '^(agc_|shader|video_out|guest_video)'
Build Result
main f1030687de 1466 of 1467; only agc_driver_direct_write_completion fails (#15564)
this PR on main 1466 of 1467; the same test fails, nothing else. agc_driver_cached_image_multisample_guard passes

AI-assisted: yes.

@gabichuuuuu gabichuuuuu 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.

Ran 01ef7271b7 merged on main 302864d on Windows 11 x64 (WinLibs GCC 15.2), on an NVIDIA laptop GPU (Turing, driver 621) and an Intel iGPU (driver 101.70xx), with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation (Khronos validation layer 1.4.368), ctest -R '^agc_driver_cached_image_multisample_guard' -V:

main main + only this PR's CachedImageMultisampleGuard.cpp change, 2 runs each
NVIDIA passed failed passed
Intel passed failed passed
  • Without the driver change, the updated test fails on both GPUs with "a cached image access of … overlaps multisampled color target … (4 samples), whose samples are only on the host: guest access to it is not implemented". With the change, the overlapping single-sample store claims the target, and the test passes every time.
  • The test file hasn't changed on main since the branch point, so the middle column is the PR's own test on main's code.
  • The layer was inserted in the test. No log has was not found but was requested by env var VK_INSTANCE_LAYERS, and no log on either side has a VUID-. To be sure validation messages reach these logs, the same layer with best practices on printed 28 BestPractices- warnings into an agc_driver_recorder log on each GPU.

AI-assisted: yes.

@freneza

freneza commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Tested on PPSA01317 (01.710.000): Linux (Bazzite 44), RTX 5070, NVIDIA 615.78.08.

88091bc014 was cherry-picked onto a local branch of main 4977f64 that also carries #10049. Both change the storage-image path in ShaderResources.cpp, so I kept both: DescribedRange has #10049's overwrites and this PR's storedWords/storedMip. The cached image check claims the stored memory first and then calls RequireNoMultisampleColorTarget with #10049's overwritten ranges.

On the same stack without this commit, the Licence Centre stops on:

a cached image access of 0x1238ba0000+0x1560000 overlaps multisampled color target 0x1238d30000+0x2d0000 (4 samples), whose samples are only on the host

It is a 21 MiB storage image over a 4-sample, 2-fragment EQAA target and its FMASK, used every frame (the case described in #17159). With this commit, the Licence Centre loads and its menu renders, and the log has no overlaps multisampled color target refusal. Before, I used a local change that retired the target on any overlapping access; that change was not in this run. The run stops later on an unrelated hull-shader issue (#17251).

@Lucke0051

Copy link
Copy Markdown
Contributor

This PR merges onto current main (095ff72) without conflicts, but the merge no longer builds (gcc 16.2.1, Release):

core/libs/prx/libSceAgcDriver/tests/execution/CachedImageMultisampleGuard.cpp:207:45: error: no match for 'operator=' (operand types are 'ShaderRecompiler::ElementFlags' and 'std::remove_reference<std::vector<bool>&>::type' {aka 'std::vector<bool>'})

#6970 (merged 2026-11-08) changed DescriptorBinding::imageWritten from std::vector<bool> to ShaderRecompiler::ElementFlags. CheckStoredImage still takes std::vector<bool> written and does binding.imageWritten = std::move(written);. It needs a rebase onto main with that parameter (or the assignment) moved to ElementFlags.

Because of that I could not run its tests on the RTX 3070 Ti (NVIDIA 615.78.08) and the UHD 630 (Mesa 26.2.6), CachyOS. I can rerun them after a rebase.

AI-assisted: yes (Claude ran the tests and drafted this comment)

boykopovar#6970 changed DescriptorBinding::imageWritten from std::vector<bool>
to ShaderRecompiler::ElementFlags, so CheckStoredImage takes the flags
it assigns there in that type.
@hugodearaujo

hugodearaujo commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor Author

@Lucke0051 Thanks for catching it. Fixed in 89e2342b85: I merged main bbaa4bf (9ddecea13d, no force-push), and CheckStoredImage now takes ShaderRecompiler::ElementFlags. It also read written.front(), which ElementFlags doesn't have, so that reads written[0] now. Nothing else in the PR changed.

Built here (gcc 16.2.1, Release) and ran the depth and storage set with the validation layer on an RX 9070 XT (RADV, Mesa 26.2.6), 61 tests:

  • 59 pass, agc_driver_cached_image_multisample_guard among them;
  • 2 skip because this device can't run them (agc_storage_pending_key_refresh and agc_storage_clear_hand_over);
  • no log has a VUID- line.

I left agc_storage_write_back_scratch out of this run: the amdgpu kernel driver on this machine faulted during a run of it yesterday. Rerun since on its own, after a kernel update, it passes 3 of 3 runs on this head, with no VUID- line and no amdgpu error in the kernel log. check_conventions passes.

@hugodearaujo

Copy link
Copy Markdown
Contributor Author

@freneza Thanks for running it on PPSA01317. I've added the title to the Unblocks line, noting that your stack also carried #10049. Your resolution keeps #10049's overwrites and this PR's storedWords/storedMip side by side in DescribedRange, which is what this PR will need if #10049 lands first. The current head, 89e2342b85, is 88091bc014 with main merged in and its test moved to ElementFlags after #6970, with no change to the fix.

@Lucke0051

Copy link
Copy Markdown
Contributor

Thanks, 89e2342b85 builds. Merged onto current main (af8088a), it changes no result on either GPU compared with main on its own:

GPU, driver, OS main this PR on main
NVIDIA GeForce RTX 3070 Ti, NVIDIA 615.78.08, CachyOS 1 of 1527 fails, 45 skip the same failure, the same skips
Intel UHD Graphics 630 (CML GT2), Mesa 26.2.6, CachyOS 12 of 1527 fail, 73 skip the same 12 failures, the same skips
ANYPS5_GPU=<NVIDIA|UHD> ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -j8 --timeout 120 -R '^(agc|video_out|shader)'

agc_driver_cached_image_multisample_guard passes on both GPUs, also in 3 more runs alone on each. agc_storage_write_back_scratch passes on both. agc_storage_pending_key_refresh and agc_storage_clear_hand_over, which skip on your RX 9070 XT, pass on the RTX 3070 Ti and skip on the UHD 630. The validation layer isn't installed on this machine, so this run doesn't check for VUID- errors.

Failures that main has too (unchanged)
  • RTX 3070 Ti: agc_driver_present_upscale
  • UHD 630: agc_driver_f32_denormal_flush, agc_driver_f64_rounding_denormal_modes, agc_driver_gcn_display_present, agc_driver_gds_integer_atomics64_contention, agc_driver_image_sample_lod_clamp, agc_driver_native_color_initial_nonuniform, agc_driver_native_color_initial_nonuniform_capabilities, agc_driver_native_color_initial_nonuniform_hook, agc_driver_native_color_initial_nonuniform_lifetime, agc_driver_packed_float_blend, agc_driver_sample_multisample_target, agc_idle_publish_dmabuf_wait

AI-assisted: yes (Claude ran the tests and drafted this comment)

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 9, 2026
@hugodearaujo

Copy link
Copy Markdown
Contributor Author

#12745 added if (!cpuWriters) continue; right after the revalidateFull line that this PR turns into a block with the claim, so I merged main 4a467be into this branch (bf30501d66, no force-push). The merge keeps both: the claim and the multisampled colour check still run for every described range, and then main's new continue skips the CPU-write completion as before. This PR's added and removed lines are unchanged.

With the validation layer, the same command as before, 62 tests:

  • 60 pass, agc_multisample_guest_access and agc_driver_cached_image_multisample_guard among them;
  • 2 skip because this device can't run them (agc_storage_pending_key_refresh and agc_storage_clear_hand_over);
  • no log has a VUID- line.

agc_storage_write_back_scratch is still left out, as before. check_conventions passes.

@github-actions github-actions Bot added review queue Next in the maintainer review queue: checks pass, no open change request, no conflict and removed needs rebase Conflicts with main, rebase needed review queue Next in the maintainer review queue: checks pass, no open change request, no conflict labels Nov 9, 2026
@milescoviello

Copy link
Copy Markdown
Contributor

Linux and Windows check of head bf30501d66.

Linux (Ubuntu 26.04.1, RTX 4070 Ti, NVIDIA 615.71.09, GCC 15.2, Release): this head merged onto main b8194198cf (0dd26c55db, clean merge).

  • agc_driver_cached_image_multisample_guard passes 3 of 3 runs.
  • Negative control: main b8194198cf with only this PR's version of tests/execution/CachedImageMultisampleGuard.cpp (087d0fd110, 128 lines added). The test fails at checking a compute storage image store over part of a 4x target, with AGC graphics: a cached image access of ... overlaps multisampled color target ... (4 samples), whose samples are only on the host: guest access to it is not implemented. So the new case catches the stop this PR removes.

Windows (Windows 11 VM, GeForce GT 1030, WinLibs GCC 15.2 UCRT, Release): main 5546586fb1 + this head, merged on the VM (7b21f4594d). The test passes 3 of 3 runs. main alone, with its own version of the test, also passes 3 of 3.

AI-assisted: yes (Claude Code)

@Ethan-Hainline

Copy link
Copy Markdown
Contributor

Windows AMD data point on head bf30501d66, merged onto current main 510d0bf986 locally.

Host: Windows 11 Pro 10.0.26300, Ryzen 5 7530U, Radeon Vega 15e7 (GCN), AMD proprietary driver 23.19.24.04, WinLibs GCC 16.2.0, Release. ANYPS5_GPU=AMD, ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, Khronos validation 1.4.363.1 loaded.

  • agc_driver_cached_image_multisample_guard — passed 3 of 3 (4.86 s cold, then 0.28 s and 0.27 s), no skips.
  • The log shows the expected claim: a single-sample storage image store to 0x20001e000+0x4000 claims the memory of multisampled color target 0x200020000+0x10000 (4 samples), then cached image multisample guard tests passed.
  • 0 VUID-/Validation Error/Warning lines.

That adds AMD on Windows to the existing NVIDIA and Intel Windows runs and the RADV run, so the guard is now exercised on all three Windows vendors. AI-assisted.

@hugodearaujo

Copy link
Copy Markdown
Contributor Author

@milescoviello Thanks, and for the negative control. @Ethan-Hainline Thanks, the first run on AMD's Windows driver. I've added both to Tested.

@hugodearaujo

Copy link
Copy Markdown
Contributor Author

@gabichuuuuu Thanks for the NVIDIA and Intel runs on Windows, and sorry for the late reply. They match the RADV result: the updated test fails on main's driver code on both GPUs and passes with the change every time, with no VUID- line.

@blawesom

Copy link
Copy Markdown
Contributor

Validation: PR #13248 (queue item 34) — PASS

Environment

  • Machine: CachyOS, kernel 7.3.4-1-cachyos, Ryzen 7 9800X3D, AMD Radeon RX 9070 XT (RADV GFX1201), /dev/kfd present
  • Scope: Linux/AMD (RADV) only; results do not cover NVIDIA, AMDVLK, Windows, or other GPUs
  • Base (origin/main): a9f2910 (worktree /home/benj/scratch/wt5/base-main, reused read-only, clean, prebuilt)
  • PR head: bf30501 (branch fix/agc-msaa-storage-claim, worktree /home/benj/scratch/wt5/pr-13248)
  • PR state at check: OPEN, headRefOid matches queue SHA
  • Pushed validation ref: validation/pr-13248 on fork blawesom/AnyPS5 = bf30501

Build

  • Configure: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DBUILD_TESTING=ON → exit=0, wall=10s (log q34-pr13248-configure.log)
  • Build: cmake --build build --parallel 12 (CMAKE_BUILD_PARALLEL_LEVEL=12) → exit=0, wall=322s, 8833 targets (log q34-pr13248-build.log)
  • Note: the LibAtrac9 submodule working tree was empty after git submodule update --init --recursive in the fresh worktree; restored with git reset --hard HEAD inside the submodule (no source edits). Configure then succeeded.

Focused tests (AGC multisample color target vs storage image overlap)

  • Pattern (identical matched set in both trees, 46 tests, name lists diffed equal): agc_driver_.*(multisample|msaa|color_target|storage_image|overlap|claim) (q34-pattern.txt)
  • Includes the PR's own test agc_driver_cached_image_multisample_guard plus all agc multisample/msaa/color_target/storage_image/overlap/claim tests
  • Command (both trees, identical env, timeout 3600):
    ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_ADD_LAYER_PATH=/home/benj/scratch/vvl-layer VK_LOADER_DEBUG=layer ANYPS5_GPU='AMD Radeon RX 9070 XT' ctest --test-dir build -R '<pattern>' -V
  • Results: base 46/46 Passed (exit=0, wall=6s, q34-tests-base.log); PR 46/46 Passed (exit=0, wall=7s, q34-tests-pr.log). Per-test pass/fail/skip lists identical (diff empty); 0 failed, 0 skipped in both.

Validation-layer checks (per AGENTS.md)

  • was not found but was requested by env var VK_INSTANCE_LAYERS: 0 occurrences in BOTH logs (absent ✓)
  • Insert instance layer "VK_LAYER_KHRONOS_validation": present in BOTH logs (53 occurrences each) ✓
  • VUID- / SYNC-HAZARD- / bracketed diagnostic IDs: 0 distinct IDs in base log, 0 in PR log → diff empty, NO new VUID validation errors added by the PR ✓ (no Validation Error/Warning lines in either log)

PR behavior observed

  • The PR's new report fires only on the PR tree, in agc_driver_cached_image_multisample_guard: [gpu] a single-sample storage image store to 0x...+0x4000 claims the memory of multisampled color target 0x...+0x10000 (4 samples) (4 lines in PR log, 0 in base log) — the new claiming path is exercised and the test passes.

Verdict

PASS — build clean, 46/46 focused AGC tests pass identically on base and PR, validation layer active in both, no new VUID-/SYNC-HAZARD IDs introduced.

Limitations

  • Single run per tree (no repetition; intermittent faults not excluded)
  • Linux + AMD RADV (RX 9070 XT) only; no shader-cache (ANYPS5_NO_SHADER_CACHE=1); no NVIDIA/AMDVLK/Windows coverage
  • The PR branch merges an older main than a9f2910; any diagnostics not covered by the focused pattern were not compared
  • ctest exit 0 alone was not relied on: logs were checked for the missing-layer phrase, layer insertion, and VUID/SYNC IDs explicitly

@oneandonlydean
oneandonlydean merged commit 58dab5f into boykopovar:main Nov 14, 2026
15 checks passed
@github-actions github-actions Bot removed the review queue Next in the maintainer review queue: checks pass, no open change request, no conflict label Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* docs unblocks title Names a title ID on the Unblocks line

Projects

None yet

Development

Successfully merging this pull request may close these issues.