diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2008-06-28 16:03:28 -0600 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2008-06-28 16:03:28 -0600 |
commit | 8f91a83669b8626678eb38fbbdd304c72243b6fe (patch) | |
tree | 400cd1c02fafaf67421afa727d37a1bd4999736b /src/egl/main | |
parent | 0f9a1e43bce9bfa7a9cba2d7008fcec2890db02a (diff) | |
download | external_mesa3d-8f91a83669b8626678eb38fbbdd304c72243b6fe.zip external_mesa3d-8f91a83669b8626678eb38fbbdd304c72243b6fe.tar.gz external_mesa3d-8f91a83669b8626678eb38fbbdd304c72243b6fe.tar.bz2 |
egl: fix default value of EGL_SURFACE_TYPE, added some sanity check assertions
Diffstat (limited to 'src/egl/main')
-rw-r--r-- | src/egl/main/eglconfig.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/egl/main/eglconfig.c b/src/egl/main/eglconfig.c index b6846d4..b19988f 100644 --- a/src/egl/main/eglconfig.c +++ b/src/egl/main/eglconfig.c @@ -43,9 +43,7 @@ _eglInitConfig(_EGLConfig *config, EGLint id) _eglSetConfigAttrib(config, EGL_NATIVE_VISUAL_TYPE, EGL_DONT_CARE); _eglSetConfigAttrib(config, EGL_MIN_SWAP_INTERVAL, EGL_DONT_CARE); _eglSetConfigAttrib(config, EGL_MAX_SWAP_INTERVAL, EGL_DONT_CARE); - _eglSetConfigAttrib(config, EGL_SURFACE_TYPE, - EGL_SCREEN_BIT_MESA | EGL_PBUFFER_BIT | - EGL_PIXMAP_BIT | EGL_WINDOW_BIT); + _eglSetConfigAttrib(config, EGL_SURFACE_TYPE, EGL_WINDOW_BIT); _eglSetConfigAttrib(config, EGL_TRANSPARENT_TYPE, EGL_NONE); _eglSetConfigAttrib(config, EGL_TRANSPARENT_RED_VALUE, EGL_DONT_CARE); _eglSetConfigAttrib(config, EGL_TRANSPARENT_GREEN_VALUE, EGL_DONT_CARE); @@ -96,6 +94,14 @@ _eglAddConfig(_EGLDisplay *display, _EGLConfig *config) _EGLConfig **newConfigs; EGLint n; + /* do some sanity checks on the config's attribs */ + assert(GET_CONFIG_ATTRIB(config, EGL_CONFIG_ID) > 0); + assert(GET_CONFIG_ATTRIB(config, EGL_RENDERABLE_TYPE) != 0x0); + assert(GET_CONFIG_ATTRIB(config, EGL_SURFACE_TYPE) != 0x0); + assert(GET_CONFIG_ATTRIB(config, EGL_RED_SIZE) > 0); + assert(GET_CONFIG_ATTRIB(config, EGL_GREEN_SIZE) > 0); + assert(GET_CONFIG_ATTRIB(config, EGL_BLUE_SIZE) > 0); + n = display->NumConfigs; /* realloc array of ptrs */ |