Mesa (master): egl: add width/height as EXT_image_dma_buf_import attrs
Emil Velikov
evelikov at kemper.freedesktop.org
Wed Jul 12 15:28:07 UTC 2017
Module: Mesa
Branch: master
Commit: cd859452e900e588ad8f7c067d2378fad7fc9c93
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=cd859452e900e588ad8f7c067d2378fad7fc9c93
Author: Emil Velikov <emil.velikov at collabora.com>
Date: Thu Jun 29 00:19:16 2017 +0100
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 <emil.velikov at collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom at imgtec.com>
---
src/egl/main/eglimage.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/egl/main/eglimage.c b/src/egl/main/eglimage.c
index dfc7dec240..b361a2d024 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;
More information about the mesa-commit
mailing list