From 8e8868d5ad775d7598e5499d239dbdf9092da59f Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Fri, 26 Oct 2018 22:22:04 -0500 Subject: [PATCH] iris/compute: Zero out the last grid size on indirect dispatches --- src/gallium/drivers/iris/iris_draw.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gallium/drivers/iris/iris_draw.c b/src/gallium/drivers/iris/iris_draw.c index cd7c969e91b..233658a1204 100644 --- a/src/gallium/drivers/iris/iris_draw.c +++ b/src/gallium/drivers/iris/iris_draw.c @@ -109,6 +109,11 @@ iris_update_grid_size_resource(struct iris_context *ice, if (grid->indirect) { grid_ref->res = grid->indirect; grid_ref->offset = grid->indirect_offset; + + /* Zero out the grid size so that the next non-indirect grid launch will + * re-upload it properly. + */ + memset(ice->state.last_grid, 0, sizeof(ice->state.last_grid)); } else { /* If the size is the same, we don't need to upload anything. */ if (memcmp(ice->state.last_grid, grid->grid, sizeof(grid->grid)) == 0) -- 2.30.2