Repository navigation
test(agc): run the resident heap mirror tests only with sparse residency - #12272
Conversation
ResidentBuffer::Create returns no resident buffer unless the device has sparseBinding, sparseResidencyBuffer and sparseResidencyAliased, and the heap mirror then holds a whole copy of the heap, which CopiedTests already checks. The resident, reused-address, joined-import and uncopied partial-import tests expected block-sized mirrors on every device, so they failed on devices without sparse residency, such as MoltenVK. Co-Authored-By: iamthehimansh <67262056+iamthehimansh@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
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.
|
|
verdict: OK
Freshness envelope: head e8f6ba8; merge-base 0cd07dc; behind main: 0; git merge-tree --write-tree origin/main pull/12272: exit 0, clean. Cross-PR ledger: open non-draft PR #11982 also changes ResidentHeapMirror.cpp. Pairwise git merge-tree exits 1 with a conflict in that file; the heads need conflict resolution if combined. |
MarcZX10
left a comment
There was a problem hiding this comment.
The test gate matches the production fallback condition: resident mirrors require all three sparse features, while copied mirrors remain supported without them. The change keeps copied heap and copied partial-import coverage active on every device and skips only assertions that require resident block-sized mirrors. The reported MoltenVK before/after comparison and validation-layer run demonstrate the original failure and verify the fallback coverage; current Windows and conventions checks pass. No production code changes. No blocking issue found.
|
Windows + NVIDIA result for head This PR's own tests: Host: Windows 11 26300, Intel i7-12700K, NVIDIA GeForce RTX 2070 SUPER (vendor 0x10de, device 0x1e84; Vulkan loader 1.4.357 from the NVIDIA driver 621.01), Khronos Validation Layers nightly 1.4.366 (b2b44c0d37) through Same focused run on
The tree also carried the open PRs #12298, #12262, #12256, #12250, #12234, #12228, #12211, #12210, #12209, #12208, #12207, all merged cleanly, so the run is a joint one. Not run on a PS5. AI-assisted: yes (Claude Code), the runs and the numbers above are from this machine. |
What
ResidentBuffer::Create(Graphics/src/ResidentMirror.cpp) gives no resident buffer unless the device hassparseBinding,sparseResidencyBufferandsparseResidencyAliased. The heap mirror then holds a whole copy of the heap. That fallback is intended, andCopiedTestsalready checks it by limiting the resident address space.agc_driver_resident_heap_mirrorstill ran the resident, reused-address, joined-import and uncopied partial-import tests on every device, and these expect block-sized mirrors. So on a device without sparse residency, such as MoltenVK, the test fails at its first check:the heap mirrors of two 8192 KiB heaps hold 16384 KiB of device memory; the guest and the GPU wrote 192 KiB of them.The test now reads the device's context through
VulkanDeviceTestAccess, as other AGC tests do, and runs those tests only when all three features are present. Otherwise it prints why they are skipped.CopiedTestsand the copied partial-import tests run on every device. The production code is unchanged.#10540 recorded this failure on macOS as a separate gap. The closed #8658 (@iamthehimansh, credited as co-author) skipped the same checks on Apple hosts. This change gates on the device features that production checks instead, so it also covers other devices without sparse residency. Announced on #1.
Tested
macOS 27.0.1 (26A434), Apple M4 (10-core GPU), Apple clang 21.0.0, x86-64 Release build under Rosetta 2, MoltenVK 1.4.2 from the Vulkan SDK 1.4.363.0.
libSceAgcDriverdoesn't link on macOS frommainalone, so the tree ismain9fc181dde5plus the open PRs @imellag listed on #1 (#7631, #7804, #10552, #11249, #11447, #10669, #11554) and #12076. The test andResidentMirror.cppare the same there as onmain.ctest -R '^agc_driver_resident_heap_mirror$' -V, run once withANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1andVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, plus plain runs:--repeat until-fail:5) and prints the skip line. The finalresident heap mirror tests passedis printed after the copied tests, so they ran.VUID-lines without and with the change. The validation layer was found.ctest -j4 --timeout 120with Vulkan: 2584 tests, 61 failed without and with the change.agc_driver_resident_heap_mirrornow passes.agc_driver_msaa_dcc_clear_4failed once under-j4and passed 3 of 3 alone. That test doesn't use this file, andagc_driver_msaa_dcc_clear_2flakes the same way on this machine.main: the 1169 selected tests passed.agc_driver_resident_heap_mirrorbuilt and skipped, because the runner has no GPU.python3 tools/check_conventions.py --base upstream/main: passed.tools/pr_overlap.py: perf(agc): stream resident heap mirror flushes through bounded staging chunks #11982 adds a test call next to these lines in the samemain(), a trivial conflict.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