struct gl_context;
extern struct _glapi_table *
-_mesa_alloc_dispatch_table(int size);
+_mesa_alloc_dispatch_table(void);
extern void
_mesa_initialize_exec_table(struct gl_context *ctx);
* Allocate and initialize a new dispatch table.
*/
struct _glapi_table *
-_mesa_alloc_dispatch_table(int size)
+_mesa_alloc_dispatch_table()
{
/* Find the larger of Mesa's dispatch table and libGL's dispatch table.
* In practice, this'll be the same for stand-alone Mesa. But for DRI
GLint numEntries = MAX2(_glapi_get_dispatch_table_size(), _gloffset_COUNT);
struct _glapi_table *table;
- /* should never happen, but just in case */
- numEntries = MAX2(numEntries, size);
-
table = malloc(numEntries * sizeof(_glapi_proc));
if (table) {
_glapi_proc *entry = (_glapi_proc *) table;
{
struct _glapi_table *table;
- table = _mesa_alloc_dispatch_table(_gloffset_COUNT);
+ table = _mesa_alloc_dispatch_table();
if (!table)
return NULL;
goto fail;
/* setup the API dispatch tables with all nop functions */
- ctx->OutsideBeginEnd = _mesa_alloc_dispatch_table(_gloffset_COUNT);
+ ctx->OutsideBeginEnd = _mesa_alloc_dispatch_table();
if (!ctx->OutsideBeginEnd)
goto fail;
ctx->Exec = ctx->OutsideBeginEnd;