diff options
author | Rob Clark <[email protected]> | 2018-09-03 16:33:59 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2018-09-05 13:38:43 -0400 |
commit | c3d9f29b78136c949ff2c98886aea8803f62b34e (patch) | |
tree | 914a41c0187f78e6c63be19650ab16f1bd2def8d /src/gallium/drivers/freedreno/freedreno_state.c | |
parent | a122118c14a3cc9da22b94174cae7ee8d8445dfa (diff) |
freedreno: allocate ctx's batch on demand
Don't fall over when app wants more than 32 contexts. Instead allocate
contexts on demand.
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_state.c')
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_state.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_state.c b/src/gallium/drivers/freedreno/freedreno_state.c index 88f6fb557d0..3ce8b6ed9fc 100644 --- a/src/gallium/drivers/freedreno/freedreno_state.c +++ b/src/gallium/drivers/freedreno/freedreno_state.c @@ -212,17 +212,14 @@ fd_set_framebuffer_state(struct pipe_context *pctx, struct pipe_framebuffer_state *cso; if (ctx->screen->reorder) { - struct fd_batch *batch, *old_batch = NULL; + struct fd_batch *old_batch = NULL; fd_batch_reference(&old_batch, ctx->batch); if (likely(old_batch)) fd_batch_set_stage(old_batch, FD_STAGE_NULL); - batch = fd_batch_from_fb(&ctx->screen->batch_cache, ctx, framebuffer); fd_batch_reference(&ctx->batch, NULL); - fd_reset_wfi(batch); - ctx->batch = batch; fd_context_all_dirty(ctx); if (old_batch && old_batch->blit && !old_batch->back_blit) { @@ -241,7 +238,7 @@ fd_set_framebuffer_state(struct pipe_context *pctx, fd_batch_flush(ctx->batch, false, false); } - cso = &ctx->batch->framebuffer; + cso = &ctx->framebuffer; util_copy_framebuffer_state(cso, framebuffer); |