fix(agc): compare host imports when device writes reach the write watch #3226
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3226"
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 oneandonlydean on 2026-10-11T02:07:37Z.
What
agc_unit_shadow, registered by #2864, fails in the Linux job onmain:This is #1429. The failing check was already there; it never ran in CI before #2864 registered it. The cause is the one @popcoder565 and @Dextroid17 traced there. lavapipe runs command buffers on CPU threads, so its writes into a host import go through the page tables, and the write watch collects them as CPU stores. The import probe only checks a GPU read (0 of 4 pages on lavapipe), so imports stay watched. The whole publish's copy into the import is then collected as a CPU store over unit 3. The next partial publish finds the unit written since its retile and drops it without a copy.
This carries the probe change from #1046 (@aryanrawatispro-ship-it, closed with conflicts), rebased onto current
main. The probe also fills the scratch range on the GPU and collects again. When the read or the fill reports pages as written, imported ranges are compared. The dma-buf probe sharesrunImportProbe, so its decision takes the fill into account too.On lavapipe the startup line now reads:
There,
agc_unit_shadowreportshost imports are compared, not watched: unit shadows not tested, as it already does on devices that compare imports. On the RTX 4090 the fill reports 0 pages, imports stay watched and the shadow checks run.The rest of #1046 (registering the whole
agc_driver_recorder_testsbinary and the test changes that came with it) is not included.Tested
Linux (CachyOS, GCC 16, Release, CI's configure flags) on
main77bd928a:mesa-vulkan-drivers25.2.8, the package the Linux job installs:agc_unit_shadowfails 5/5 onmainand passes with this change;ctest: 754/755. The one failure isagc_driver_image_packed16_load, fixed since by #3208. With both changes, 755/755.agc_unit_shadowpasses 10/10 onmainand with this change;ctest: 754/755.agc_driver_dcc_keys_first_writefails the same way onmain(#3179).Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Fixes #1429.