aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorHyunjun Ko <[email protected]>2018-10-17 21:57:28 +0900
committerRob Clark <[email protected]>2018-10-17 12:44:48 -0400
commit8e798e28f736e22e9e1e4534ab42a36cde14b142 (patch)
tree61c96a2762a9e319262bbc594ef6f9055ef81b43 /src/gallium/drivers
parent2385d7b06683e00984f05d32cd2b9e940fefd5af (diff)
freedreno: allocate batches from the cache in launch_grid
Needs to allocate batches from the cache so that it could get a valid index and make resource dependancy tracking right. In addition this fixes assertion on debug build since the commit 1a40faa8 landed. Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_draw.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_draw.c b/src/gallium/drivers/freedreno/freedreno_draw.c
index e130895aac8..fe026a5fd8a 100644
--- a/src/gallium/drivers/freedreno/freedreno_draw.c
+++ b/src/gallium/drivers/freedreno/freedreno_draw.c
@@ -459,7 +459,7 @@ fd_launch_grid(struct pipe_context *pctx, const struct pipe_grid_info *info)
struct fd_batch *batch, *save_batch = NULL;
unsigned i;
- batch = fd_batch_create(ctx, true);
+ batch = fd_bc_alloc_batch(&ctx->screen->batch_cache, ctx, true);
fd_batch_reference(&save_batch, ctx->batch);
fd_batch_reference(&ctx->batch, batch);
@@ -506,6 +506,7 @@ fd_launch_grid(struct pipe_context *pctx, const struct pipe_grid_info *info)
fd_batch_reference(&ctx->batch, save_batch);
fd_batch_reference(&save_batch, NULL);
+ fd_batch_reference(&batch, NULL);
}
void