summaryrefslogtreecommitdiffstats
path: root/src/egl/main
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2010-10-22 17:09:40 +0800
committerChia-I Wu <[email protected]>2010-10-22 18:35:09 +0800
commit5664a983867038de48e71b65df89e0e254085af2 (patch)
tree4c3fa8187bc199b83fe8485cfd33d86ee84a1675 /src/egl/main
parent713c8734f45b51b3758ecc95b96cf7b5aecacec8 (diff)
egl: Parse image attributes with _eglParseImageAttribList.
Avoid code duplications.
Diffstat (limited to 'src/egl/main')
-rw-r--r--src/egl/main/eglimage.c18
-rw-r--r--src/egl/main/eglimage.h7
2 files changed, 25 insertions, 0 deletions
diff --git a/src/egl/main/eglimage.c b/src/egl/main/eglimage.c
index e11a1836ff6..8244ef3b518 100644
--- a/src/egl/main/eglimage.c
+++ b/src/egl/main/eglimage.c
@@ -45,6 +45,24 @@ _eglParseImageAttribList(_EGLImageAttribs *attrs, _EGLDisplay *dpy,
case EGL_GL_TEXTURE_ZOFFSET_KHR:
attrs->GLTextureZOffset = val;
break;
+
+ /* EGL_MESA_drm_image */
+ case EGL_WIDTH:
+ attrs->Width = val;
+ break;
+ case EGL_HEIGHT:
+ attrs->Height = val;
+ break;
+ case EGL_DRM_BUFFER_FORMAT_MESA:
+ attrs->DRMBufferFormatMESA = val;
+ break;
+ case EGL_DRM_BUFFER_USE_MESA:
+ attrs->DRMBufferUseMESA = val;
+ break;
+ case EGL_DRM_BUFFER_STRIDE_MESA:
+ attrs->DRMBufferStrideMESA = val;
+ break;
+
default:
/* unknown attrs are ignored */
break;
diff --git a/src/egl/main/eglimage.h b/src/egl/main/eglimage.h
index 356395a210a..e457bf4ef69 100644
--- a/src/egl/main/eglimage.h
+++ b/src/egl/main/eglimage.h
@@ -14,6 +14,13 @@ struct _egl_image_attribs
/* EGL_KHR_gl_image */
EGLint GLTextureLevel;
EGLint GLTextureZOffset;
+
+ /* EGL_MESA_drm_image */
+ EGLint Width;
+ EGLint Height;
+ EGLint DRMBufferFormatMESA;
+ EGLint DRMBufferUseMESA;
+ EGLint DRMBufferStrideMESA;
};
/**