If "draw", it will follow the "async" rules except that "indices" are
ignored (since they may come from a VBO).
marshal_fail - an expression that, if it evaluates true, causes glthread
- to finish and tear down before the Mesa implementation is called
- directly. Used to disable glthread for GL compatibility interactions
- that we don't want to track state for.
+ to switch back to the Mesa implementation and call it directly. Used
+ to disable glthread for GL compatibility interactions that we don't
+ want to track state for.
glx:
rop - Opcode value for "render" commands
if func.marshal_fail:
out('if ({0}) {{'.format(func.marshal_fail))
with indent():
- out('_mesa_glthread_destroy(ctx);')
+ out('_mesa_glthread_finish(ctx);')
+ out('_mesa_glthread_restore_dispatch(ctx);')
self.print_sync_dispatch(func)
out('return;')
out('}')
free(glthread);
ctx->GLThread = NULL;
+ _mesa_glthread_restore_dispatch(ctx);
+}
+
+void
+_mesa_glthread_restore_dispatch(struct gl_context *ctx)
+{
/* Remove ourselves from the dispatch table except if another ctx/thread
* already installed a new dispatch table.
*
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);
_mesa_glthread_finish(struct gl_context *ctx)
{
}
+
+static inline void
+_mesa_glthread_restore_dispatch(struct gl_context *ctx);
+{
+}
+
#endif /* !HAVE_PTHREAD */
#endif /* _GLTHREAD_H*/