[Mesa-dev] [PATCH 07/16] i965/miptree: Check for miptree_create() failures

Jason Ekstrand jason at jlekstrand.net
Mon Jul 17 16:10:32 UTC 2017


Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

On Mon, Jul 17, 2017 at 6:34 AM, Topi Pohjolainen <
topi.pohjolainen at gmail.com> wrote:

> Rest of the function assumes it always succeeds.
>
> Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
> ---
>  src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> index bef544c0ae..a77684dc18 100644
> --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> @@ -887,6 +887,8 @@ intel_miptree_create(struct brw_context *brw,
>                                       first_level, last_level,
>                                       width0, height0, depth0, num_samples,
>                                       layout_flags);
> +   if (!mt)
> +      return NULL;
>
>     /* If the BO is too large to fit in the aperture, we need to use the
>      * BLT engine to support it.  Prior to Sandybridge, the BLT paths can't
> --
> 2.11.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170717/6fdc4f04/attachment.html>


More information about the mesa-dev mailing list