* "If <target> is EGL_LINUX_DMA_BUF_EXT, and the EGL_LINUX_DRM_FOURCC_EXT
* attribute indicates a single-plane format, EGL_BAD_ATTRIBUTE is
* generated if any of the EGL_DMA_BUF_PLANE1_* or EGL_DMA_BUF_PLANE2_*
- * attributes are specified."
+ * or EGL_DMA_BUF_PLANE3_* attributes are specified."
*/
for (i = plane_n; i < DMA_BUF_MAX_PLANES; ++i) {
if (attrs->DMABufPlaneFds[i].IsPresent ||
EGLBoolean EXT_buffer_age;
EGLBoolean EXT_create_context_robustness;
EGLBoolean EXT_image_dma_buf_import;
+ EGLBoolean EXT_image_dma_buf_import_modifiers;
EGLBoolean EXT_swap_buffers_with_damage;
EGLBoolean KHR_cl_event2;
attrs->DMABufPlanePitches[2].Value = val;
attrs->DMABufPlanePitches[2].IsPresent = EGL_TRUE;
break;
+ case EGL_DMA_BUF_PLANE3_FD_EXT:
+ if (!dpy->Extensions.EXT_image_dma_buf_import_modifiers)
+ err = EGL_BAD_PARAMETER;
+ attrs->DMABufPlaneFds[3].Value = val;
+ attrs->DMABufPlaneFds[3].IsPresent = EGL_TRUE;
+ break;
+ case EGL_DMA_BUF_PLANE3_OFFSET_EXT:
+ if (!dpy->Extensions.EXT_image_dma_buf_import_modifiers)
+ err = EGL_BAD_PARAMETER;
+ attrs->DMABufPlaneOffsets[3].Value = val;
+ attrs->DMABufPlaneOffsets[3].IsPresent = EGL_TRUE;
+ break;
+ case EGL_DMA_BUF_PLANE3_PITCH_EXT:
+ if (!dpy->Extensions.EXT_image_dma_buf_import_modifiers)
+ err = EGL_BAD_PARAMETER;
+ attrs->DMABufPlanePitches[3].Value = val;
+ attrs->DMABufPlanePitches[3].IsPresent = EGL_TRUE;
+ break;
case EGL_YUV_COLOR_SPACE_HINT_EXT:
if (val != EGL_ITU_REC601_EXT && val != EGL_ITU_REC709_EXT &&
val != EGL_ITU_REC2020_EXT) {
EGLBoolean IsPresent;
};
-#define DMA_BUF_MAX_PLANES 3
+#define DMA_BUF_MAX_PLANES 4
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[DMA_BUF_MAX_PLANES];
struct _egl_image_attrib_int DMABufPlaneOffsets[DMA_BUF_MAX_PLANES];