If you insert printf there, you'll know why glthread was disabled.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
out('if ({0}) {{'.format(func.marshal_fail))
with indent():
out('_mesa_glthread_finish(ctx);')
- out('_mesa_glthread_restore_dispatch(ctx);')
+ out('_mesa_glthread_restore_dispatch(ctx, __func__);')
self.print_sync_dispatch(func)
out('return;')
out('}')
free(glthread);
ctx->GLThread = NULL;
- _mesa_glthread_restore_dispatch(ctx);
+ _mesa_glthread_restore_dispatch(ctx, "destroy");
}
void
-_mesa_glthread_restore_dispatch(struct gl_context *ctx)
+_mesa_glthread_restore_dispatch(struct gl_context *ctx, const char *func)
{
/* Remove ourselves from the dispatch table except if another ctx/thread
* already installed a new dispatch table.
if (_glapi_get_dispatch() == ctx->MarshalExec) {
ctx->CurrentClientDispatch = ctx->CurrentServerDispatch;
_glapi_set_dispatch(ctx->CurrentClientDispatch);
+#if 0
+ printf("glthread disabled: %s\n", func);
+#endif
}
}
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_restore_dispatch(struct gl_context *ctx, const char *func);
void _mesa_glthread_flush_batch(struct gl_context *ctx);
void _mesa_glthread_finish(struct gl_context *ctx);
if (cap == GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB) {
_mesa_glthread_finish(ctx);
- _mesa_glthread_restore_dispatch(ctx);
+ _mesa_glthread_restore_dispatch(ctx, "Enable(DEBUG_OUTPUT_SYNCHRONOUS)");
} else {
cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Enable,
sizeof(*cmd));