+
+ if (rsc->write_batch && rsc->write_batch != batch) {
+ struct fd_batch *b = NULL;
+ fd_batch_reference(&b, rsc->write_batch);
+
+ mtx_unlock(&batch->ctx->screen->lock);
+ fd_batch_flush(b, true, false);
+ mtx_lock(&batch->ctx->screen->lock);
+
+ fd_bc_invalidate_batch(b, false);
+ fd_batch_reference_locked(&b, NULL);
+ }
+