Commit c244969b authored by Zhigang Gong's avatar Zhigang Gong Committed by Eric Anholt

glamor_init: Should set gl_flavor before sub-module intialization.

Signed-off-by: default avatarZhigang Gong <zhigang.gong@linux.intel.com>
parent 62e53653
......@@ -318,6 +318,12 @@ glamor_init(ScreenPtr screen, unsigned int flags)
glamor_set_debug_level(&glamor_debug_level);
#ifdef GLAMOR_GLES2
glamor_priv->gl_flavor = GLAMOR_GL_ES2;
#else
glamor_priv->gl_flavor = GLAMOR_GL_DESKTOP;
#endif
if (flags & GLAMOR_USE_SCREEN) {
if (!RegisterBlockAndWakeupHandlers(_glamor_block_handler,
_glamor_wakeup_handler,
......@@ -390,11 +396,6 @@ glamor_init(ScreenPtr screen, unsigned int flags)
glamor_init_finish_access_shaders(screen);
glamor_pixmap_init(screen);
#ifdef GLAMOR_GLES2
glamor_priv->gl_flavor = GLAMOR_GL_ES2;
#else
glamor_priv->gl_flavor = GLAMOR_GL_DESKTOP;
#endif
glamor_priv->flags = flags;
return TRUE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment