glthread: add marshal_call_after and remove custom glFlush and glEnable code
[mesa.git] / src / mesa / main / marshal.c
index b6001d7dbeddace0b655d4f3a004a44474ee73f1..ce9bbf8139f635d5d19d34c60e68edb74254e539 100644 (file)
@@ -43,74 +43,6 @@ _mesa_post_marshal_hook(struct gl_context *ctx)
       _mesa_glthread_finish(ctx);
 }
 
-struct marshal_cmd_Flush
-{
-   struct marshal_cmd_base cmd_base;
-};
-
-
-void
-_mesa_unmarshal_Flush(struct gl_context *ctx,
-                      const struct marshal_cmd_Flush *cmd)
-{
-   CALL_Flush(ctx->CurrentServerDispatch, ());
-}
-
-
-void GLAPIENTRY
-_mesa_marshal_Flush(void)
-{
-   GET_CURRENT_CONTEXT(ctx);
-   struct marshal_cmd_Flush *cmd =
-      _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Flush,
-                                      sizeof(struct marshal_cmd_Flush));
-   (void) cmd;
-   _mesa_post_marshal_hook(ctx);
-
-   /* Flush() needs to be handled specially.  In addition to telling the
-    * background thread to flush, we need to ensure that our own buffer is
-    * submitted to the background thread so that it will complete in a finite
-    * amount of time.
-    */
-   _mesa_glthread_flush_batch(ctx);
-}
-
-/* Enable: marshalled asynchronously */
-struct marshal_cmd_Enable
-{
-   struct marshal_cmd_base cmd_base;
-   GLenum cap;
-};
-
-void
-_mesa_unmarshal_Enable(struct gl_context *ctx,
-                       const struct marshal_cmd_Enable *cmd)
-{
-   const GLenum cap = cmd->cap;
-   CALL_Enable(ctx->CurrentServerDispatch, (cap));
-}
-
-void GLAPIENTRY
-_mesa_marshal_Enable(GLenum cap)
-{
-   GET_CURRENT_CONTEXT(ctx);
-   struct marshal_cmd_Enable *cmd;
-   debug_print_marshal("Enable");
-
-   if (cap == GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB) {
-      _mesa_glthread_disable(ctx, "Enable(DEBUG_OUTPUT_SYNCHRONOUS)");
-   } else {
-      cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Enable,
-                                            sizeof(*cmd));
-      cmd->cap = cap;
-      _mesa_post_marshal_hook(ctx);
-      return;
-   }
-
-   _mesa_glthread_finish(ctx);
-   debug_print_sync_fallback("Enable");
-   CALL_Enable(ctx->CurrentServerDispatch, (cap));
-}
 
 struct marshal_cmd_ShaderSource
 {