Releasing a surfaceless EGL context doesn't release underlying DRI context.
authorAlexandros Frantzis <Alexandros.Frantzis@canonical.com>
Fri, 24 Oct 2014 10:03:13 +0000 (03:03 -0700)
committerTapani Pälli <tapani.palli@intel.com>
Thu, 6 Nov 2014 11:40:39 +0000 (13:40 +0200)
commitf53b6d0134d9ad66e8ec3d7c09daaba8192834be
treeb5ae4ae2220d56149a5da39e5e47a16dc865b4dd
parentcd745d46ce7ee9adc95c903670dd11cf3443e7a1
Releasing a surfaceless EGL context doesn't release underlying DRI context.

driUnbindContext() checks for valid drawables before calling the driver
unbind function. In case of Surfaceless contexts, the drawables are always
Null and we end up not releasing the underlying DRI context. Moving the
call to the driver function before the drawable validity checks fixes things.

Steps to trigger this bug are following:

   - create surfaceless context and make it current
   - make some other context current
   - {another thread} destroy surfaceless context
   - make another context current

Signed-off-by: Alexandros Frantzis <Alexandros.Frantzis@canonical.com>
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74563
src/mesa/drivers/dri/common/dri_util.c