[Mesa-dev] [PATCH 2/3] Add dri image entry point for creating image from fd

Kristian Høgsberg hoegsberg at gmail.com
Mon Mar 18 17:55:01 PDT 2013


On Fri, Mar 01, 2013 at 02:03:20PM +0200, Ander Conselvan de Oliveira wrote:
> On 02/28/2013 03:52 AM, Kristian Høgsberg wrote:
> >---
> >  include/GL/internal/dri_interface.h        | 14 +++++++-
> >  src/mesa/drivers/dri/intel/intel_regions.c | 33 +++++++++++++++++++
> >  src/mesa/drivers/dri/intel/intel_regions.h |  6 ++++
> >  src/mesa/drivers/dri/intel/intel_screen.c  | 53 ++++++++++++++++++++++++++++--
> >  4 files changed, 102 insertions(+), 4 deletions(-)
> >
> 
> [...]
> 
> >diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c
> >index 277b133..3ee0d69 100644
> >--- a/src/mesa/drivers/dri/intel/intel_screen.c
> >+++ b/src/mesa/drivers/dri/intel/intel_screen.c
> >@@ -546,6 +546,9 @@ intel_query_image(__DRIimage *image, int attrib, int *value)
> >           return false;
> >        *value = image->planar_format->components;
> >        return true;
> >+   case __DRI_IMAGE_ATTRIB_FD:
> >+      drm_intel_bo_gem_export_to_prime(image->region->bo, value);
> >+      return true;
> 
> Need to check the return value of drm_intel_bo_gem_export_to_prime().

Right, thanks.

> [...]
> 
> >      .createImageFromRenderbuffer        = intel_create_image_from_renderbuffer,
> >@@ -705,6 +751,7 @@ static struct __DRIimageExtensionRec intelImageExtension = {
> >      .createImageFromNames               = intel_create_image_from_names,
> >      .fromPlanar                         = intel_from_planar,
> >      .createImageFromTexture             = intel_create_image_from_texture
> >+    .createImageFromFd                  = intel_create_image_from_fd
> 
> There's missing comma above, as you pointed out in IRC.

Yeah, that was a little odd, I think I had the compile fix in an uncommitted
patch.
 
> Other than this, the patch seems fine to me.

Thanks,
Kristian


More information about the wayland-devel mailing list