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.
#ifndef _DISPATCH_H
#define _DISPATCH_H
-#ifdef IN_DRI_DRIVER
+#include "main/mfeatures.h"
+
+#if FEATURE_remap_table
#define _GLAPI_USE_REMAP_TABLE
#endif
#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 */
#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