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>
This commit is contained in:
parent
437b27494f
commit
5c606c0a89
|
@ -133,6 +133,9 @@ DrawableGone(__GLXdrawable * glxPriv, XID xid)
|
||||||
next = c->next;
|
next = c->next;
|
||||||
if (c->currentClient &&
|
if (c->currentClient &&
|
||||||
(c->drawPriv == glxPriv || c->readPriv == glxPriv)) {
|
(c->drawPriv == glxPriv || c->readPriv == glxPriv)) {
|
||||||
|
/* flush the context */
|
||||||
|
glFlush();
|
||||||
|
c->hasUnflushedCommands = GL_FALSE;
|
||||||
/* just force a re-bind the next time through */
|
/* just force a re-bind the next time through */
|
||||||
(*c->loseCurrent) (c);
|
(*c->loseCurrent) (c);
|
||||||
lastGLContext = NULL;
|
lastGLContext = NULL;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user