mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-21 14:10:37 +02:00
asahi: Assert that freed BOs have no pending writers
This is just a sanity check, I haven't actually hit this case but if we ever do something is very broken (e.g. BO refcounting bug). Signed-off-by: Asahi Lina <lina@asahilina.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22891>
This commit is contained in:
parent
d7d098679b
commit
3f55eff0e5
1 changed files with 2 additions and 0 deletions
|
|
@ -193,6 +193,8 @@ agx_bo_unreference(struct agx_bo *bo)
|
|||
* lock, let's make sure it's still not referenced before freeing it.
|
||||
*/
|
||||
if (p_atomic_read(&bo->refcnt) == 0) {
|
||||
assert(!bo->writer_syncobj);
|
||||
|
||||
if (dev->debug & AGX_DBG_TRACE)
|
||||
agxdecode_track_free(bo);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue