summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mesa/main/api_exec.c2
-rw-r--r--src/mesa/main/api_loopback.c1
-rw-r--r--src/mesa/main/context.c3
-rw-r--r--src/mesa/main/dispatch.h1
-rw-r--r--src/mesa/main/dlist.c2
-rw-r--r--src/mesa/main/es_generator.py5
6 files changed, 5 insertions, 9 deletions
diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c
index cd002f6bc2..fc38e19a53 100644
--- a/src/mesa/main/api_exec.c
+++ b/src/mesa/main/api_exec.c
@@ -160,7 +160,7 @@ _mesa_create_exec_table(void)
{
struct _glapi_table *exec;
- exec = _mesa_alloc_dispatch_table(sizeof *exec);
+ exec = _mesa_alloc_dispatch_table(_gloffset_COUNT);
if (exec == NULL)
return NULL;
diff --git a/src/mesa/main/api_loopback.c b/src/mesa/main/api_loopback.c
index d1789069cc..e8da8bfec8 100644
--- a/src/mesa/main/api_loopback.c
+++ b/src/mesa/main/api_loopback.c
@@ -34,7 +34,6 @@
#include "api_loopback.h"
#include "mtypes.h"
#include "glapi/glapi.h"
-#include "glapi/glapitable.h"
#include "glapi/glthread.h"
#include "main/dispatch.h"
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 3e265fb308..957dcfc3cf 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -807,8 +807,7 @@ _mesa_alloc_dispatch_table(int size)
* Mesa we do this to accomodate different versions of libGL and various
* DRI drivers.
*/
- GLint numEntries = MAX2(_glapi_get_dispatch_table_size(),
- size / sizeof(_glapi_proc));
+ GLint numEntries = MAX2(_glapi_get_dispatch_table_size(), size);
struct _glapi_table *table =
(struct _glapi_table *) malloc(numEntries * sizeof(_glapi_proc));
if (table) {
diff --git a/src/mesa/main/dispatch.h b/src/mesa/main/dispatch.h
index bf97b1a874..552384c500 100644
--- a/src/mesa/main/dispatch.h
+++ b/src/mesa/main/dispatch.h
@@ -30,7 +30,6 @@
#define _GLAPI_USE_REMAP_TABLE
#endif
-#include "glapi/glapitable.h"
#include "main/glapidispatch.h"
#endif /* _DISPATCH_H */
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index 46b7721c32..bf2e8a92d8 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -9076,7 +9076,7 @@ _mesa_create_save_table(void)
{
struct _glapi_table *table;
- table = _mesa_alloc_dispatch_table(sizeof *table);
+ table = _mesa_alloc_dispatch_table(_gloffset_COUNT);
if (table == NULL)
return NULL;
diff --git a/src/mesa/main/es_generator.py b/src/mesa/main/es_generator.py
index 4e5d6e5577..8f28da16df 100644
--- a/src/mesa/main/es_generator.py
+++ b/src/mesa/main/es_generator.py
@@ -219,7 +219,6 @@ extern void _mesa_error(void *ctx, GLenum error, const char *fmtString, ... );
#ifndef GLAPIENTRY
#define GLAPIENTRY GL_APIENTRY
#endif
-#include "%sapi/glapi/glapitable.h"
#include "%sapi/main/glapidispatch.h"
#if FEATURE_remap_table
@@ -248,7 +247,7 @@ _mesa_map_static_functions_%s(void)
#endif
typedef void (*_glapi_proc)(void); /* generic function pointer */
-""" % (shortname, shortname, shortname, shortname, shortname);
+""" % (shortname, shortname, shortname, shortname);
# Finally we get to the all-important functions
print """/*************************************************************
@@ -716,7 +715,7 @@ struct _glapi_table *
_mesa_create_exec_table_%s(void)
{
struct _glapi_table *exec;
- exec = _mesa_alloc_dispatch_table(sizeof *exec);
+ exec = _mesa_alloc_dispatch_table(_gloffset_COUNT);
if (exec == NULL)
return NULL;