test(agc): skip the idle publish wait where host imports read as written after a GPU read #12158
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/12158"
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 janzezno on 2026-10-28T00:01:38Z.
What
agc_idle_publish_waithas failed on RADV since #9521. The cause is in the test setup, not the driver. The ctest entry forcesAPS5_WRITE_WATCH_IMPORTS=watch. On RADV every submission revalidates the userptr import, and that resolves the import's write protection: the import probe reports 4 of 4 pages written after a GPU read. That is why the defaultprobemode compares imports on RADV instead of watching them. #9521's CPU-side publish checks at completion that no CPU store reached each unit since the publish started (UnchangedSinceCollected). Under the forced watch, the submissions read as CPU stores, so both units are dropped as stale and the test sees the old bytes. Before #9521 the publish copied on the GPU and had no such check.Under the default mode, RADV compares private host imports instead of watching them, so they get no unit shadows and this path is not reached. dma-buf imports, which RADV keeps watched, report 0 of 4 pages written after a GPU read.
The test now runs
ProbeImportWriteProtectionand skips (77) when pages read as written after a GPU read, or when the probe fails. This is the conditionagc_driver_image_table_vouched_lookupsalready uses (ImportsStayWatchedThroughReads). It deliberately ignores pages written after a GPU write: lavapipe reports 4 of 4 of those, and this test never has the GPU write into the import, so including them would turn the test off on CI. The check is skipped on Windows, which ignoresAPS5_WRITE_WATCH_IMPORTS.After this change, RADV no longer runs the idle publish. Covering it there through a dma-buf import would need a separate test PR.
Tested
Arch Linux, kernel 7.2.11, Release,
BUILD_TESTING=ON, withANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1andVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation. Command:ctest --test-dir build -R 'idle|unit_shadow' -Vonmain6e9b9134f6and on this change, with each driver selected throughVK_DRIVER_FILES.mainagc_idle_publish_waitfails (the idle publish's bytes are wrong)agc_idle_publish_waitskipped:the device reports 4 of 4 host-imported pages written after a GPU readagc_idle_publish_waitruns and printsidle publish wait verifiedOn RADV,
agc_idle_publish_waitalone fails 3 of 3 runs onmainand skips 3 of 3 with this change. On lavapipe it passes 3 of 3 with this change. No log containsVUID-orwas not found but was requested by env var VK_INSTANCE_LAYERS. The other skips in the table,agc_unit_shadow*, happen onmaintoo.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)