From 2385d7b06683e00984f05d32cd2b9e940fefd5af Mon Sep 17 00:00:00 2001 From: Hyunjun Ko Date: Wed, 17 Oct 2018 21:57:27 +0900 Subject: freedreno: adds nondraw param to fd_bc_alloc_batch Needs to specify nondraw when creating a batch through fd_bc_alloc_batch since it'd better create a batch through it rather than fd_batch_create. Signed-off-by: Rob Clark --- src/gallium/drivers/freedreno/freedreno_batch_cache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/gallium/drivers/freedreno/freedreno_batch_cache.c') diff --git a/src/gallium/drivers/freedreno/freedreno_batch_cache.c b/src/gallium/drivers/freedreno/freedreno_batch_cache.c index 9d046f205bc..a8b32d9bd08 100644 --- a/src/gallium/drivers/freedreno/freedreno_batch_cache.c +++ b/src/gallium/drivers/freedreno/freedreno_batch_cache.c @@ -270,7 +270,7 @@ fd_bc_invalidate_resource(struct fd_resource *rsc, bool destroy) } struct fd_batch * -fd_bc_alloc_batch(struct fd_batch_cache *cache, struct fd_context *ctx) +fd_bc_alloc_batch(struct fd_batch_cache *cache, struct fd_context *ctx, bool nondraw) { struct fd_batch *batch; uint32_t idx; @@ -333,7 +333,7 @@ fd_bc_alloc_batch(struct fd_batch_cache *cache, struct fd_context *ctx) idx--; /* bit zero returns 1 for ffs() */ - batch = fd_batch_create(ctx, false); + batch = fd_batch_create(ctx, nondraw); if (!batch) goto out; @@ -365,7 +365,7 @@ batch_from_key(struct fd_batch_cache *cache, struct key *key, return batch; } - batch = fd_bc_alloc_batch(cache, ctx); + batch = fd_bc_alloc_batch(cache, ctx, false); #ifdef DEBUG DBG("%p: hash=0x%08x, %ux%u, %u layers, %u samples", batch, hash, key->width, key->height, key->layers, key->samples); -- cgit v1.2.3