Module: Mesa
Branch: 7.10
Commit: 05d9a4ab1ccc14464e65f8288aaba8862a39a973
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=05d9a4ab1ccc14464e65f8288aaba8862a39a973

Author: Jeremy Huddleston <jerem...@apple.com>
Date:   Tue Jun  7 00:51:18 2011 -0400

osmesa: 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: Jeremy Huddleston <jerem...@apple.com>
Signed-off-by: Chia-I Wu <olva...@gmail.com>
(cherry picked from commit 0e8d045bf8bc930576cc69b9de8a31a4c973dc7c)

---

 src/mesa/drivers/osmesa/osmesa.c |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c
index 10ba6b7..ae9eaaf 100644
--- a/src/mesa/drivers/osmesa/osmesa.c
+++ b/src/mesa/drivers/osmesa/osmesa.c
@@ -1567,3 +1567,31 @@ OSMesaColorClamp(GLboolean enable)
 }
 
 
+/**
+ * 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/glapitable.h"
+
+#if defined(USE_MGL_NAMESPACE)
+#define NAME(func)  mgl##func
+#else
+#define NAME(func)  gl##func
+#endif
+
+#define DISPATCH(FUNC, ARGS, MESSAGE)          \
+   GET_DISPATCH()->FUNC ARGS
+
+#define RETURN_DISPATCH(FUNC, ARGS, MESSAGE)   \
+   return GET_DISPATCH()->FUNC ARGS
+
+/* skip normal ones */
+#define _GLAPI_SKIP_NORMAL_ENTRY_POINTS
+#include "glapi/glapitemp.h"
+
+#endif /* GLX_INDIRECT_RENDERING */

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to