summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergii Romantsov <sergii.romantsov@globallogic.com>2019-06-05 14:33:58 +0300
committerDylan Baker <dylan@pnwbakers.com>2019-09-06 08:30:35 -0700
commit0e6ccd180cd91c981bc9be7aa404051e08b0ad4c (patch)
tree189291e7ab465e9f4a93615bf8dcac751a8eb7ee
parent5e72987777ad4f451126a89715976b93bf6aaae2 (diff)
downloadmesa-0e6ccd180cd91c981bc9be7aa404051e08b0ad4c.tar.gz
intel/dri: finish proper glthread
KWin was able to get NULL-context in the call intelUnbindContext. But a call _mesa_glthread_finish is not resistent to such case. Case can be catched with steps: 1. Create both glx and egl contexts 2. Make glx as current 3. Make egl as current 4. Reset glx context 5. Make egl as current Solution adds proper finishing of glthread-context (context will be taken from the requested dri-context for unbinding, but not from the saved current context). Piglit-test: https://gitlab.freedesktop.org/mesa/piglit/merge_requests/87 Cc: 19.1 19.2 <mesa-stable@lists.freedesktop.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110814 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111271 Fixes: dca36d5516d0 (i965: Implement threaded GL support) Signed-off-by: Sergii Romantsov <sergii.romantsov@globallogic.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (cherry picked from commit 1dce75c1839f08cfa78400367019f998c258eff5)
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 571618a9cab..e9bf9b028f1 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -1245,7 +1245,7 @@ intelDestroyContext(__DRIcontext * driContextPriv)
GLboolean
intelUnbindContext(__DRIcontext * driContextPriv)
{
- GET_CURRENT_CONTEXT(ctx);
+ struct gl_context *ctx = driContextPriv->driverPrivate;
_mesa_glthread_finish(ctx);
/* Unset current context and dispath table */