From 8975527f58afd4af77966c6e46b485fc04008779 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Tue, 2 Feb 2016 14:23:07 -0600 Subject: egl: Add EGL_FRAMEBUFFER_TARGET_ANDROID attribute This is used by Android to select an eglconfig compatible with HWComposer. Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Rob Herring [Emil Velikov: add the _eglIsConfigAttribValid check] Signed-off-by: Emil Velikov --- src/egl/main/eglconfig.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/egl/main/eglconfig.c') diff --git a/src/egl/main/eglconfig.c b/src/egl/main/eglconfig.c index d79c0e15422..7d2791ca340 100644 --- a/src/egl/main/eglconfig.c +++ b/src/egl/main/eglconfig.c @@ -245,7 +245,10 @@ static const struct { /* extensions */ { EGL_Y_INVERTED_NOK, ATTRIB_TYPE_BOOLEAN, ATTRIB_CRITERION_EXACT, - EGL_DONT_CARE } + EGL_DONT_CARE }, + { EGL_FRAMEBUFFER_TARGET_ANDROID, ATTRIB_TYPE_BOOLEAN, + ATTRIB_CRITERION_EXACT, + EGL_DONT_CARE }, }; @@ -488,6 +491,8 @@ _eglIsConfigAttribValid(_EGLConfig *conf, EGLint attr) switch (attr) { case EGL_Y_INVERTED_NOK: return conf->Display->Extensions.NOK_texture_from_pixmap; + case EGL_FRAMEBUFFER_TARGET_ANDROID: + return conf->Display->Extensions.ANDROID_framebuffer_target; default: break; } -- cgit v1.2.3