Skip to content

freedreno/fence: Hold a strong ref to batch

Rob Clark requested to merge robclark/mesa:fd/unthreaded-fix into main

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: #8621 (closed) Signed-off-by: Rob Clark robdclark@chromium.org

Merge request reports

Loading