intel: allow packed prime buffers to be treated normally
authorTopi Pohjolainen <topi.pohjolainen@intel.com>
Thu, 25 Apr 2013 11:33:09 +0000 (14:33 +0300)
committerTopi Pohjolainen <topi.pohjolainen@intel.com>
Fri, 2 Aug 2013 05:56:02 +0000 (08:56 +0300)
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>
src/mesa/drivers/dri/i965/intel_screen.c

index f913c429db57d858bde624bf67e436e4d20dc9dc..ce7a51e55125700c4aea179ea75c92763a44f4b8 100644 (file)
@@ -651,7 +651,11 @@ intel_create_image_from_fds(__DRIscreen *screen,
    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;