dlist: remove _mesa_dlist_alloc_aligned

It was only used in _mesa_dlist_alloc_vertex_list, so inline it there
instead.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11493>
This commit is contained in:
Pierre-Eric Pelloux-Prayer
2021-06-18 15:10:38 +02:00
committed by Marge Bot
parent b703d7c15f
commit 4f78b2f805
2 changed files with 6 additions and 19 deletions
+6 -16
View File
@@ -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
-3
View File
@@ -108,9 +108,6 @@ _mesa_compile_error(struct gl_context *ctx, GLenum error, const char *s);
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);