Once you can see the then-block before this else-block, it becomes
obvious. :)

Reviewed-by: Ian Romanick <ian.d.roman...@intel.com>

On 12/29/2017 09:30 PM, Ilia Mirkin wrote:
> Some later code relies on _Layer to set first/last_layer. Make sure it's
> always initialized.
> 
> Detected by valgrind's conditional jump/move with uninit value logic.
> 
> Signed-off-by: Ilia Mirkin <imir...@alum.mit.edu>
> ---
>  src/mesa/main/texturebindless.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/mesa/main/texturebindless.c b/src/mesa/main/texturebindless.c
> index f062ea904a1..9aaa0367c2d 100644
> --- a/src/mesa/main/texturebindless.c
> +++ b/src/mesa/main/texturebindless.c
> @@ -327,6 +327,7 @@ get_image_handle(struct gl_context *ctx, struct 
> gl_texture_object *texObj,
>     } else {
>        imgObj.Layered = GL_FALSE;
>        imgObj.Layer = 0;
> +      imgObj._Layer = 0;
>     }
>  
>     /* Request a new image handle from the driver. */
> 

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to