iris/compute: Zero out the last grid size on indirect dispatches
authorJason Ekstrand <jason@jlekstrand.net>
Sat, 27 Oct 2018 03:22:04 +0000 (22:22 -0500)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:09 +0000 (10:26 -0800)
src/gallium/drivers/iris/iris_draw.c

index cd7c969..233658a 100644 (file)
@@ -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)