From: Marek Olšák Date: Thu, 11 Aug 2022 08:34:00 +0000 (-0400) Subject: mesa: rename GL dispatch initialization functions to make the intent clear X-Git-Tag: upstream/22.3.5~2314 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b7ba29cbf67c1db93e203a82a71bc264447463cd;p=platform%2Fupstream%2Fmesa.git mesa: rename GL dispatch initialization functions to make the intent clear Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- diff --git a/src/mapi/glapi/gen/api_exec_init.py b/src/mapi/glapi/gen/api_exec_init.py index b7ad95d..3f86228 100644 --- a/src/mapi/glapi/gen/api_exec_init.py +++ b/src/mapi/glapi/gen/api_exec_init.py @@ -21,7 +21,7 @@ # IN THE SOFTWARE. # This script generates the file api_exec_init.c, which contains -# _mesa_initialize_exec_table(). It is responsible for populating all +# _mesa_init_dispatch(). It is responsible for populating all # entries in the "OutsideBeginEnd" dispatch table. import argparse @@ -61,7 +61,7 @@ header = """/** * \param ctx GL context */ void -_mesa_initialize_exec_table(struct gl_context *ctx) +_mesa_init_dispatch(struct gl_context *ctx) { struct _glapi_table *table = ctx->OutsideBeginEnd; diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 42128bf..cbdebb8 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -928,14 +928,14 @@ void _mesa_initialize_dispatch_tables(struct gl_context *ctx) { /* Do the code-generated setup of the exec table in api_exec_init.c. */ - _mesa_initialize_exec_table(ctx); + _mesa_init_dispatch(ctx); if (ctx->Save) - _mesa_initialize_save_table(ctx); + _mesa_init_dispatch_save(ctx); - vbo_install_exec_vtxfmt(ctx); + vbo_init_dispatch_begin_end(ctx); if (ctx->API == API_OPENGL_COMPAT) - _mesa_install_save_vtxfmt(ctx); + _mesa_init_dispatch_save_begin_end(ctx); } /** diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h index 6296217..a2c8a30 100644 --- a/src/mesa/main/context.h +++ b/src/mesa/main/context.h @@ -82,7 +82,7 @@ extern struct _glapi_table * _mesa_alloc_dispatch_table(bool glthread); extern void -_mesa_initialize_exec_table(struct gl_context *ctx); +_mesa_init_dispatch(struct gl_context *ctx); extern void _mesa_initialize_dispatch_tables(struct gl_context *ctx); diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index efc0c97..0d92edf 100644 --- a/src/mesa/main/dlist.c +++ b/src/mesa/main/dlist.c @@ -13602,7 +13602,7 @@ _mesa_ListBase(GLuint base) * building functions. */ void -_mesa_initialize_save_table(const struct gl_context *ctx) +_mesa_init_dispatch_save(const struct gl_context *ctx) { struct _glapi_table *table = ctx->Save; int numEntries = MAX2(_gloffset_COUNT, _glapi_get_dispatch_table_size()); @@ -14090,7 +14090,7 @@ _mesa_init_display_list(struct gl_context *ctx) void -_mesa_install_save_vtxfmt(struct gl_context *ctx) +_mesa_init_dispatch_save_begin_end(struct gl_context *ctx) { struct _glapi_table *tab = ctx->Save; assert(ctx->API == API_OPENGL_COMPAT); diff --git a/src/mesa/main/dlist.h b/src/mesa/main/dlist.h index 98de831..8af3b81 100644 --- a/src/mesa/main/dlist.h +++ b/src/mesa/main/dlist.h @@ -83,13 +83,13 @@ void _mesa_delete_list(struct gl_context *ctx, struct gl_display_list *dlist); void -_mesa_initialize_save_table(const struct gl_context *); +_mesa_init_dispatch_save(const struct gl_context *); void _mesa_init_display_list(struct gl_context * ctx); void -_mesa_install_save_vtxfmt(struct gl_context *ctx); +_mesa_init_dispatch_save_begin_end(struct gl_context *ctx); bool _mesa_get_list(struct gl_context *ctx, GLuint list, diff --git a/src/mesa/main/feedback.c b/src/mesa/main/feedback.c index f06e58a..262bf98 100644 --- a/src/mesa/main/feedback.c +++ b/src/mesa/main/feedback.c @@ -237,7 +237,7 @@ alloc_select_resource(struct gl_context *ctx) _mesa_error(ctx, GL_OUT_OF_MEMORY, "Cannot allocate HWSelectModeBeginEnd"); return; } - vbo_install_hw_select_begin_end(ctx); + vbo_init_dispatch_hw_select_begin_end(ctx); } if (!s->SaveBuffer) { diff --git a/src/mesa/vbo/vbo.h b/src/mesa/vbo/vbo.h index bc5510f..d9f8058 100644 --- a/src/mesa/vbo/vbo.h +++ b/src/mesa/vbo/vbo.h @@ -188,10 +188,10 @@ void _vbo_DestroyContext(struct gl_context *ctx); void -vbo_install_exec_vtxfmt(struct gl_context *ctx); +vbo_init_dispatch_begin_end(struct gl_context *ctx); void -vbo_install_hw_select_begin_end(struct gl_context *ctx); +vbo_init_dispatch_hw_select_begin_end(struct gl_context *ctx); void vbo_install_exec_vtxfmt_noop(struct gl_context *ctx); diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c index 421a7f9..5a8ea8a 100644 --- a/src/mesa/vbo/vbo_exec_api.c +++ b/src/mesa/vbo/vbo_exec_api.c @@ -1069,7 +1069,7 @@ _es_VertexAttrib4fvARB(GLuint indx, const GLfloat* values) void -vbo_install_exec_vtxfmt(struct gl_context *ctx) +vbo_init_dispatch_begin_end(struct gl_context *ctx) { #define NAME_AE(x) _mesa_##x #define NAME_CALLLIST(x) _mesa_##x @@ -1243,7 +1243,7 @@ _es_Materialf(GLenum face, GLenum pname, GLfloat param) #include "vbo_attrib_tmp.h" void -vbo_install_hw_select_begin_end(struct gl_context *ctx) +vbo_init_dispatch_hw_select_begin_end(struct gl_context *ctx) { int numEntries = MAX2(_gloffset_COUNT, _glapi_get_dispatch_table_size()); memcpy(ctx->HWSelectModeBeginEnd, ctx->BeginEnd, numEntries * sizeof(_glapi_proc)); diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c index d149985..ddde730 100644 --- a/src/mesa/vbo/vbo_exec_draw.c +++ b/src/mesa/vbo/vbo_exec_draw.c @@ -285,7 +285,7 @@ vbo_exec_vtx_map(struct vbo_exec_context *exec) * functions. We do this test just to avoid frequent and needless * calls to vbo_install_exec_vtxfmt(). */ - vbo_install_exec_vtxfmt(ctx); + vbo_init_dispatch_begin_end(ctx); } } diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c index 8469fc8..6379bcb 100644 --- a/src/mesa/vbo/vbo_save_api.c +++ b/src/mesa/vbo/vbo_save_api.c @@ -1408,7 +1408,7 @@ _save_Materialfv(GLenum face, GLenum pname, const GLfloat *params) static void -vbo_install_save_vtxfmt(struct gl_context *ctx); +vbo_init_dispatch_save_begin_end(struct gl_context *ctx); /* Cope with EvalCoord/CallList called within a begin/end object: @@ -1445,7 +1445,7 @@ dlist_fallback(struct gl_context *ctx) vbo_install_save_vtxfmt_noop(ctx); } else { - _mesa_install_save_vtxfmt(ctx); + _mesa_init_dispatch_save_begin_end(ctx); } ctx->Driver.SaveNeedFlush = GL_FALSE; } @@ -1541,7 +1541,7 @@ vbo_save_NotifyBegin(struct gl_context *ctx, GLenum mode, save->no_current_update = no_current_update; - vbo_install_save_vtxfmt(ctx); + vbo_init_dispatch_save_begin_end(ctx); /* We need to call vbo_save_SaveFlushVertices() if there's state change */ ctx->Driver.SaveNeedFlush = GL_TRUE; @@ -1567,7 +1567,7 @@ _save_End(void) vbo_install_save_vtxfmt_noop(ctx); } else { - _mesa_install_save_vtxfmt(ctx); + _mesa_init_dispatch_save_begin_end(ctx); } } @@ -1930,7 +1930,7 @@ save_MultiDrawElementsBaseVertex(GLenum mode, const GLsizei *count, static void -vbo_install_save_vtxfmt(struct gl_context *ctx) +vbo_init_dispatch_save_begin_end(struct gl_context *ctx) { #define NAME_AE(x) _mesa_##x #define NAME_CALLLIST(x) _save_##x @@ -2011,7 +2011,7 @@ vbo_save_EndList(struct gl_context *ctx) * etc. received between here and the next begin will be compiled * as opcodes. */ - _mesa_install_save_vtxfmt(ctx); + _mesa_init_dispatch_save_begin_end(ctx); } assert(save->vertex_size == 0);