diff options
author | Chia-I Wu <olv@lunarg.com> | 2011-06-25 18:28:20 +0900 |
---|---|---|
committer | Chia-I Wu <olv@lunarg.com> | 2011-06-25 18:51:11 +0900 |
commit | 8ea5330200e314f9f7de763b1951656c92caa857 (patch) | |
tree | abbe0c7a02c68e966ccf49026a0eb53557dbbc75 /src/egl/main | |
parent | a0ad339915d8b5fdbebe82678fc81cbf1ec6682b (diff) |
egl: fix EGL_MATCH_NATIVE_PIXMAP
EGL_MATCH_NATIVE_PIXMAP is valid for eglChooseConfig, but invalid for
eglGetConfigAttrib.
Diffstat (limited to 'src/egl/main')
-rw-r--r-- | 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 1fd473d6208..55ce6fd2e09 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: @@ -767,6 +765,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"); |