mesa/glthread: restore the dispatch table when incompatible gl calls are detected
authorGregory Hainaut <gregory.hainaut@gmail.com>
Sun, 12 Feb 2017 14:21:47 +0000 (15:21 +0100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Thu, 16 Mar 2017 03:14:19 +0000 (14:14 +1100)
commit93bdad3253cfa353cadf4444711c70f39e9baf09
tree5cc6ae9e3bf0b7df89f61d5b0eda3a97da8b1352
parent70e715eea618f31a1b84a99b063c371af3513754
mesa/glthread: restore the dispatch table when incompatible gl calls are detected

While a context only has a single glthread, the context itself can be
attached to several threads. Therefore the dispatch table must be
updated in all threads before the destruction of glthread. In others
words, glthread can only be destroyed safely when the context is deleted.

Fixes remaining crashes in the glx-multithread-makecurrent* tests.

V2: (Timothy Arceri) updated gl_API.dtd marshal_fail description.

Signed-off-by: Gregory Hainaut <gregory.hainaut@gmail.com>
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Acked-by: Marek Olšák <maraeo@gmail.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Tested-by: Mike Lothian <mike@fireburn.co.uk>
src/mapi/glapi/gen/gl_API.dtd
src/mapi/glapi/gen/gl_marshal.py
src/mesa/main/glthread.c
src/mesa/main/glthread.h