[Mesa-dev] [v6 1/9] intel: allow packed prime buffers to be treated normally

Topi Pohjolainen topi.pohjolainen at intel.com
Tue May 28 02:17:44 PDT 2013


v2:
   - fix earlier rebase error breaking bisect
     (loaderPriv -> loaderPrivate)

Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
---
 src/mesa/drivers/dri/intel/intel_screen.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c
index 325304d..cedfc2a 100644
--- a/src/mesa/drivers/dri/intel/intel_screen.c
+++ b/src/mesa/drivers/dri/intel/intel_screen.c
@@ -658,7 +658,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;
 
-- 
1.8.1.2



More information about the mesa-dev mailing list