aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2009-10-15 18:25:24 +0800
committerBrian Paul <[email protected]>2009-11-05 20:03:57 -0700
commit6678f597e7c9ba784c9af0c86cfc6821558bcaa7 (patch)
tree6993194fdf8559fbc5eebbd03ee0ac5cc50d8284
parent888429360a30090b9ecd17bfd160a88141195235 (diff)
gallium/xlib: Fix missing symbols when GLX_INDIRECT_RENDERING is defined.
When GLX_INDIRECT_RENDERING is defined, some symbols are used in libglapi.a but are not defined. Define them through the help of glapitemp.h. Signed-off-by: Chia-I Wu <[email protected]>
-rw-r--r--src/gallium/winsys/xlib/xlib.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/gallium/winsys/xlib/xlib.c b/src/gallium/winsys/xlib/xlib.c
index 163cc8863cb..bf2fb230eb4 100644
--- a/src/gallium/winsys/xlib/xlib.c
+++ b/src/gallium/winsys/xlib/xlib.c
@@ -112,3 +112,33 @@ extern void (*linker_foo(const unsigned char *procName))()
{
return glXGetProcAddress(procName);
}
+
+
+/**
+ * When GLX_INDIRECT_RENDERING is defined, some symbols are missing in
+ * libglapi.a. We need to define them here.
+ */
+#ifdef GLX_INDIRECT_RENDERING
+
+#define GL_GLEXT_PROTOTYPES
+#include "GL/gl.h"
+#include "glapi/glapi.h"
+#include "glapi/dispatch.h"
+
+#if defined(USE_MGL_NAMESPACE)
+#define NAME(func) mgl##func
+#else
+#define NAME(func) gl##func
+#endif
+
+#define DISPATCH(FUNC, ARGS, MESSAGE) \
+ CALL_ ## FUNC(GET_DISPATCH(), ARGS);
+
+#define RETURN_DISPATCH(FUNC, ARGS, MESSAGE) \
+ return CALL_ ## FUNC(GET_DISPATCH(), ARGS);
+
+/* skip normal ones */
+#define _GLAPI_SKIP_NORMAL_ENTRY_POINTS
+#include "glapi/glapitemp.h"
+
+#endif /* GLX_INDIRECT_RENDERING */