[Mesa-stable] [Mesa-dev] [PATCH 1/3] i965: Fix offset addition in get_isl_surf.

Pohjolainen, Topi topi.pohjolainen at gmail.com
Wed Jul 26 04:54:03 UTC 2017


On Tue, Jul 25, 2017 at 11:04:12AM -0700, Kenneth Graunke wrote:
> 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 at lists.freedesktop.org>

I already had the same patch:

Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>

I didn't see us actually taking this fallback path these days - I wonder if we
actually do. But needs fixing anyway.

> ---
>  src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
> index 250806d28e4..a0ca6ddf985 100644
> --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
> +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
> @@ -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;
> -- 
> 2.13.3
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-stable mailing list