summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2017-11-29 09:04:08 -0500
committerRob Clark <[email protected]>2017-12-03 14:17:41 -0500
commitf93f2f7b1e80e838acb4ddc12f62a9a545da5194 (patch)
treebaf8ef3d0ba87542575c3ce219806381d10f5243 /src/gallium/drivers/freedreno
parent4b1d0d28449d03539db452e92cc29a9f5dd968d7 (diff)
freedreno: also mark draw-indirect buffer as read
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_draw.c7
1 files changed, 7 insertions, 0 deletions
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);