[Glamor] [PATCH] Fix a missing MakeCurrent in glamor_egl_create_argb8888_based_texture

Axel Davy axel.davy at ens.fr
Tue Mar 4 01:38:55 PST 2014


Signed-off-by: Axel Davy <axel.davy at ens.fr>
---
There is a missing MakeCurrent before creating the texture
and link it to the EGLImage.
Alternatively, we could MakeCurrent before the 
glamor_egl_create_argb8888_based_texture call, but only
the glamor_create_texture_from_image call needs the context
to be current.
 src/glamor_egl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/glamor_egl.c b/src/glamor_egl.c
index ff4c0bd..ffa95a7 100644
--- a/src/glamor_egl.c
+++ b/src/glamor_egl.c
@@ -252,7 +252,9 @@ glamor_egl_create_argb8888_based_texture(ScreenPtr screen,
 	gbm_bo_destroy(bo);
 	if (image == EGL_NO_IMAGE_KHR)
 		return 0;
+	glamor_egl_make_current(screen);
 	glamor_create_texture_from_image(glamor_egl, image, &texture);
+	glamor_egl_restore_context(screen);
 	glamor_egl->egl_destroy_image_khr(glamor_egl->display, image);
 
 	return texture;
-- 
1.8.3.2



More information about the Glamor mailing list