Mesa (master): egl: setup screen iterator before using it
Tapani Pälli
tpalli at kemper.freedesktop.org
Mon Sep 29 12:13:03 UTC 2014
Module: Mesa
Branch: master
Commit: 3386e95994ec77248f71dedf49f996e2078f8cea
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3386e95994ec77248f71dedf49f996e2078f8cea
Author: Tapani Pälli <tapani.palli at intel.com>
Date: Mon Sep 29 15:02:57 2014 +0300
egl: setup screen iterator before using it
commit 4ed23fd broke creation of pbuffer surfaces, patch fixes
the failure, noticed when running chrome with '--use-gl=egl'.
Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
---
src/egl/drivers/dri2/platform_x11.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dri2/platform_x11.c
index 316ac18..f8c4b70 100644
--- a/src/egl/drivers/dri2/platform_x11.c
+++ b/src/egl/drivers/dri2/platform_x11.c
@@ -223,6 +223,7 @@ dri2_x11_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
dri2_surf->region = XCB_NONE;
if (type == EGL_PBUFFER_BIT) {
+ s = xcb_setup_roots_iterator(xcb_get_setup(dri2_dpy->conn));
screen = get_xcb_screen(s, dri2_dpy->screen);
if (!screen) {
_eglError(EGL_BAD_NATIVE_WINDOW, "dri2_create_surface");
@@ -230,7 +231,6 @@ dri2_x11_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
}
dri2_surf->drawable = xcb_generate_id(dri2_dpy->conn);
- s = xcb_setup_roots_iterator(xcb_get_setup(dri2_dpy->conn));
xcb_create_pixmap(dri2_dpy->conn, conf->BufferSize,
dri2_surf->drawable, screen->root,
dri2_surf->base.Width, dri2_surf->base.Height);
More information about the mesa-commit
mailing list