i915: Fix black buffers when importing prime fds
authorAndreas Pokorny <andreas.pokorny@canonical.com>
Wed, 27 Aug 2014 07:36:16 +0000 (09:36 +0200)
committerEmil Velikov <emil.l.velikov@gmail.com>
Mon, 22 Sep 2014 23:26:17 +0000 (00:26 +0100)
Width and Height of the imported image was never initialized from the
imported bo.

Cc: 10.2 10.3 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Andreas Pokorny <andreas.pokorny@canonical.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
src/mesa/drivers/dri/i915/intel_screen.c

index 3aaa45f88bba96b090eb1224daf4b2e91d5ea9ea..00d85805da08395780e08af66f3146926af99184 100644 (file)
@@ -616,6 +616,8 @@ intel_create_image_from_fds(__DRIscreen *screen,
       return NULL;
    }
 
+   intel_setup_image_from_dimensions(image);
+
    image->planar_format = f;
    for (i = 0; i < f->nplanes; i++) {
       index = f->planes[i].buffer_index;