diff options
author | Rob Clark <[email protected]> | 2017-05-26 10:18:31 -0400 |
---|---|---|
committer | Juan A. Suarez Romero <[email protected]> | 2017-06-01 04:25:10 +0200 |
commit | da7bde9d9a6d4b93cae002eb74100ab2a5bbebec (patch) | |
tree | 1d7eae11bf92552b27671296c888788a4be47308 | |
parent | 7e9129f487c7cd5441ad6da1731813dcea569dfe (diff) |
freedreno: fix fence creation fail if no rendering
Android tries to create a FENCE_FD fence without any rendering. And
then falls over when that fails. So just always create an initial
batch.
Fixes: e4ad8695 ("freedreno: fix crash when flush() but no rendering")
Signed-off-by: Rob Clark <[email protected]>
(cherry picked from commit 8fc9702a1b7027d266121713771eafd2aa1a93b6)
Signed-off-by: Juan A. Suarez Romero <[email protected]>
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_context.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_context.c b/src/gallium/drivers/freedreno/freedreno_context.c index 5e708a2be40..1a0a71c211f 100644 --- a/src/gallium/drivers/freedreno/freedreno_context.c +++ b/src/gallium/drivers/freedreno/freedreno_context.c @@ -45,12 +45,6 @@ fd_context_flush(struct pipe_context *pctx, struct pipe_fence_handle **fence, { struct fd_context *ctx = fd_context(pctx); - if (!ctx->batch) { - if (fence) - *fence = NULL; - return; - } - if (flags & PIPE_FLUSH_FENCE_FD) ctx->batch->needs_out_fence_fd = true; @@ -284,13 +278,7 @@ fd_context_init(struct fd_context *ctx, struct pipe_screen *pscreen, goto fail; pctx->const_uploader = pctx->stream_uploader; - /* TODO what about compute? Ideally it creates it's own independent - * batches per compute job (since it isn't using tiling, so no point - * in getting involved with the re-ordering madness).. - */ - if (!screen->reorder) { - ctx->batch = fd_bc_alloc_batch(&screen->batch_cache, ctx); - } + ctx->batch = fd_bc_alloc_batch(&screen->batch_cache, ctx); slab_create_child(&ctx->transfer_pool, &screen->transfer_pool); |