[Mesa-dev] [v7 5/9] dri: propagate extra dma_buf import attributes to the drivers

Chad Versace chad.versace at linux.intel.com
Fri Jul 19 14:32:01 PDT 2013


On 07/10/2013 01:24 AM, Topi Pohjolainen wrote:
> v2:
>     - do not break ABI, but instead introduce new entry point for
>       dma buffers and bump up the dri-interface version to eight
>
> v3 (Chad):
>     - allow the hook to specify an error originating from the
>       driver. For now only unsupported format is considered. I
>       thought about rejecting the hints also as they are addressing
>       only YUV sampling which is not supported at the moment but
>       then thought against it as the spec is not saying one way or
>       the other.
>
> v4 (Eric, Chad):
>     - restrict to rgb formatted only
>
> v5:
>     - rebased on top of i915/i965 split
>
> Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
> ---
>   include/GL/internal/dri_interface.h       | 37 +++++++++++++++++++++++-
>   src/mesa/drivers/dri/i965/intel_regions.h |  7 +++++
>   src/mesa/drivers/dri/i965/intel_screen.c  | 48 +++++++++++++++++++++++++++++--
>   3 files changed, 89 insertions(+), 3 deletions(-)


> +
> +   /**
> +    * Like createImageFromFds, but takes additional attributes.

Please document here "For EGL_EXT_image_dma_buf_import.", as is done in
__DRItexBufferExtensionRec for GLX_EXT_texture_from_pixmap.

> +    *
> +    * \since 8
> +    */
> +   __DRIimage *(*createImageFromDmaBufs)(__DRIscreen *screen,
> +                                         int width, int height, int fourcc,
> +                                         int *fds, int num_fds,
> +                                         int *strides, int *offsets,
> +                                         enum __DRIYUVColorSpace color_space,
> +                                         enum __DRISampleRange sample_range,
> +                                         enum __DRIChromaSiting horiz_siting,
> +                                         enum __DRIChromaSiting vert_siting,
> +                                         unsigned *error,
> +                                         void *loaderPrivate);




> @@ -149,6 +150,12 @@ struct __DRIimageRec {
>      GLuint tile_y;
>      bool has_depthstencil;
>
> +   /* Provided by dma_buf import extension */

Use the full extension name, EGL_EXT_image_dma_buf_import, in the comments to
aid in grepping the codebase.

> +   enum __DRIYUVColorSpace yuv_color_space;
> +   enum __DRISampleRange sample_range;
> +   enum __DRIChromaSiting horizontal_siting;
> +   enum __DRIChromaSiting vertical_siting;
> +
>      void *data;
>   };


With those two small changes, this is
Reviewed-by: Chad Versace <chad.versace at linux.intel.com>



More information about the mesa-dev mailing list