From 4f78b2f8058113ddba0bfaf9e94c7da51bf844b9 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Fri, 18 Jun 2021 15:10:38 +0200 Subject: [PATCH] dlist: remove _mesa_dlist_alloc_aligned MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit It was only used in _mesa_dlist_alloc_vertex_list, so inline it there instead. Reviewed-by: Marek Olšák Part-of: --- src/mesa/main/dlist.c | 22 ++++++---------------- src/mesa/main/dlist.h | 3 --- 2 files changed, 6 insertions(+), 19 deletions(-) diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index 4fcb2d9..291018c 100644 --- a/src/mesa/main/dlist.c +++ b/src/mesa/main/dlist.c @@ -1640,14 +1640,14 @@ _mesa_dlist_alloc(struct gl_context *ctx, GLuint opcode, GLuint bytes) } -/** - * Same as _mesa_dlist_alloc(), but return a pointer which is 8-byte - * aligned in 64-bit environments, 4-byte aligned otherwise. - */ void * -_mesa_dlist_alloc_aligned(struct gl_context *ctx, GLuint opcode, GLuint bytes) +_mesa_dlist_alloc_vertex_list(struct gl_context *ctx, bool copy_to_current) { - Node *n = dlist_alloc(ctx, (OpCode) opcode, bytes, true); + Node *n = dlist_alloc(ctx, + copy_to_current ? OPCODE_VERTEX_LIST_COPY_CURRENT : + OPCODE_VERTEX_LIST, + sizeof(struct vbo_save_vertex_list), + true); if (n) return n + 1; /* return pointer to payload area, after opcode */ else @@ -1655,16 +1655,6 @@ _mesa_dlist_alloc_aligned(struct gl_context *ctx, GLuint opcode, GLuint bytes) } -void * -_mesa_dlist_alloc_vertex_list(struct gl_context *ctx, bool copy_to_current) -{ - return _mesa_dlist_alloc_aligned(ctx, - copy_to_current ? OPCODE_VERTEX_LIST_COPY_CURRENT : - OPCODE_VERTEX_LIST, - sizeof(struct vbo_save_vertex_list)); -} - - /** * Allocate space for a display list instruction. The space is basically * an array of Nodes where node[0] holds the opcode, node[1] is the first diff --git a/src/mesa/main/dlist.h b/src/mesa/main/dlist.h index 1b7d973..c84e9bb 100644 --- a/src/mesa/main/dlist.h +++ b/src/mesa/main/dlist.h @@ -109,9 +109,6 @@ void * _mesa_dlist_alloc(struct gl_context *ctx, GLuint opcode, GLuint sz); void * -_mesa_dlist_alloc_aligned(struct gl_context *ctx, GLuint opcode, GLuint bytes); - -void * _mesa_dlist_alloc_vertex_list(struct gl_context *ctx, bool copy_to_current); -- 2.7.4