summaryrefslogtreecommitdiff
path: root/glamor
diff options
context:
space:
mode:
authorEmil Velikov <emil.l.velikov@gmail.com>2015-09-25 14:04:34 +0100
committerAdam Jackson <ajax@redhat.com>2015-09-29 10:21:39 -0400
commit19a87257f92e7f57a167fc03fba014ee22d8e1ab (patch)
tree08a16af7722d55cf6a448ef86251565b345e18b5 /glamor
parentdca5770af9e20bb1148374ebfd60931a81b148a2 (diff)
glamor: move 'dri3_capable' extension checks after eglMakeCurrent
Otherwise we'll fail and/or crash as no context is bound. Fixes: 64e6124f27e (glamor: move GL_OES_EGL_image check next to EGL_EXT_image_dma_buf_import) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92105 Cc: Michel Dänzer <michel@daenzer.net> Cc: Nick Sarnie <commendsarnex@gmail.com> Reported-by: Nick Sarnie <commendsarnex@gmail.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Tested-by: Nick Sarnie <commendsarnex@gmail.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Diffstat (limited to 'glamor')
-rw-r--r--glamor/glamor_egl.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/glamor/glamor_egl.c b/glamor/glamor_egl.c
index dcff443a9..2e6c7bdbc 100644
--- a/glamor/glamor_egl.c
+++ b/glamor/glamor_egl.c
@@ -866,15 +866,6 @@ glamor_egl_init(ScrnInfoPtr scrn, int fd)
KHR_surfaceless_opengl);
#endif
-#ifdef GLAMOR_HAS_GBM
- if (epoxy_has_egl_extension(glamor_egl->display,
- "EGL_KHR_gl_texture_2D_image") &&
- epoxy_has_egl_extension(glamor_egl->display,
- "EGL_EXT_image_dma_buf_import") &&
- epoxy_has_gl_extension("GL_OES_EGL_image"))
- glamor_egl->dri3_capable = TRUE;
-#endif
-
glamor_egl->context = eglCreateContext(glamor_egl->display,
NULL, EGL_NO_CONTEXT,
config_attribs);
@@ -889,6 +880,15 @@ glamor_egl_init(ScrnInfoPtr scrn, int fd)
"Failed to make EGL context current\n");
goto error;
}
+#ifdef GLAMOR_HAS_GBM
+ if (epoxy_has_egl_extension(glamor_egl->display,
+ "EGL_KHR_gl_texture_2D_image") &&
+ epoxy_has_egl_extension(glamor_egl->display,
+ "EGL_EXT_image_dma_buf_import") &&
+ epoxy_has_gl_extension("GL_OES_EGL_image"))
+ glamor_egl->dri3_capable = TRUE;
+#endif
+
glamor_egl->saved_free_screen = scrn->FreeScreen;
scrn->FreeScreen = glamor_egl_free_screen;
#ifdef GLAMOR_GLES2