mesa: rename GL dispatch initialization functions to make the intent clear
authorMarek Olšák <marek.olsak@amd.com>
Thu, 11 Aug 2022 08:34:00 +0000 (04:34 -0400)
committerMarge Bot <emma+marge@anholt.net>
Mon, 26 Sep 2022 22:58:16 +0000 (22:58 +0000)
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18828>

src/mapi/glapi/gen/api_exec_init.py
src/mesa/main/context.c
src/mesa/main/context.h
src/mesa/main/dlist.c
src/mesa/main/dlist.h
src/mesa/main/feedback.c
src/mesa/vbo/vbo.h
src/mesa/vbo/vbo_exec_api.c
src/mesa/vbo/vbo_exec_draw.c
src/mesa/vbo/vbo_save_api.c

index b7ad95d..3f86228 100644 (file)
@@ -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;
 
index 42128bf..cbdebb8 100644 (file)
@@ -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);
 }
 
 /**
index 6296217..a2c8a30 100644 (file)
@@ -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);
index efc0c97..0d92edf 100644 (file)
@@ -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);
index 98de831..8af3b81 100644 (file)
@@ -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,
index f06e58a..262bf98 100644 (file)
@@ -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) {
index bc5510f..d9f8058 100644 (file)
@@ -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);
index 421a7f9..5a8ea8a 100644 (file)
@@ -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));
index d149985..ddde730 100644 (file)
@@ -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);
       }
    }
 
index 8469fc8..6379bcb 100644 (file)
@@ -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);