i965: Fix offset addition in get_isl_surf.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 25 Jul 2017 17:16:16 +0000 (10:16 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 26 Jul 2017 05:14:21 +0000 (22:14 -0700)
Increase the value, not the pointer to the stack variable.

Caught by Coverity (CID 1415574).  Not shipped in a real release.

Cc: "17.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/mesa/drivers/dri/i965/brw_wm_surface_state.c

index 250806d28e49d02b6d903edbd8b1744ca6e7f398..a0ca6ddf9855d3e08beddc65eb24a36f1b291bf9 100644 (file)
@@ -101,9 +101,9 @@ get_isl_surf(struct brw_context *brw, struct intel_mipmap_tree *mt,
    assert(view->levels == 1 && view->array_len == 1);
    assert(*tile_x == 0 && *tile_y == 0);
 
-   offset += intel_miptree_get_tile_offsets(mt, view->base_level,
-                                            view->base_array_layer,
-                                            tile_x, tile_y);
+   *offset += intel_miptree_get_tile_offsets(mt, view->base_level,
+                                             view->base_array_layer,
+                                             tile_x, tile_y);
 
    /* Minify the logical dimensions of the texture. */
    const unsigned l = view->base_level - mt->first_level;