Mesa (7.11): egl: fix EGL_MATCH_NATIVE_PIXMAP

Chia-I Wu olv at kemper.freedesktop.org
Thu Jun 30 06:24:49 UTC 2011


Module: Mesa
Branch: 7.11
Commit: 29574af377c5b935824b0896d9c4dbf937f11e1c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=29574af377c5b935824b0896d9c4dbf937f11e1c

Author: Chia-I Wu <olv at lunarg.com>
Date:   Sat Jun 25 18:28:20 2011 +0900

egl: fix EGL_MATCH_NATIVE_PIXMAP

EGL_MATCH_NATIVE_PIXMAP is valid for eglChooseConfig, but invalid for
eglGetConfigAttrib.
(cherry picked from commit 8ea5330200e314f9f7de763b1951656c92caa857)

---

 src/egl/main/eglconfig.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/egl/main/eglconfig.c b/src/egl/main/eglconfig.c
index 5b377b7..d63634b 100644
--- a/src/egl/main/eglconfig.c
+++ b/src/egl/main/eglconfig.c
@@ -456,8 +456,6 @@ _eglIsConfigAttribValid(_EGLConfig *conf, EGLint attr)
       return EGL_FALSE;
 
    switch (attr) {
-   case EGL_MATCH_NATIVE_PIXMAP:
-      return EGL_FALSE;
    case EGL_Y_INVERTED_NOK:
       return conf->Display->Extensions.NOK_texture_from_pixmap;
    default:
@@ -739,6 +737,16 @@ _eglGetConfigAttrib(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *conf,
 {
    if (!_eglIsConfigAttribValid(conf, attribute))
       return _eglError(EGL_BAD_ATTRIBUTE, "eglGetConfigAttrib");
+
+   /* nonqueryable attributes */
+   switch (attribute) {
+   case EGL_MATCH_NATIVE_PIXMAP:
+      return _eglError(EGL_BAD_ATTRIBUTE, "eglGetConfigAttrib");
+      break;
+   default:
+      break;
+   }
+
    if (!value)
       return _eglError(EGL_BAD_PARAMETER, "eglGetConfigAttrib");
 




More information about the mesa-commit mailing list