AGC: on RADV and lavapipe a host-pointer import calls ImportWatched(staysWatched=false), so HTILE metadata leaves write-watch coverage #8759
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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-20T23:52:17Z.
On devices whose host-import probe reports "host imports resolve write protection: yes" (RADV, and lavapipe the same way), the host-pointer import calls
ImportWatched(..., staysWatched=false). That takes the imported range out of the write watch. For an HTILE metadata range,Watched(htileAddress, metadataBytes)(GuestMemory.cpp:1630,tracker.watched && tracker.covers(range)) is then false after the import.Effect seen in #7233: recognition and the HTILE-clear dispatch work, but Arm's
CollectWritesUncachedreturns generation 0 because the range is no longer covered.CompleteHtileDepthClear(DepthSurface.cpp:1969) skips surfaces withclearGeneration == 0, so the native depth-clear completion path never engages on these devices. It fails safe: no completed-clear claim is made, and the range keeps the import-window comparison path. On NVIDIA the range stays watched and the path runs.The import and watch logic comes from
406c72d9be(13 Oct) ande56a7c2351(14 Oct); #7233 does not touchImportWatchedorstaysWatched. Reproduction:agc_driver_native_multisample_depth_tests --clearson RADV (Mesa 25.2.8 and 26.2.4, 3 of 3) and on lavapipe (Mesa 26.2.4, 3 of 3, with and without /dev/udmabuf). Traces are in the #7233 thread (SleglJan, 19 and 20 Oct).Possible fix: keep the metadata range watched for driver dispatches on host-pointer imports. That is a production change, separate from #7233, which only makes its test skip the write-coverage assertion when
Watchedsays the range isn't tracked.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-20T23:54:30Z.
I traced this against current
main:GuestBufferMemory.cppchooseswatchedHostPointer = !state.unwatchImportson non-Windows and passes that toImportWatched. When it is false,ImportWatchedun-watches the imported range after the import.DepthSurface::NoteHtileDepthClearandDepthSurface::CheckCurrentrequire the HTILE range to remainWatched, so this is a real interaction between the host-import policy and the native clear proof, separate from #7233's write-coverage fix.I would keep any production change scoped to the HTILE clear range rather than overriding the host-import watch policy for every imported buffer. A regression should exercise the
staysWatched=falseimport path and prove the clear path still records the completed HTILE store on RADV/lavapipe, while retaining the existing CPU-write/import-window checks. Is anyone already preparing that focused change or test?Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T01:03:50Z.
Update: the current #7233 head
eb55d58728f367f527253b3ae5b30ed45030fdf3keeps the existing safe refusal on devices whose HTILE range is not watched. Its test now uses the live driver import policy, skips the write-coverage assertion when the range is uncovered, and asserts that the production path declines the clear withnative multisample depth clear requires tracked HTILE generations. It does not implement the proposed production change to complete this path on RADV/lavapipe. I do not have a validated standalone implementation ready yet; that remains a separate open task.Imported from boykopovar/AnyPS5. Originally posted by Amoenus on 2026-10-21T03:18:21Z.
Windows scope datapoint: #7233 eb55 adapted onto main cd700 also takes the expected uncovered-HTILE refusal on our RTX 5080 and Radeon Graphics, 3/3 fresh processes per device. Each clear run has 26 completed-output cases plus that one refusal (
checked=27 unavailable=0), not 27 completed outputs. The fixture is byte-identical to eb55; our adapted-parent control adds only the independent #7371 BDA regression, without its production handoff.Maintained evidence and exact pins. Both fixture and live-driver contexts select the requested GPU, and both scratch private-import probes report that write watch is kept. The actual metadata span is nevertheless uncovered after dispatch. We have not isolated the Windows cause or demonstrated that it follows the non-Windows
ImportWatched(staysWatched=false)path. This is a coverage limitation to preserve, not confirmation of the Linux diagnosis on Windows.The issue body's NVIDIA tracked-path statement should therefore be scoped to the reported Linux NVIDIA configurations. The new expected refusal makes the fixture pass here without fixing production completion for that case. No title-unblock claim. AI-assisted: yes (Codex); author responsible.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T05:28:37Z.
Thanks for the Windows datapoint. I will keep the
ImportWatched(staysWatched=false)explanation scoped to the reported Linux RADV/lavapipe paths; these Windows runs hit the same safe refusal, but do not establish that they use the same unwatch path. The issue remains about the Linux coverage loss, and the Windows cause is still open.