diff options
author | Eric Anholt <eric@anholt.net> | 2014-04-04 07:03:31 +0100 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2014-04-09 11:29:11 -0700 |
commit | b5240f12d39a4bbf0dcefb021baa622b475e7e28 (patch) | |
tree | d5238a61437e1a0ad569448bd2f38ecd3000b257 | |
parent | 22317d6aafaf1fd4fe731f664b0c067b799a07ba (diff) |
glamor: Explain the weird EGL_NO_CONTEXT code.
Signed-off-by: Eric Anholt <eric@anholt.net>
-rw-r--r-- | glamor/glamor_egl.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/glamor/glamor_egl.c b/glamor/glamor_egl.c index f8dafe8ed..04436deab 100644 --- a/glamor/glamor_egl.c +++ b/glamor/glamor_egl.c @@ -97,8 +97,15 @@ glamor_egl_get_screen_private(ScrnInfoPtr scrn) static void glamor_egl_make_current(struct glamor_context *glamor_ctx) { + /* There's only a single global dispatch table in Mesa. EGL, GLX, + * and AIGLX's direct dispatch table manipulation don't talk to + * each other. We need to set the context to NULL first to avoid + * EGL's no-op context change fast path when switching back to + * EGL. + */ eglMakeCurrent(glamor_ctx->display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + if (!eglMakeCurrent(glamor_ctx->display, EGL_NO_SURFACE, EGL_NO_SURFACE, glamor_ctx->ctx)) { |