[Mesa-dev] [PATCH 04/11] i965: Handle miptree creation failure in intel_alloc_texture_storage()

Ian Romanick idr at freedesktop.org
Fri Jun 20 16:51:03 PDT 2014


Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

On 06/19/2014 05:24 AM, Juha-Pekka Heikkila wrote:
> Check intel_miptree_create() return value before using it as
> a pointer.
> 
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
> ---
>  src/mesa/drivers/dri/i965/intel_tex.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/src/mesa/drivers/dri/i965/intel_tex.c b/src/mesa/drivers/dri/i965/intel_tex.c
> index f18ca45..556b787 100644
> --- a/src/mesa/drivers/dri/i965/intel_tex.c
> +++ b/src/mesa/drivers/dri/i965/intel_tex.c
> @@ -147,6 +147,9 @@ intel_alloc_texture_storage(struct gl_context *ctx,
>                                                num_samples,
>                                                INTEL_MIPTREE_TILING_ANY);
>  
> +      if (intel_texobj->mt == NULL) {
> +         return false;
> +      }
>     }
>  
>     for (face = 0; face < numFaces; face++) {
> 



More information about the mesa-dev mailing list