iris: Fix refcounting of grid surface
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 27 Oct 2018 05:43:34 +0000 (22:43 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:09 +0000 (10:26 -0800)
src/gallium/drivers/iris/iris_draw.c

index 233658a..9139f89 100644 (file)
@@ -107,7 +107,7 @@ iris_update_grid_size_resource(struct iris_context *ice,
    // don't bother uploading the surface?
 
    if (grid->indirect) {
-      grid_ref->res = grid->indirect;
+      pipe_resource_reference(&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