mesa/glthread: pass the function name to _mesa_glthread_restore_dispatch
If you insert printf there, you'll know why glthread was disabled. Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
This commit is contained in:
@@ -249,7 +249,7 @@ class PrintCode(gl_XML.gl_print_base):
|
||||
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('}')
|
||||
|
@@ -121,11 +121,11 @@ _mesa_glthread_destroy(struct gl_context *ctx)
|
||||
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.
|
||||
@@ -136,6 +136,9 @@ _mesa_glthread_restore_dispatch(struct gl_context *ctx)
|
||||
if (_glapi_get_dispatch() == ctx->MarshalExec) {
|
||||
ctx->CurrentClientDispatch = ctx->CurrentServerDispatch;
|
||||
_glapi_set_dispatch(ctx->CurrentClientDispatch);
|
||||
#if 0
|
||||
printf("glthread disabled: %s\n", func);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -99,7 +99,7 @@ struct glthread_state
|
||||
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);
|
||||
|
||||
|
@@ -89,7 +89,7 @@ _mesa_marshal_Enable(GLenum cap)
|
||||
|
||||
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));
|
||||
|
Reference in New Issue
Block a user