We don't want a unflushed fence to outlive it's batch, otherwise we run
into trouble when it comes time to wait on the fence. For ex:
1. Create a fence before framebuffer state is set, with the
PIPE_FLUSH_DEFERRED flags. This creates a new batch, to which the
ctx holds the only reference (unless the fence also holds a ref)
2. set_framebuffer_state() creates a new batch and drops the ctx->batch
reference.
3. Later something tries to wait on the fence
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8621
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25337>