diff options
author | Jon TURNEY <jon.turney@dronecode.org.uk> | 2014-04-18 12:17:05 +0100 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2014-12-05 16:39:47 +0000 |
commit | 5c606c0a89e74fa223a99864be11cc3be60a159b (patch) | |
tree | 502bbbf5653a73a103fd452c895e3e6758497aa3 /glx | |
parent | 437b27494f127854d75e59b4e2aac264e9f913e9 (diff) |
glx: Flush context which is being made non-current due to drawable going away
Some sequences of glean tests fail with GLXBadCurrentWindow when using indirect
rendering, e.g. glean -t 'fpexceptions getString'.
Flush a context which is being made non-current due to the drawable on which is
it is current going away. Waiting until another context is made current is too
late, as the drawable no longer exists.
v2: Rewrite for direct GL dispatch
v3: Inline FlushContext(), doesn't need to be a separate function
e.g. LIBGL_ALWAYS_INDIRECT=1 ./glean -r results -o --quick -t "fpexceptions
getString" fails with a BadContextTag error.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'glx')
-rw-r--r-- | glx/glxext.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/glx/glxext.c b/glx/glxext.c index c2de3cedd..978d27112 100644 --- a/glx/glxext.c +++ b/glx/glxext.c @@ -133,6 +133,9 @@ DrawableGone(__GLXdrawable * glxPriv, XID xid) next = c->next; if (c->currentClient && (c->drawPriv == glxPriv || c->readPriv == glxPriv)) { + /* flush the context */ + glFlush(); + c->hasUnflushedCommands = GL_FALSE; /* just force a re-bind the next time through */ (*c->loseCurrent) (c); lastGLContext = NULL; |