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>
This commit is contained in:

committed by
Timothy Arceri

parent
70e715eea6
commit
93bdad3253
@@ -119,6 +119,7 @@ struct glthread_batch
|
||||
void _mesa_glthread_init(struct gl_context *ctx);
|
||||
void _mesa_glthread_destroy(struct gl_context *ctx);
|
||||
|
||||
void _mesa_glthread_restore_dispatch(struct gl_context *ctx);
|
||||
void _mesa_glthread_flush_batch(struct gl_context *ctx);
|
||||
void _mesa_glthread_finish(struct gl_context *ctx);
|
||||
|
||||
@@ -138,5 +139,11 @@ static inline void
|
||||
_mesa_glthread_finish(struct gl_context *ctx)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void
|
||||
_mesa_glthread_restore_dispatch(struct gl_context *ctx);
|
||||
{
|
||||
}
|
||||
|
||||
#endif /* !HAVE_PTHREAD */
|
||||
#endif /* _GLTHREAD_H*/
|
||||
|
Reference in New Issue
Block a user