Mesa (master): mesa: Select FEATURE_remap_table when multiple APIs are enabled.

Chia-I Wu olv at kemper.freedesktop.org
Tue Nov 2 06:57:27 UTC 2010


Module: Mesa
Branch: master
Commit: fdede1efaae32d23caf3b351cc766df12e3c5f8d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=fdede1efaae32d23caf3b351cc766df12e3c5f8d

Author: Chia-I Wu <olv at lunarg.com>
Date:   Tue Oct 26 16:16:14 2010 +0800

mesa: Select FEATURE_remap_table when multiple APIs are enabled.

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      |    4 +++-
 src/mesa/main/es_generator.py |    2 +-
 src/mesa/main/mfeatures.h     |    2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/mesa/main/dispatch.h b/src/mesa/main/dispatch.h
index 552384c..a597959 100644
--- a/src/mesa/main/dispatch.h
+++ b/src/mesa/main/dispatch.h
@@ -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
 
diff --git a/src/mesa/main/es_generator.py b/src/mesa/main/es_generator.py
index 8f28da1..bd25acd 100644
--- a/src/mesa/main/es_generator.py
+++ b/src/mesa/main/es_generator.py
@@ -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 */
diff --git a/src/mesa/main/mfeatures.h b/src/mesa/main/mfeatures.h
index 5afd65d..911b30d 100644
--- a/src/mesa/main/mfeatures.h
+++ b/src/mesa/main/mfeatures.h
@@ -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




More information about the mesa-commit mailing list