aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/marshal.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2020-02-20 18:15:42 -0500
committerMarge Bot <[email protected]>2020-03-06 01:06:14 +0000
commitd510e652d46f471a93eae5a07f7e7508633d1040 (patch)
tree2010df30b5c53d7a9cdeab1321bb290bc0413038 /src/mesa/main/marshal.c
parent4970199d11907833858bbb2700ba313ae12f3a95 (diff)
glthread: add marshal_call_after and remove custom glFlush and glEnable code
Instead of implementing marshalling manually, this XML property allows us to insert additional code into code-generated functions. Reviewed-by: Timothy Arceri <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>
Diffstat (limited to 'src/mesa/main/marshal.c')
-rw-r--r--src/mesa/main/marshal.c68
1 files changed, 0 insertions, 68 deletions
diff --git a/src/mesa/main/marshal.c b/src/mesa/main/marshal.c
index b6001d7dbed..ce9bbf8139f 100644
--- a/src/mesa/main/marshal.c
+++ b/src/mesa/main/marshal.c
@@ -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
{