aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2017-04-15 12:32:17 -0400
committerEmil Velikov <[email protected]>2017-04-24 13:11:13 +0100
commitbea2c4b88fa6d0bd0239f0e35a5cab5b73fce4fa (patch)
tree0ce6444bb65d2d0769a3e1d92dd7c9ac6142a71a
parented846b4c78bd1e314e23a9baf5794c9c303e04ea (diff)
freedreno: fix crash if ctx torn down with no rendering
In this case, ctx->flush_queue would not have been initialized. Fixes: 0b613c20 ("freedreno: enable draw/batch reordering by default") Cc: "17.1" <[email protected]> Signed-off-by: Rob Clark <[email protected]> (cherry picked from commit d4601b0efc7f5e24e3f39fefa8e29e79560245ce)
-rw-r--r--src/gallium/drivers/freedreno/freedreno_context.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_context.c b/src/gallium/drivers/freedreno/freedreno_context.c
index 4d8c4251a8b..6478e0e7a9c 100644
--- a/src/gallium/drivers/freedreno/freedreno_context.c
+++ b/src/gallium/drivers/freedreno/freedreno_context.c
@@ -112,7 +112,7 @@ fd_context_destroy(struct pipe_context *pctx)
DBG("");
- if (ctx->screen->reorder)
+ if (ctx->screen->reorder && util_queue_is_initialized(&ctx->flush_queue))
util_queue_destroy(&ctx->flush_queue);
fd_batch_reference(&ctx->batch, NULL); /* unref current batch */