asahi: Fix batch writer_syncobj cleanup
authorAsahi Lina <lina@asahilina.net>
Wed, 3 May 2023 06:41:37 +0000 (15:41 +0900)
committerAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sun, 7 May 2023 13:10:37 +0000 (09:10 -0400)
commit1aaf4bf40a53e8e382ba14b2470f160afd78b6cc
tree9a72a211687cfa61e171e37e725b2b4fe3c1ee07
parent3f55eff0e5df17dd4d9328236988932d360ac00c
asahi: Fix batch writer_syncobj cleanup

When an ACTIVE batch takes over the active writer role from a SUBMITTED
batch, the written BO has the syncobj from the latter even though the
writer is the former. This is correct and an intended state, but it
means that then we can't gate the syncobj cleanup in agx_batch_cleanup
on being the active writer, since the SUBMITTED batch won't be.

Fixes: asahi/mesa#18

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