diff options
author | Eric Anholt <eric@anholt.net> | 2014-04-04 07:03:31 +0100 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2014-04-23 10:32:30 -0700 |
commit | 482b06a95a0a2c9a58bc196eb3dd928d796853df (patch) | |
tree | 27c17d1650a1d2b7c22fe8b50a22b7821ee41c9d /glamor/glamor_egl.c | |
parent | fab0a4a4c9dad2275bb398d09632f4274b5e16f2 (diff) |
glamor: Explain the weird EGL_NO_CONTEXT code.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'glamor/glamor_egl.c')
-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 1755d23c8..54af2753e 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)) { |