aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/dlist.c
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2012-10-03 15:39:52 -0700
committerTimothy Arceri <[email protected]>2017-03-16 14:14:18 +1100
commitef30ce97a6bc0a9a6e625df6964e1cdea0ccee4b (patch)
tree79491b67563fa5c631a9675092d10f26dff3ea79 /src/mesa/main/dlist.c
parentd8d81fbc31619f6ecf0a1b5ded22e5576e1d1739 (diff)
mesa: Create pointers for multithread marshalling dispatch table.
This patch splits the context's CurrentDispatch pointer into two pointers, CurrentClientDispatch, and CurrentServerDispatch, so that when doing multithread marshalling, we can distinguish between the dispatch table that's being used by the client (to serialize GL calls into the marshal buffer) and the dispatch table that's being used by the server (to execute the GL calls). Acked-by: Timothy Arceri <[email protected]> Acked-by: Marek Olšák <[email protected]> Tested-by: Dieter Nützel <[email protected]> Tested-by: Mike Lothian <[email protected]>
Diffstat (limited to 'src/mesa/main/dlist.c')
-rw-r--r--src/mesa/main/dlist.c28
1 files changed, 20 insertions, 8 deletions
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index 2976f62a591..7e440549e5b 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -9340,8 +9340,11 @@ _mesa_NewList(GLuint name, GLenum mode)
vbo_save_NewList(ctx, name, mode);
- ctx->CurrentDispatch = ctx->Save;
- _glapi_set_dispatch(ctx->CurrentDispatch);
+ ctx->CurrentServerDispatch = ctx->Save;
+ _glapi_set_dispatch(ctx->CurrentServerDispatch);
+ if (ctx->MarshalExec == NULL) {
+ ctx->CurrentClientDispatch = ctx->CurrentServerDispatch;
+ }
}
@@ -9396,8 +9399,11 @@ _mesa_EndList(void)
ctx->ExecuteFlag = GL_TRUE;
ctx->CompileFlag = GL_FALSE;
- ctx->CurrentDispatch = ctx->Exec;
- _glapi_set_dispatch(ctx->CurrentDispatch);
+ ctx->CurrentServerDispatch = ctx->Exec;
+ _glapi_set_dispatch(ctx->CurrentServerDispatch);
+ if (ctx->MarshalExec == NULL) {
+ ctx->CurrentClientDispatch = ctx->CurrentServerDispatch;
+ }
}
@@ -9432,8 +9438,11 @@ _mesa_CallList(GLuint list)
/* also restore API function pointers to point to "save" versions */
if (save_compile_flag) {
- ctx->CurrentDispatch = ctx->Save;
- _glapi_set_dispatch(ctx->CurrentDispatch);
+ ctx->CurrentServerDispatch = ctx->Save;
+ _glapi_set_dispatch(ctx->CurrentServerDispatch);
+ if (ctx->MarshalExec == NULL) {
+ ctx->CurrentClientDispatch = ctx->CurrentServerDispatch;
+ }
}
}
@@ -9555,8 +9564,11 @@ _mesa_CallLists(GLsizei n, GLenum type, const GLvoid * lists)
/* also restore API function pointers to point to "save" versions */
if (save_compile_flag) {
- ctx->CurrentDispatch = ctx->Save;
- _glapi_set_dispatch(ctx->CurrentDispatch);
+ ctx->CurrentServerDispatch = ctx->Save;
+ _glapi_set_dispatch(ctx->CurrentServerDispatch);
+ if (ctx->MarshalExec == NULL) {
+ ctx->CurrentClientDispatch = ctx->CurrentServerDispatch;
+ }
}
}