diff options
Diffstat (limited to 'lib/mesa/src/egl/main/eglimage.h')
-rw-r--r-- | lib/mesa/src/egl/main/eglimage.h | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/lib/mesa/src/egl/main/eglimage.h b/lib/mesa/src/egl/main/eglimage.h index 0dd5e120a..875179213 100644 --- a/lib/mesa/src/egl/main/eglimage.h +++ b/lib/mesa/src/egl/main/eglimage.h @@ -46,6 +46,8 @@ struct _egl_image_attrib_int EGLBoolean IsPresent; }; +#define DMA_BUF_MAX_PLANES 4 + struct _egl_image_attribs { /* EGL_KHR_image_base */ @@ -65,11 +67,14 @@ struct _egl_image_attribs /* EGL_WL_bind_wayland_display */ EGLint PlaneWL; - /* EGL_EXT_image_dma_buf_import */ + /* EGL_EXT_image_dma_buf_import and + * EGL_EXT_image_dma_buf_import_modifiers */ struct _egl_image_attrib_int DMABufFourCC; - struct _egl_image_attrib_int DMABufPlaneFds[3]; - struct _egl_image_attrib_int DMABufPlaneOffsets[3]; - struct _egl_image_attrib_int DMABufPlanePitches[3]; + struct _egl_image_attrib_int DMABufPlaneFds[DMA_BUF_MAX_PLANES]; + struct _egl_image_attrib_int DMABufPlaneOffsets[DMA_BUF_MAX_PLANES]; + struct _egl_image_attrib_int DMABufPlanePitches[DMA_BUF_MAX_PLANES]; + struct _egl_image_attrib_int DMABufPlaneModifiersLo[DMA_BUF_MAX_PLANES]; + struct _egl_image_attrib_int DMABufPlaneModifiersHi[DMA_BUF_MAX_PLANES]; struct _egl_image_attrib_int DMABufYuvColorSpaceHint; struct _egl_image_attrib_int DMABufSampleRangeHint; struct _egl_image_attrib_int DMABufChromaHorizontalSiting; @@ -86,13 +91,16 @@ struct _egl_image }; -extern EGLint +EGLBoolean _eglParseImageAttribList(_EGLImageAttribs *attrs, _EGLDisplay *dpy, const EGLint *attrib_list); -extern EGLBoolean -_eglInitImage(_EGLImage *img, _EGLDisplay *dpy); +static inline void +_eglInitImage(_EGLImage *img, _EGLDisplay *dpy) +{ + _eglInitResource(&img->Resource, sizeof(*img), dpy); +} /** |