diff options
author | Rob Clark <[email protected]> | 2018-08-29 16:04:22 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2018-09-05 13:38:43 -0400 |
commit | c77e0948c7583748edf5269e0ff37a34ebf887f0 (patch) | |
tree | fe7b12b4c63dfd92e5d100fa86b460573112e954 /src | |
parent | 2c623e707144e93db08a2ed1bdcd079c911b7029 (diff) |
freedreno/batch: fix crash in !reorder case
We aren't using the batch-cache if reorder==false.
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_batch.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_batch.c b/src/gallium/drivers/freedreno/freedreno_batch.c index dd4b1ca9e64..36b834f4013 100644 --- a/src/gallium/drivers/freedreno/freedreno_batch.c +++ b/src/gallium/drivers/freedreno/freedreno_batch.c @@ -352,8 +352,14 @@ fd_batch_flush(struct fd_batch *batch, bool sync, bool force) if (newbatch) { struct fd_context *ctx = batch->ctx; - struct fd_batch *new_batch = - fd_batch_from_fb(&ctx->screen->batch_cache, ctx, &batch->framebuffer); + struct fd_batch *new_batch; + + if (ctx->screen->reorder) { + new_batch = fd_batch_from_fb(&ctx->screen->batch_cache, + ctx, &batch->framebuffer); + } else { + new_batch = fd_batch_create(ctx, false); + } util_copy_framebuffer_state(&new_batch->framebuffer, &batch->framebuffer); |