summaryrefslogtreecommitdiffstats
path: root/src/mesa/glapi/glapi.c
diff options
context:
space:
mode:
authorGeorge Sapountzis <[email protected]>2010-03-02 03:31:16 +0200
committerGeorge Sapountzis <[email protected]>2010-03-02 03:32:43 +0200
commitd3f24ab33c284325abaf4b250f8928d4d53836e1 (patch)
tree41a8d5666b9bd7ddc64a2c67bfb8444b8f4167d3 /src/mesa/glapi/glapi.c
parent6e48f17a1620dda83e0fedd68a8f004ed1fbfea9 (diff)
glapi: fix compile with ES
Diffstat (limited to 'src/mesa/glapi/glapi.c')
-rw-r--r--src/mesa/glapi/glapi.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/glapi/glapi.c b/src/mesa/glapi/glapi.c
index fcb30895aad..13de594aafb 100644
--- a/src/mesa/glapi/glapi.c
+++ b/src/mesa/glapi/glapi.c
@@ -256,7 +256,7 @@ _glapi_set_dispatch(struct _glapi_table *dispatch)
/* use the no-op functions */
dispatch = (struct _glapi_table *) __glapi_noop_table;
}
-#if 0 /* enable this for extra DEBUG */
+#ifdef DEBUG
else {
_glapi_check_table_not_null(dispatch);
_glapi_check_table(dispatch);
@@ -322,10 +322,14 @@ _glapi_get_dispatch_table_size(void)
void
_glapi_check_table_not_null(const struct _glapi_table *table)
{
+#if 0 /* enable this for extra DEBUG */
const GLuint entries = _glapi_get_dispatch_table_size();
const void **tab = (const void **) table;
GLuint i;
for (i = 1; i < entries; i++) {
assert(tab[i]);
}
+#else
+ (void) table;
+#endif
}