Mesa (master): mesa: rename display list functions

Brian Paul brianp at kemper.freedesktop.org
Wed Oct 7 22:57:20 UTC 2009


Module: Mesa
Branch: master
Commit: 6e1697bee72a95f7d605e42ce60e2cb4a545106f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6e1697bee72a95f7d605e42ce60e2cb4a545106f

Author: Brian Paul <brianp at vmware.com>
Date:   Wed Oct  7 16:03:04 2009 -0600

mesa: rename display list functions

_mesa_alloc_instruction() sounded like it was related to vertex/fragment
program instructions, but it wasn't.

---

 src/mesa/main/dlist.c       |   14 +++++++-------
 src/mesa/main/dlist.h       |   10 +++++-----
 src/mesa/vbo/vbo_save_api.c |   12 ++++++------
 3 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index 95c1b90..b886bd0 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -796,7 +796,7 @@ unpack_image(GLcontext *ctx, GLuint dimensions,
  *         opcode).
  */
 void *
-_mesa_alloc_instruction(GLcontext *ctx, GLuint opcode, GLuint bytes)
+_mesa_dlist_alloc(GLcontext *ctx, GLuint opcode, GLuint bytes)
 {
    const GLuint numNodes = 1 + (bytes + sizeof(Node) - 1) / sizeof(Node);
    Node *n;
@@ -847,11 +847,11 @@ _mesa_alloc_instruction(GLcontext *ctx, GLuint opcode, GLuint bytes)
  * \return  the new opcode number or -1 if error
  */
 GLint
-_mesa_alloc_opcode(GLcontext *ctx,
-                   GLuint size,
-                   void (*execute) (GLcontext *, void *),
-                   void (*destroy) (GLcontext *, void *),
-                   void (*print) (GLcontext *, void *))
+_mesa_dlist_alloc_opcode(GLcontext *ctx,
+                         GLuint size,
+                         void (*execute) (GLcontext *, void *),
+                         void (*destroy) (GLcontext *, void *),
+                         void (*print) (GLcontext *, void *))
 {
    if (ctx->ListExt.NumOpcodes < MAX_DLIST_EXT_OPCODES) {
       const GLuint i = ctx->ListExt.NumOpcodes++;
@@ -875,7 +875,7 @@ _mesa_alloc_opcode(GLcontext *ctx,
  *     usable data area.
  */
 #define ALLOC_INSTRUCTION(CTX, OPCODE, NPARAMS) \
-    ((Node *)_mesa_alloc_instruction(CTX, OPCODE, (NPARAMS)*sizeof(Node)) - 1)
+    ((Node *)_mesa_dlist_alloc(CTX, OPCODE, (NPARAMS)*sizeof(Node)) - 1)
 
 
 
diff --git a/src/mesa/main/dlist.h b/src/mesa/main/dlist.h
index af36991..589cbc5 100644
--- a/src/mesa/main/dlist.h
+++ b/src/mesa/main/dlist.h
@@ -61,12 +61,12 @@ extern void GLAPIENTRY _mesa_CallLists( GLsizei n, GLenum type, const GLvoid *li
 
 extern void _mesa_compile_error( GLcontext *ctx, GLenum error, const char *s );
 
-extern void *_mesa_alloc_instruction(GLcontext *ctx, GLuint opcode, GLuint sz);
+extern void *_mesa_dlist_alloc(GLcontext *ctx, GLuint opcode, GLuint sz);
 
-extern GLint _mesa_alloc_opcode( GLcontext *ctx, GLuint sz,
-                                 void (*execute)( GLcontext *, void * ),
-                                 void (*destroy)( GLcontext *, void * ),
-                                 void (*print)( GLcontext *, void * ) );
+extern GLint _mesa_dlist_alloc_opcode( GLcontext *ctx, GLuint sz,
+                                       void (*execute)( GLcontext *, void * ),
+                                       void (*destroy)( GLcontext *, void * ),
+                                       void (*print)( GLcontext *, void * ) );
 
 extern void _mesa_delete_list(GLcontext *ctx, struct gl_display_list *dlist);
 
diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c
index 4da248e..3f86c68 100644
--- a/src/mesa/vbo/vbo_save_api.c
+++ b/src/mesa/vbo/vbo_save_api.c
@@ -270,7 +270,7 @@ static void _save_compile_vertex_list( GLcontext *ctx )
     * being compiled.
     */
    node = (struct vbo_save_vertex_list *)
-      _mesa_alloc_instruction(ctx, save->opcode_vertex_list, sizeof(*node));
+      _mesa_dlist_alloc(ctx, save->opcode_vertex_list, sizeof(*node));
 
    if (!node)
       return;
@@ -1233,11 +1233,11 @@ void vbo_save_api_init( struct vbo_save_context *save )
    GLuint i;
 
    save->opcode_vertex_list =
-      _mesa_alloc_opcode( ctx,
-			  sizeof(struct vbo_save_vertex_list),
-			  vbo_save_playback_vertex_list,
-			  vbo_destroy_vertex_list,
-			  vbo_print_vertex_list );
+      _mesa_dlist_alloc_opcode( ctx,
+                                sizeof(struct vbo_save_vertex_list),
+                                vbo_save_playback_vertex_list,
+                                vbo_destroy_vertex_list,
+                                vbo_print_vertex_list );
 
    ctx->Driver.NotifySaveBegin = vbo_save_NotifyBegin;
 




More information about the mesa-commit mailing list