X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Ffreedreno%2Ffreedreno_draw.c;h=eb36a930751432a86827ad980c0e7bc2459c8255;hb=6ff0c6f4ebcb87ea6c6fe5a4ba90b548f666067d;hp=d3bf3165276191a616883c6279f3bea63969a5ec;hpb=1ec1ae47f73cc948e05c1a49d55b90887d1fe15b;p=mesa.git diff --git a/src/gallium/drivers/freedreno/freedreno_draw.c b/src/gallium/drivers/freedreno/freedreno_draw.c index d3bf3165276..eb36a930751 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); + batch = fd_batch_create(ctx, true); fd_batch_reference(&save_batch, ctx->batch); fd_batch_reference(&ctx->batch, batch); @@ -488,14 +488,21 @@ fd_launch_grid(struct pipe_context *pctx, const struct pipe_grid_info *info) foreach_bit(i, ctx->tex[PIPE_SHADER_COMPUTE].valid_textures) resource_read(batch, ctx->tex[PIPE_SHADER_COMPUTE].textures[i]->texture); + /* For global buffers, we don't really know if read or written, so assume + * the worst: + */ + foreach_bit(i, ctx->global_bindings.enabled_mask) + resource_written(batch, ctx->global_bindings.buf[i]); + if (info->indirect) resource_read(batch, info->indirect); mtx_unlock(&ctx->screen->lock); + batch->needs_flush = true; ctx->launch_grid(ctx, info); - fd_gmem_flush_compute(batch); + fd_batch_flush(batch, false, false); fd_batch_reference(&ctx->batch, save_batch); fd_batch_reference(&save_batch, NULL);