summaryrefslogtreecommitdiff
path: root/src/egl
diff options
context:
space:
mode:
authorChia-I Wu <olvaffe@gmail.com>2009-10-16 12:18:25 +0800
committerBrian Paul <brianp@vmware.com>2009-10-22 09:33:27 -0600
commit326baecd757747a52b028e1f590437597776d7e6 (patch)
tree3bc1ea14fa7f8c93003fcbe17176290bc2deee10 /src/egl
parenteebf4b5299a880f4cdf8a916b4e1ca0bd79a6f07 (diff)
egl: Correct conversion of native visual type.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Diffstat (limited to 'src/egl')
-rw-r--r--src/egl/main/eglconfigutil.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/egl/main/eglconfigutil.c b/src/egl/main/eglconfigutil.c
index a5fcdcd287..36e94f0d2d 100644
--- a/src/egl/main/eglconfigutil.c
+++ b/src/egl/main/eglconfigutil.c
@@ -102,7 +102,12 @@ _eglConfigFromContextModesRec(_EGLConfig *conf, const __GLcontextModes *m,
SET_CONFIG_ATTRIB(conf, EGL_NATIVE_RENDERABLE, m->xRenderable);
SET_CONFIG_ATTRIB(conf, EGL_NATIVE_VISUAL_ID, m->visualID);
- SET_CONFIG_ATTRIB(conf, EGL_NATIVE_VISUAL_TYPE, m->visualType);
+
+ if (m->visualType != GLX_NONE)
+ SET_CONFIG_ATTRIB(conf, EGL_NATIVE_VISUAL_TYPE, m->visualType);
+ else
+ SET_CONFIG_ATTRIB(conf, EGL_NATIVE_VISUAL_TYPE, EGL_NONE);
+
SET_CONFIG_ATTRIB(conf, EGL_RENDERABLE_TYPE, renderable_type);
SET_CONFIG_ATTRIB(conf, EGL_SAMPLE_BUFFERS, m->sampleBuffers);
SET_CONFIG_ATTRIB(conf, EGL_SAMPLES, m->samples);