test(agc): cover idle publication through dma-buf imports #14330
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/14330"
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 JJenkx on 2026-11-01T09:33:22Z.
What
Adds a Linux regression for idle unit-shadow publication through an actual watched DMA-buf import. It allocates 512 KiB of direct memory, checks that the import really uses DMA-buf, fills two 64 KiB shadow units on the GPU, and verifies that an idle flush finishes before returning. CPU stores made immediately afterward must survive a later recorder sync; every other byte must retain its expected value. A non-idle label flush must remain pending until sync and then publish its full unit.
This complements #12158: that PR handles the existing forced host-pointer-watch fixture on drivers whose GPU reads look like CPU writes. This PR leaves that fixture byte-identical and exercises RADV's working DMA-buf path with the default probe policy. Unsupported Linux DMA-buf/write-watch capability or an inaccessible /dev/udmabuf produces skip 77; a purported DMA-buf path falling back to another import fails the test. The new CTest is Linux-only, with a 30 s timeout.
No production code or runtime behavior changes. No title or performance gain claim.
Tested
Current head
0dc8e3f969fc67f730a707939dabf62c89d1742dmerges main4f64f81ef7b4bca975b4b9f3dfd15dfff56f716fwith the original PR headffe30238a4ad2bf9ca8c99d3db2d1ce0511e08da, without rebasing or force-pushing. The conflict was between the new window-import-unmap dispatch and this PR's idle-publication dispatch; both are retained. The DMA-buf fixture is byte-identical to the reviewed head; there are no production changes against main.Linux 7.2.11-arch1-1, Ryzen 9 7950X, RX 6650 XT/RADV Mesa 26.2.6, Release, bundled SPIRV-Tools ON, independent source/build and pinned dependency worktrees. Both sides built
agc_driver_recorder_tests.Matched common checks:
agc_host_import_unmap,agc_host_import_retirement,agc_sparse_run_import,agc_queued_write_groups, andagc_window_import_unmap. Main 5/5 pass; change 5/5 plus the newagc_idle_publish_dmabuf_waitpass. Zero skips and zero VUIDs on both. Both complete harnesses used the shared GPU FIFO andANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ctest -V. Actual validation-layer insertions: 4 on main, 5 on the change; queued-write-groups is CPU/mock. No requested-layer-missing messages. Conventions and whitespace checks pass.Fresh verbose logs, JUnit, exact diff and receipts, SHA-256
77812c50d9102e8e918703a1e506e62372d4201b2af24ecaade61ff6ce5444da.Original positive/negative controls and overlap audit, SHA-256
30a9f2137977bd405ee74e56a602263c8ce054c2b9acb9d192c4bddb556173e1, remain historical evidence atffe30238a4. At that head, disabling the idle wait failed atthe idle flush returned before its dma-buf publish completed; making non-idle calls wait failed atthe non-idle dma-buf publish was waited. Neither negative control is claimed rerun on this merge. The earlier Windows check also retains its original exact head. No new Windows/macOS, full-suite, title or performance run is claimed. #12158 covers the independent forced host-pointer-watch limitation; no dependency on that PR is introduced.0dc8e3f969merged ontomain1d91f29, RTX 2000 Ada (driver 595.99.02), Ubuntu 26.04 container: 1,495 passed, 3 failed that also fail onmain(0 new), no new validation IDs againstmain.0dc8e3f969merged ontomaina4eca2a, Radeon RX 6300 (RADV NAVI24, Mesa 25.2.8): 1,512 passed, 6 failed (0 new: 5 also fail onmain, 1 unstable onmain), no new validation IDs vsmain(431 tests on the GPU).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)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T09:39:51Z.
Review: APPROVED
Reviewed — looks good
The exact-head source and test evidence show no blocking issue; the Linux pass and negative controls are author-run and independently checksum-verified, while the hosted Windows and labels jobs remain pending.
What I ran
Reviewed head
ffe30238a4ad2bf9ca8c99d3db2d1ce0511e08daagainst base26fa1212b82f76dd49cf12d65e445d6ff3e0844c; GitHub reports the PR open and mergeable. Environment: Debian GNU/Linux 12, Linux 6.1, Python 3.11.2, GCC 12.2.0. No project build or local C++/CTest run was performed. I inspected the diff and test registration, ran the repository no-build precheck and stack check, queried hosted CI, and verified the published Linux evidence archive and its internal checksums.Results
git diff --checkexited 0 with no output.agc_idle_publish_dmabuf_waitis registered under the Linux CMake condition, with skip code 77 and a 30-second timeout.Recorder.cppas possibly unregistered; this is a false positive because the test executable is registered from that source inagc_driver_recorder_tests.cmake, and the new CTest entry is present there.main, no declared dependency, and unchanged heads.pr_overlap.pystopped onInvalid \\uXXXX escapewhile parsing its GitHub response. The PR includes an author-provided shared-file overlap audit; I did not independently reproduce that full scan.tools/pr_abi_audit.pyandtools/pr_test_quality.py. The precheck’s conventions, diff, and live stack checks passed; I ran the local test-quality helper separately and inspected its finding.30a9f2137977bd405ee74e56a602263c8ce054c2b9acb9d192c4bddb556173e1); every internal archive hash passed. The archive identifiesmain26fa1212b82fand candidateffe30238a4ad, with 4/4 baseline and 5/5 candidate groups passing and zero skips/VUIDs. These tests were not run by me.Selected unedited output
tools/check_conventions.pyfrom the precheck:pr_test_quality.py:Verified author-run CTest summaries:
Verified author-run negative-control failures:
Hosted checks at the time of review:
Negative control
waitForIdlePublishthe idle flush returned before its dma-buf publish completed(author-run; archive verified, not rerun here).the non-idle dma-buf publish was waited(author-run; archive verified, not rerun here).Findings
Blocking
None found in the reviewed source or supplied exact-head test evidence.
Non-blocking
Hosted Windows and labels checks were still pending when checked. The hosted Linux and specialized jobs were skipped. The author’s Linux GPU run is strong supporting evidence but is not an independent run by me; I did not build or run CTest locally. The repository overlap helper could not parse its GitHub response, so I relied on the PR’s attached overlap audit for that part.
Sources
Not verified
I did not compile or run the Linux C++ tests, reproduce the author’s GPU test, run a full suite, test other operating systems, or verify console behavior. Hosted Windows was pending; hosted Linux and specialized CI jobs were skipped.