[Mesa-dev] [v7 6/9] egl: definitions for EXT_image_dma_buf_import

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


On 07/10/2013 01:24 AM, Topi Pohjolainen wrote:
> As specified in:
>
> http://www.khronos.org/registry/egl/extensions/EXT/EGL_EXT_image_dma_buf_import.txt
>
> Checking for the valid fourcc values is left for drivers avoiding
> dependency to drm header files here.
>
> v2: enforce EGL_NO_CONTEXT
>
> v3: declare the extension as EGL (not GLES)
>
> v4: do not update eglext.h manually but rely on update from
>      Khronos instead
>
> v5: report invalid context as EGL_BAD_PARAMETER instead of as
>      EGL_BAD_CONTEXT (Eric)
>
> v6: fix the checking for valid hints. Before all values were
>      rejected (Chad).
>
> Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
> ---
>   src/egl/main/eglapi.c     |  6 ++++
>   src/egl/main/egldisplay.h |  1 +
>   src/egl/main/eglimage.c   | 76 +++++++++++++++++++++++++++++++++++++++++++++++
>   src/egl/main/eglimage.h   | 15 ++++++++++
>   src/egl/main/eglmisc.c    |  1 +
>   5 files changed, 99 insertions(+)
>
> diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
> index 4a9831b..5b15744 100644
> --- a/src/egl/main/eglapi.c
> +++ b/src/egl/main/eglapi.c
> @@ -1344,6 +1344,12 @@ eglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, EGLenum target,
>         RETURN_EGL_EVAL(disp, EGL_NO_IMAGE_KHR);
>      if (!context && ctx != EGL_NO_CONTEXT)
>         RETURN_EGL_ERROR(disp, EGL_BAD_CONTEXT, EGL_NO_IMAGE_KHR);
> +   /**
> +    * "If <target> is EGL_LINUX_DMA_BUF_EXT, <dpy> must be a valid display,
> +    *  <ctx> must be EGL_NO_CONTEXT..."
> +    */
> +   if (ctx != EGL_NO_CONTEXT && target == EGL_LINUX_DMA_BUF_EXT)
> +      RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_NO_IMAGE_KHR);


The convention for multi-line comments in the Intel driver is
this for regular comments:

   /* line1
    * line2
    */

and this for Doxygen comments:

   /**
    * line1
    * line2
    */

and never this:

   /*
    * line1
    * line2
    */

The above comment is a regular non-Doxygen comment, so drop the double-star.


Other than that small quibble,
Reviewed-by: Chad Versace <chad.versace at linux.intel.com>


More information about the mesa-dev mailing list