[Mesa-dev] [PATCH] i965/screen: Check that given format is valid

Tapani Pälli tapani.palli at intel.com
Thu Sep 21 07:32:47 UTC 2017


Reviewed-by: Tapani Pälli <tapani.palli at intel.com>

On 09/21/2017 10:22 AM, Topi Pohjolainen wrote:
> CID: 1418110
> Fixes: 939b53d3325 "i965/screen: Implement queryDmaBufFormatModifierAttirbs"
> 
> CC: Jason Ekstrand <jason at jlekstrand.net>
> Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
> ---
>   src/mesa/drivers/dri/i965/intel_screen.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c
> index bc2bba00b6..f85d1ba51d 100644
> --- a/src/mesa/drivers/dri/i965/intel_screen.c
> +++ b/src/mesa/drivers/dri/i965/intel_screen.c
> @@ -830,6 +830,8 @@ intel_query_format_modifier_attribs(__DRIscreen *dri_screen,
>   {
>      struct intel_screen *screen = dri_screen->driverPrivate;
>      const struct intel_image_format *f = intel_image_format_lookup(fourcc);
> +   if (f == NULL)
> +      return false;
>   
>      if (!modifier_is_supported(&screen->devinfo, f, 0, modifier))
>         return false;
> 


More information about the mesa-dev mailing list