freedreno: skip batch-cache for compute shaders
authorRob Clark <robdclark@gmail.com>
Sat, 26 Aug 2017 15:55:05 +0000 (11:55 -0400)
committerRob Clark <robdclark@gmail.com>
Sat, 2 Sep 2017 15:41:20 +0000 (11:41 -0400)
It is kind of pointless for compute, and avoids issues with apps kicking
off more than 32 compute shaders at once.

Signed-off-by: Rob Clark <robdclark@gmail.com>
Cc: "17.2" <mesa-stable@lists.freedesktop.org>
src/gallium/drivers/freedreno/freedreno_draw.c

index a4a19750a420dafa27a4313d07c2dc67f248e526..f2ccfc585488fafe1ae247b3ee90b49ed7d1d779 100644 (file)
@@ -428,13 +428,7 @@ fd_launch_grid(struct pipe_context *pctx, const struct pipe_grid_info *info)
        struct fd_batch *batch, *save_batch = NULL;
        unsigned i;
 
-       /* TODO maybe we don't want to allocate and flush a batch each time?
-        * We could use a special bogus (ie. won't match any fb state) key
-        * in the batch-case for compute shaders, and rely on the rest of
-        * the dependency tracking mechanism to tell us when the compute
-        * batch needs to be flushed?
-        */
-       batch = fd_bc_alloc_batch(&ctx->screen->batch_cache, ctx);
+       batch = fd_batch_create(ctx);
        fd_batch_reference(&save_batch, ctx->batch);
        fd_batch_reference(&ctx->batch, batch);