mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-19 14:30:39 +02:00
mesa: rename CurrentClientDispatch to GLApi
I like this more. The name self-documents itself. It's always equal to the dispatch set in glapi. GLAPI is a definition, so can't use that. Acked-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21777>
This commit is contained in:
parent
6b22642e21
commit
dae902e11e
6 changed files with 21 additions and 21 deletions
|
|
@ -134,10 +134,10 @@ class PrintGlOffsets(gl_XML.gl_print_base):
|
|||
* #define KEYWORD2
|
||||
* #define NAME(func) gl##func
|
||||
* #define DISPATCH(func, args, msg) \\
|
||||
* struct _glapi_table *dispatch = CurrentClientDispatch; \\
|
||||
* struct _glapi_table *dispatch = GLApi; \\
|
||||
* (*dispatch->func) args
|
||||
* #define RETURN DISPATCH(func, args, msg) \\
|
||||
* struct _glapi_table *dispatch = CurrentClientDispatch; \\
|
||||
* struct _glapi_table *dispatch = GLApi; \\
|
||||
* return (*dispatch->func) args
|
||||
*
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1009,7 +1009,7 @@ _mesa_initialize_context(struct gl_context *ctx,
|
|||
if (!ctx->Dispatch.OutsideBeginEnd)
|
||||
goto fail;
|
||||
ctx->Dispatch.Exec = ctx->Dispatch.OutsideBeginEnd;
|
||||
ctx->CurrentClientDispatch = ctx->Dispatch.Current = ctx->Dispatch.OutsideBeginEnd;
|
||||
ctx->GLApi = ctx->Dispatch.Current = ctx->Dispatch.OutsideBeginEnd;
|
||||
|
||||
_mesa_reset_vertex_processing_mode(ctx);
|
||||
|
||||
|
|
@ -1482,7 +1482,7 @@ _mesa_make_current( struct gl_context *newCtx,
|
|||
else {
|
||||
_glapi_set_context((void *) newCtx);
|
||||
assert(_mesa_get_current_context() == newCtx);
|
||||
_glapi_set_dispatch(newCtx->CurrentClientDispatch);
|
||||
_glapi_set_dispatch(newCtx->GLApi);
|
||||
|
||||
if (drawBuffer && readBuffer) {
|
||||
assert(_mesa_is_winsys_fbo(drawBuffer));
|
||||
|
|
|
|||
|
|
@ -13203,7 +13203,7 @@ _mesa_NewList(GLuint name, GLenum mode)
|
|||
ctx->Dispatch.Current = ctx->Dispatch.Save;
|
||||
_glapi_set_dispatch(ctx->Dispatch.Current);
|
||||
if (!ctx->GLThread.enabled) {
|
||||
ctx->CurrentClientDispatch = ctx->Dispatch.Current;
|
||||
ctx->GLApi = ctx->Dispatch.Current;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -13415,7 +13415,7 @@ _mesa_EndList(void)
|
|||
ctx->Dispatch.Current = ctx->Dispatch.Exec;
|
||||
_glapi_set_dispatch(ctx->Dispatch.Current);
|
||||
if (!ctx->GLThread.enabled) {
|
||||
ctx->CurrentClientDispatch = ctx->Dispatch.Current;
|
||||
ctx->GLApi = ctx->Dispatch.Current;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -13456,7 +13456,7 @@ _mesa_CallList(GLuint list)
|
|||
if (save_compile_flag) {
|
||||
ctx->Dispatch.Current = ctx->Dispatch.Save;
|
||||
if (!ctx->GLThread.enabled) {
|
||||
ctx->CurrentClientDispatch = ctx->Dispatch.Current;
|
||||
ctx->GLApi = ctx->Dispatch.Current;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -13579,7 +13579,7 @@ _mesa_CallLists(GLsizei n, GLenum type, const GLvoid * lists)
|
|||
if (save_compile_flag) {
|
||||
ctx->Dispatch.Current = ctx->Dispatch.Save;
|
||||
if (!ctx->GLThread.enabled) {
|
||||
ctx->CurrentClientDispatch = ctx->Dispatch.Current;
|
||||
ctx->GLApi = ctx->Dispatch.Current;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -254,11 +254,11 @@ void _mesa_glthread_enable(struct gl_context *ctx)
|
|||
return;
|
||||
|
||||
ctx->GLThread.enabled = true;
|
||||
ctx->CurrentClientDispatch = ctx->MarshalExec;
|
||||
ctx->GLApi = ctx->MarshalExec;
|
||||
|
||||
/* Update the dispatch only if the dispatch is current. */
|
||||
if (_glapi_get_dispatch() == ctx->Dispatch.Current) {
|
||||
_glapi_set_dispatch(ctx->CurrentClientDispatch);
|
||||
_glapi_set_dispatch(ctx->GLApi);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -270,11 +270,11 @@ void _mesa_glthread_disable(struct gl_context *ctx)
|
|||
_mesa_glthread_finish(ctx);
|
||||
|
||||
ctx->GLThread.enabled = false;
|
||||
ctx->CurrentClientDispatch = ctx->Dispatch.Current;
|
||||
ctx->GLApi = ctx->Dispatch.Current;
|
||||
|
||||
/* Update the dispatch only if the dispatch is current. */
|
||||
if (_glapi_get_dispatch() == ctx->MarshalExec) {
|
||||
_glapi_set_dispatch(ctx->CurrentClientDispatch);
|
||||
_glapi_set_dispatch(ctx->GLApi);
|
||||
}
|
||||
|
||||
/* Unbind VBOs in all VAOs that glthread bound for non-VBO vertex uploads
|
||||
|
|
|
|||
|
|
@ -3301,7 +3301,7 @@ struct gl_context
|
|||
* program. If API calls are being marshalled to another thread, this ==
|
||||
* MarshalExec. Otherwise it == Dispatch.Current.
|
||||
*/
|
||||
struct _glapi_table *CurrentClientDispatch;
|
||||
struct _glapi_table *GLApi;
|
||||
|
||||
/*@}*/
|
||||
|
||||
|
|
|
|||
|
|
@ -860,11 +860,11 @@ _mesa_Begin(GLenum mode)
|
|||
if (ctx->GLThread.enabled) {
|
||||
if (ctx->Dispatch.Current == ctx->Dispatch.OutsideBeginEnd)
|
||||
ctx->Dispatch.Current = ctx->Dispatch.Exec;
|
||||
} else if (ctx->CurrentClientDispatch == ctx->Dispatch.OutsideBeginEnd) {
|
||||
ctx->CurrentClientDispatch = ctx->Dispatch.Current = ctx->Dispatch.Exec;
|
||||
_glapi_set_dispatch(ctx->CurrentClientDispatch);
|
||||
} else if (ctx->GLApi == ctx->Dispatch.OutsideBeginEnd) {
|
||||
ctx->GLApi = ctx->Dispatch.Current = ctx->Dispatch.Exec;
|
||||
_glapi_set_dispatch(ctx->GLApi);
|
||||
} else {
|
||||
assert(ctx->CurrentClientDispatch == ctx->Dispatch.Save);
|
||||
assert(ctx->GLApi == ctx->Dispatch.Save);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -922,10 +922,10 @@ _mesa_End(void)
|
|||
ctx->Dispatch.Current == ctx->Dispatch.HWSelectModeBeginEnd) {
|
||||
ctx->Dispatch.Current = ctx->Dispatch.Exec;
|
||||
}
|
||||
} else if (ctx->CurrentClientDispatch == ctx->Dispatch.BeginEnd ||
|
||||
ctx->CurrentClientDispatch == ctx->Dispatch.HWSelectModeBeginEnd) {
|
||||
ctx->CurrentClientDispatch = ctx->Dispatch.Current = ctx->Dispatch.Exec;
|
||||
_glapi_set_dispatch(ctx->CurrentClientDispatch);
|
||||
} else if (ctx->GLApi == ctx->Dispatch.BeginEnd ||
|
||||
ctx->GLApi == ctx->Dispatch.HWSelectModeBeginEnd) {
|
||||
ctx->GLApi = ctx->Dispatch.Current = ctx->Dispatch.Exec;
|
||||
_glapi_set_dispatch(ctx->GLApi);
|
||||
}
|
||||
|
||||
if (exec->vtx.prim_count > 0) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue