[Mesa-dev] [v2 08/10] egl: definitions for EXT_image_dma_buf_import
Pohjolainen, Topi
topi.pohjolainen at intel.com
Wed May 1 23:34:21 PDT 2013
On Wed, May 01, 2013 at 11:13:37PM -0700, Matt Turner wrote:
> On Mon, Apr 29, 2013 at 4:08 AM, Topi Pohjolainen
> <topi.pohjolainen at intel.com> 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
> >
> > Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
> > ---
> > include/EGL/eglext.h | 33 ++++++++++++++++++++
> > src/egl/main/eglapi.c | 7 ++++-
> > src/egl/main/egldisplay.h | 1 +
> > src/egl/main/eglimage.c | 76 ++++++++++++++++++++++++++++++++++++++++++++++
> > src/egl/main/eglimage.h | 15 +++++++++
> > src/mesa/main/extensions.c | 1 +
> > src/mesa/main/mtypes.h | 1 +
> > 7 files changed, 133 insertions(+), 1 deletion(-)
> >
> > diff --git a/include/EGL/eglext.h b/include/EGL/eglext.h
> > index b2b5a80..9b9be8f 100644
> > --- a/include/EGL/eglext.h
> > +++ b/include/EGL/eglext.h
> > @@ -532,6 +532,39 @@ typedef EGLint (EGLAPIENTRYP PFNEGLDUPNATIVEFENCEFDANDROIDPROC)(EGLDisplay dpy,
> > #define EGL_BUFFER_AGE_EXT 0x313D
> > #endif
> >
> > +#define EGL_LINUX_DMA_BUF_EXT 0x3270 /* eglCreateImageKHR target */
> > +
> > +/* Attributes for eglCreateImageKHR. */
> > +#define EGL_LINUX_DRM_FOURCC_EXT 0x3271
> > +#define EGL_DMA_BUF_PLANE0_FD_EXT 0x3272
> > +#define EGL_DMA_BUF_PLANE0_OFFSET_EXT 0x3273
> > +#define EGL_DMA_BUF_PLANE0_PITCH_EXT 0x3274
> > +#define EGL_DMA_BUF_PLANE1_FD_EXT 0x3275
> > +#define EGL_DMA_BUF_PLANE1_OFFSET_EXT 0x3276
> > +#define EGL_DMA_BUF_PLANE1_PITCH_EXT 0x3277
> > +#define EGL_DMA_BUF_PLANE2_FD_EXT 0x3278
> > +#define EGL_DMA_BUF_PLANE2_OFFSET_EXT 0x3279
> > +#define EGL_DMA_BUF_PLANE2_PITCH_EXT 0x327A
> > +#define EGL_YUV_COLOR_SPACE_HINT_EXT 0x327B
> > +#define EGL_SAMPLE_RANGE_HINT_EXT 0x327C
> > +#define EGL_YUV_CHROMA_HORIZONTAL_SITING_HINT_EXT 0x327D
> > +#define EGL_YUV_CHROMA_VERTICAL_SITING_HINT_EXT 0x327E
> > +
> > +/* Accepted values for EGL_YUV_COLOR_SPACE_HINT_EXT attribute */
> > +#define EGL_ITU_REC601_EXT 0x327F
> > +#define EGL_ITU_REC709_EXT 0x3280
> > +#define EGL_ITU_REC2020_EXT 0x3281
> > +
> > +/* Accepted values for EGL_SAMPLE_RANGE_HINT_EXT attribute */
> > +#define EGL_YUV_FULL_RANGE_EXT 0x3282
> > +#define EGL_YUV_NARROW_RANGE_EXT 0x3283
> > +
> > +/* Accepted values for attributes EGL_YUV_CHROMA_HORIZONTAL_SITING_HINT_EXT
> > + * and EGL_YUV_CHROMA_VERTICAL_SITING_HINT_EXT
> > + */
> > +#define EGL_YUV_CHROMA_SITING_0_EXT 0x3284
> > +#define EGL_YUV_CHROMA_SITING_0_5_EXT 0x3285
> > +
> > #include <EGL/eglmesaext.h>
> >
> > #ifdef __cplusplus
>
> eglext.h is imported from Khronos
> (http://www.khronos.org/registry/egl/api/EGL/eglext.h), with the
> single modification to #include <EGL/eglmesaext.h> at the bottom of
> the file. The new version contains all the definitions for this
> extension.
Thanks, I was just about to submit fixes to the rest of the series, now I can
include this also.
-Topi
More information about the mesa-dev
mailing list