freedreno: fix FD_MESA_DEBUG=inorder
authorRob Clark <robdclark@chromium.org>
Sun, 1 Mar 2020 22:16:59 +0000 (14:16 -0800)
committerMarge Bot <eric+marge@anholt.net>
Tue, 10 Mar 2020 16:01:39 +0000 (16:01 +0000)
Fixes: 2c07e03b792 ("freedreno: allow ctx->batch to be NULL")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4071>

src/gallium/drivers/freedreno/freedreno_state.c

index 8a757ee96d4a37c7e32b13a55c006f80c174c20a..d9c8f9f89a28ec3d29eb23b5d38962aba4ff1fe7 100644 (file)
@@ -252,7 +252,7 @@ fd_set_framebuffer_state(struct pipe_context *pctx,
                }
 
                fd_batch_reference(&old_batch, NULL);
-       } else {
+       } else if (ctx->batch) {
                DBG("%d: cbufs[0]=%p, zsbuf=%p", ctx->batch->needs_flush,
                                framebuffer->cbufs[0], framebuffer->zsbuf);
                fd_batch_flush(ctx->batch);