v3d: do not leak BO on query begin
This happens when we have a sequence of multiple beginQuery / endQuery
with the same target and query identifier.
As a BO is created on beginQuery but not free on endQuery (we need to
wait until either explicitly deleting the query or querying the
results), in the above sequence we are basically leaking the BO.
This ensures that any BO created before is unreference before creating
the new one.
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15796>