mesa: Select FEATURE_remap_table when multiple APIs are enabled.
authorChia-I Wu <olv@lunarg.com>
Tue, 26 Oct 2010 08:16:14 +0000 (16:16 +0800)
committerChia-I Wu <olv@lunarg.com>
Tue, 2 Nov 2010 06:17:56 +0000 (14:17 +0800)
Core mesa should query glapi for the positions of the functions in
_glapi_table when multiple APIs are supported.  It does not know which
glapitable.h glapi used.

src/mesa/main/dispatch.h
src/mesa/main/es_generator.py
src/mesa/main/mfeatures.h

index 552384c500c1b2e26328590ec2f8bbc6f058e9cb..a597959cf8e39deb6144c2a5d10d388a30162306 100644 (file)
@@ -26,7 +26,9 @@
 #ifndef _DISPATCH_H
 #define _DISPATCH_H
 
-#ifdef IN_DRI_DRIVER
+#include "main/mfeatures.h"
+
+#if FEATURE_remap_table
 #define _GLAPI_USE_REMAP_TABLE
 #endif
 
index 8f28da16df81d1617b2647241140d9e8c0deea1a..bd25acd07c99757d986aab4c053e6c4400520269 100644 (file)
@@ -212,7 +212,7 @@ extern void _mesa_error(void *ctx, GLenum error, const char *fmtString, ... );
 #include "main/remap.h"
 
 /* cannot include main/dispatch.h here */
-#ifdef IN_DRI_DRIVER
+#if FEATURE_remap_table
 #define _GLAPI_USE_REMAP_TABLE
 #endif
 /* glapi uses GLAPIENTRY while GLES headers define GL_APIENTRY */
index 5afd65d9766a45f3e2dd40ce88cfac5a2c2c4f0c..911b30dda218bf46950a59d5c7655563a6054bb2 100644 (file)
@@ -78,7 +78,7 @@
 #define FEATURE_GL !FEATURE_ES
 #endif
 
-#ifdef IN_DRI_DRIVER
+#if defined(IN_DRI_DRIVER) || (FEATURE_GL + FEATURE_ES1 + FEATURE_ES2 > 1)
 #define FEATURE_remap_table               1
 #else
 #define FEATURE_remap_table               0