summaryrefslogtreecommitdiffstats
path: root/src/egl
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2017-06-29 00:19:16 +0100
committerEmil Velikov <[email protected]>2017-07-12 15:43:09 +0100
commitcd859452e900e588ad8f7c067d2378fad7fc9c93 (patch)
treea1856549617308dd82ab2619b52f8bef2d1a15de /src/egl
parentd13dcca2c2ba8fdebf81b5db79dbedbc1835c701 (diff)
egl: add width/height as EXT_image_dma_buf_import attrs
Although not listed amongst the initial EGL_LINUX_DRM_FOURCC_EXT and friends list, the spec reads ... Required attributes and their values are as follows: * EGL_WIDTH & EGL_HEIGHT: The logical dimensions of the buffer in pixels * EGL_LINUX_DRM_FOURCC_EXT: The pixel format of the buffer, as specified by drm_fourcc.h and used as the pixel_format parameter of the drm_mode_fb_cmd2 ioctl. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src/egl')
-rw-r--r--src/egl/main/eglimage.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/egl/main/eglimage.c b/src/egl/main/eglimage.c
index dfc7dec2406..b361a2d0242 100644
--- a/src/egl/main/eglimage.c
+++ b/src/egl/main/eglimage.c
@@ -107,6 +107,12 @@ _eglParseEXTImageDmaBufImportAttribs(_EGLImageAttribs *attrs, _EGLDisplay *dpy,
EGLint attr, EGLint val)
{
switch (attr) {
+ case EGL_WIDTH:
+ attrs->Width = val;
+ break;
+ case EGL_HEIGHT:
+ attrs->Height = val;
+ break;
case EGL_LINUX_DRM_FOURCC_EXT:
attrs->DMABufFourCC.Value = val;
attrs->DMABufFourCC.IsPresent = EGL_TRUE;