diff options
author | Chia-I Wu <[email protected]> | 2010-01-31 14:32:31 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2010-01-31 14:46:14 +0800 |
commit | 216925ccd122a06505dafae425323e3ac858f80e (patch) | |
tree | 4df3b9eeabb483dd6696df496c56647a9cedc62d /src | |
parent | d69242be55091e53b0ae2cfa6282790ce1862f29 (diff) |
egl: Initialize display configs with the display.
This changes _eglInitConfig to take the display as its argument.
Diffstat (limited to 'src')
-rw-r--r-- | src/egl/drivers/glx/egl_glx.c | 2 | ||||
-rw-r--r-- | src/egl/drivers/xdri/egl_xdri.c | 2 | ||||
-rw-r--r-- | src/egl/main/eglconfig.c | 6 | ||||
-rw-r--r-- | src/egl/main/eglconfig.h | 2 | ||||
-rw-r--r-- | src/gallium/state_trackers/egl/common/egl_g3d.c | 2 |
5 files changed, 8 insertions, 6 deletions
diff --git a/src/egl/drivers/glx/egl_glx.c b/src/egl/drivers/glx/egl_glx.c index 82d256c52d7..8e6b5b07a2f 100644 --- a/src/egl/drivers/glx/egl_glx.c +++ b/src/egl/drivers/glx/egl_glx.c @@ -422,7 +422,7 @@ create_configs(_EGLDisplay *dpy, struct GLX_egl_display *GLX_dpy, EGLBoolean ok; memset(&template, 0, sizeof(template)); - _eglInitConfig(&template.Base, id); + _eglInitConfig(&template.Base, dpy, id); if (GLX_dpy->have_fbconfig) ok = convert_fbconfig(GLX_dpy->dpy, GLX_dpy->fbconfigs[i], &template); else diff --git a/src/egl/drivers/xdri/egl_xdri.c b/src/egl/drivers/xdri/egl_xdri.c index 2d868cbeea6..68e659eb276 100644 --- a/src/egl/drivers/xdri/egl_xdri.c +++ b/src/egl/drivers/xdri/egl_xdri.c @@ -171,7 +171,6 @@ convert_config(_EGLConfig *conf, EGLint id, const __GLcontextModes *m) { EGLint val; - _eglInitConfig(conf, id); if (!_eglConfigFromContextModesRec(conf, m, EGL_OPENGL_BIT, EGL_OPENGL_BIT)) return EGL_FALSE; @@ -221,6 +220,7 @@ create_configs(_EGLDisplay *disp, const __GLcontextModes *m, EGLint first_id) _EGLConfig conf; EGLint rb; + _eglInitConfig(&conf, disp, id); if (!convert_config(&conf, id, m)) continue; if (m->doubleBufferMode) { diff --git a/src/egl/main/eglconfig.c b/src/egl/main/eglconfig.c index b974e40cce6..1a5fdbd4250 100644 --- a/src/egl/main/eglconfig.c +++ b/src/egl/main/eglconfig.c @@ -25,10 +25,12 @@ * IDs are from 1 to N respectively. */ void -_eglInitConfig(_EGLConfig *config, EGLint id) +_eglInitConfig(_EGLConfig *config, _EGLDisplay *dpy, EGLint id) { memset(config, 0, sizeof(*config)); + config->Display = dpy; + /* some attributes take non-zero default values */ SET_CONFIG_ATTRIB(config, EGL_CONFIG_ID, id); SET_CONFIG_ATTRIB(config, EGL_CONFIG_CAVEAT, EGL_NONE); @@ -730,7 +732,7 @@ _eglChooseConfig(_EGLDriver *drv, _EGLDisplay *disp, const EGLint *attrib_list, if (!num_configs) return _eglError(EGL_BAD_PARAMETER, "eglChooseConfigs"); - _eglInitConfig(&criteria, 0); + _eglInitConfig(&criteria, disp, 0); if (!_eglParseConfigAttribList(&criteria, attrib_list)) return _eglError(EGL_BAD_ATTRIBUTE, "eglChooseConfig"); diff --git a/src/egl/main/eglconfig.h b/src/egl/main/eglconfig.h index 799bf4ee242..09dc61f5473 100644 --- a/src/egl/main/eglconfig.h +++ b/src/egl/main/eglconfig.h @@ -92,7 +92,7 @@ _eglSetConfigAttrib(_EGLConfig *conf, EGLint attr, EGLint val) PUBLIC void -_eglInitConfig(_EGLConfig *config, EGLint id); +_eglInitConfig(_EGLConfig *config, _EGLDisplay *dpy, EGLint id); PUBLIC EGLConfig diff --git a/src/gallium/state_trackers/egl/common/egl_g3d.c b/src/gallium/state_trackers/egl/common/egl_g3d.c index 3fd775abe5a..8a73e81d4ac 100644 --- a/src/gallium/state_trackers/egl/common/egl_g3d.c +++ b/src/gallium/state_trackers/egl/common/egl_g3d.c @@ -468,7 +468,7 @@ egl_g3d_add_configs(_EGLDriver *drv, _EGLDisplay *dpy, EGLint id) if (!gconf) continue; - _eglInitConfig(&gconf->base, id); + _eglInitConfig(&gconf->base, dpy, id); api_mask = get_mode_api_mask(&native_configs[i]->mode, gdrv->api_mask); if (!api_mask) { |