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

Ander Conselvan de Oliveira conselvan2 at gmail.com
Fri Mar 1 04:03:20 PST 2013


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().

[...]

>       .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.

Other than this, the patch seems fine to me.

Cheers,
Ander



More information about the wayland-devel mailing list