v2:
- fix earlier rebase error breaking bisect
(loaderPriv -> loaderPrivate)
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
if (f == NULL)
return NULL;
- image = intel_allocate_image(__DRI_IMAGE_FORMAT_NONE, loaderPrivate);
+ if (f->nplanes == 1)
+ image = intel_allocate_image(f->planes[0].dri_format, loaderPrivate);
+ else
+ image = intel_allocate_image(__DRI_IMAGE_FORMAT_NONE, loaderPrivate);
+
if (image == NULL)
return NULL;