From: Rob Clark Date: Wed, 29 Nov 2017 14:04:08 +0000 (-0500) Subject: freedreno: also mark draw-indirect buffer as read X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f93f2f7b1e80e838acb4ddc12f62a9a545da5194;p=mesa.git freedreno: also mark draw-indirect buffer as read Signed-off-by: Rob Clark --- diff --git a/src/gallium/drivers/freedreno/freedreno_draw.c b/src/gallium/drivers/freedreno/freedreno_draw.c index bcd21a232d2..60a1180f24d 100644 --- a/src/gallium/drivers/freedreno/freedreno_draw.c +++ b/src/gallium/drivers/freedreno/freedreno_draw.c @@ -197,6 +197,10 @@ fd_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info) /* Mark index buffer as being read */ resource_read(batch, indexbuf); + /* Mark indirect draw buffer as being read */ + if (info->indirect) + resource_read(batch, info->indirect->buffer); + /* Mark textures as being read */ foreach_bit(i, ctx->tex[PIPE_SHADER_VERTEX].valid_textures) resource_read(batch, ctx->tex[PIPE_SHADER_VERTEX].textures[i]->texture); @@ -475,6 +479,9 @@ 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); + if (info->indirect) + resource_read(batch, info->indirect); + mtx_unlock(&ctx->screen->lock); ctx->launch_grid(ctx, info);