glamor: Correct the version check for GLES2.

If we are using GLES2, then the version number should be no
less than 2.0 rather than no less than 1.3 which is for GL
API.
This commit is contained in:
Zhigang Gong 2011-09-22 13:39:01 +08:00
parent 483717484a
commit 937d3bcecf

View File

@ -295,10 +295,17 @@ glamor_init(ScreenPtr screen, unsigned int flags)
gl_version = glamor_gl_get_version();
#ifndef GLAMOR_GLES2
if (gl_version < GLAMOR_GL_VERSION_ENCODE(1,3)) {
ErrorF("Require Opengl 1.3 or latter.\n");
ErrorF("Require OpenGL version 1.3 or latter.\n");
goto fail;
}
#else
if (gl_version < GLAMOR_GL_VERSION_ENCODE(2,0)) {
ErrorF("Require Open GLES2.0 or latter.\n");
goto fail;
}
#endif
glamor_gl_dispatch_init(screen, &glamor_priv->dispatch, gl_version);