diff options
author | Chia-I Wu <olv@lunarg.com> | 2011-01-05 18:51:39 +0800 |
---|---|---|
committer | Chia-I Wu <olv@lunarg.com> | 2011-01-05 18:54:44 +0800 |
commit | c438a09b4c1f9c886b83c81aabc0838503a426ee (patch) | |
tree | c424af210baaba5aeeb63813777deee3699f7a5f | |
parent | 0ab166d5564972ff43aa652e816625a5c0ccb3f0 (diff) |
egl_glx: Fix borken driver.
The driver was broken since 6eda3f311bc24999835003e404d5eda5599bc5de.
All configs fail to pass _eglValidateConfig. This fix might not be
complete, but at least EGL demos run.
This fixes bug #32825.
-rw-r--r-- | src/egl/drivers/glx/egl_glx.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/egl/drivers/glx/egl_glx.c b/src/egl/drivers/glx/egl_glx.c index b2076e2e3fd..9805598f8ba 100644 --- a/src/egl/drivers/glx/egl_glx.c +++ b/src/egl/drivers/glx/egl_glx.c @@ -142,7 +142,6 @@ static const struct { { GLX_STENCIL_SIZE, EGL_STENCIL_SIZE }, { GLX_SAMPLE_BUFFERS, EGL_SAMPLE_BUFFERS }, { GLX_SAMPLES, EGL_SAMPLES }, - { GLX_RENDER_TYPE, EGL_RENDERABLE_TYPE }, { GLX_X_RENDERABLE, EGL_NATIVE_RENDERABLE }, { GLX_X_VISUAL_TYPE, EGL_NATIVE_VISUAL_TYPE }, { GLX_CONFIG_CAVEAT, EGL_CONFIG_CAVEAT }, @@ -218,6 +217,16 @@ convert_fbconfig(Display *dpy, GLXFBConfig fbconfig, _eglSetConfigKey(&GLX_conf->Base, EGL_SURFACE_TYPE, surface_type); + _eglSetConfigKey(&GLX_conf->Base, EGL_RENDERABLE_TYPE, EGL_OPENGL_BIT); + + glXGetFBConfigAttrib(dpy, fbconfig, GLX_TRANSPARENT_TYPE, &val); + if (val == GLX_NONE) { + _eglSetConfigKey(&GLX_conf->Base, EGL_TRANSPARENT_TYPE, EGL_NONE); + _eglSetConfigKey(&GLX_conf->Base, EGL_TRANSPARENT_RED_VALUE, 0); + _eglSetConfigKey(&GLX_conf->Base, EGL_TRANSPARENT_GREEN_VALUE, 0); + _eglSetConfigKey(&GLX_conf->Base, EGL_TRANSPARENT_BLUE_VALUE, 0); + } + return EGL_TRUE; } @@ -294,6 +303,7 @@ convert_visual(Display *dpy, XVisualInfo *vinfo, surface_type |= EGL_PIXMAP_BIT; _eglSetConfigKey(&GLX_conf->Base, EGL_SURFACE_TYPE, surface_type); + _eglSetConfigKey(&GLX_conf->Base, EGL_RENDERABLE_TYPE, EGL_OPENGL_BIT); _eglSetConfigKey(&GLX_conf->Base, EGL_NATIVE_RENDERABLE, EGL_TRUE); |