asahi: Fix incorrect BO bitmap reallocations
authorAsahi Lina <lina@asahilina.net>
Fri, 11 Aug 2023 08:04:00 +0000 (17:04 +0900)
committerMarge Bot <emma+marge@anholt.net>
Fri, 11 Aug 2023 20:31:28 +0000 (20:31 +0000)
commitc247de37bbcbfeb92971ce91ef774abe46afd815
tree15f397a95321601d8a899a8e5fed1d0abce41d1b
parentf1fedb72d37ad8cf4b9f1c0c0b9a6c58b901dac1
asahi: Fix incorrect BO bitmap reallocations

If the BO handle is greater than 2x what fits inside the current bitmap
size, then we end up overflowing. Make sure to always reallocate to a
large enough bitmap, not just 2x the previous size.

Found while replaying firefox apitraces with looping (which apparently
leaks a ton of objects, but that might just be apitrace).

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24635>
src/gallium/drivers/asahi/agx_state.h