* 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;
* \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++;
* 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)
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);
* 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;
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;