Skip to content

asahi: Shadowing bloat fixes

Asahi Lina requested to merge asahilina/mesa:agx/shadowing-bloat into main

This MR fixes some major resource shadowing bloat that was causing Firefox to use gigabytes of GPU memory with some workloads. Scrolling/zooming around PDFs and using Google Maps are two easy reproducers.

I addressed the issue from several different angles, since there were multiple problems involved. We were shadowing too much memory per object, as well as shadowing objects an unbounded number of times, and also in general allocating wildly oversized BOs in some situations (I saw 20+MB BOs returned for 4MB allocations).

Includes a drive-by cosmetic race fix, and a new debug flag and extra print.

Merge request reports