summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2009-06-19 21:14:45 +0100
committerJon TURNEY <jon.turney@dronecode.org.uk>2009-10-16 20:59:45 +0100
commita0cbe7858329aaa77ae1af381f5c021fb90d3ff5 (patch)
tree3036b369ad3ab82050ed923120fac61315eaa733
parentbe3bda8304fec39a8218b47a163855ebd5884b84 (diff)
Remove GL dispatcher symbols which are defined in libGL, and link with libGL for them instead (as dri_swrast.so is linked with libGL)
Paper over the cracks. Avoid a crash when we have a broken context. Turn on GLX null context debugging Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
-rw-r--r--configure.ac4
-rw-r--r--glx/Makefile.am2
-rw-r--r--hw/xwin/InitOutput.c24
3 files changed, 26 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 9425bc964..8acd70549 100644
--- a/configure.ac
+++ b/configure.ac
@@ -909,7 +909,7 @@ if test "x$GLX" = xyes; then
AC_SUBST(XLIB_CFLAGS)
AC_DEFINE(GLXEXT, 1, [Build GLX extension])
GLX_LIBS='$(top_builddir)/glx/libglx.la'
- GLX_SYS_LIBS="$GLX_SYS_LIBS $DLOPEN_LIBS"
+ GLX_SYS_LIBS="$GLX_SYS_LIBS $GL_LIBS $DLOPEN_LIBS"
else
GLX=no
fi
@@ -1710,7 +1710,7 @@ if test "x$XWIN" = xyes; then
XWIN_SYS_LIBS=-lwinsock2
;;
esac
- XWIN_SYS_LIBS="$XWIN_SYS_LIBS $XWINMODULES_LIBS"
+ XWIN_SYS_LIBS="$XWIN_SYS_LIBS $XWINMODULES_LIBS $GLX_SYS_LIBS"
AC_SUBST(XWIN_SERVER_NAME)
AC_SUBST(XWIN_SYS_LIBS)
diff --git a/glx/Makefile.am b/glx/Makefile.am
index a23ae0a47..0744ef2b5 100644
--- a/glx/Makefile.am
+++ b/glx/Makefile.am
@@ -42,11 +42,9 @@ glapi_sources = \
dispatch.h \
glapitable.h \
glapitemp.h \
- glapi.c \
glapi.h \
glapioffsets.h \
glprocs.h \
- glthread.c \
glthread.h
libglxdri_la_SOURCES = \
diff --git a/hw/xwin/InitOutput.c b/hw/xwin/InitOutput.c
index 363323206..26b2d5aa0 100644
--- a/hw/xwin/InitOutput.c
+++ b/hw/xwin/InitOutput.c
@@ -131,6 +131,9 @@ const char *
winGetBaseDir(void);
#endif
+static
+void glx_debugging(void);
+
/*
* For the depth 24 pixmap we default to 32 bits per pixel, but
* we change this pixmap format later if we detect that the display
@@ -1024,6 +1027,8 @@ InitOutput (ScreenInfo *screenInfo, int argc, char *argv[])
* Apply locale specified in LANG environment variable.
*/
setlocale (LC_ALL, "");
+
+ glx_debugging();
}
#endif
@@ -1031,3 +1036,22 @@ InitOutput (ScreenInfo *screenInfo, int argc, char *argv[])
winDebug ("InitOutput - Returning.\n");
#endif
}
+
+/* GLX debugging helpers */
+#include <../glx/glapi.h>
+
+static
+void warn_func(void * p1, const char *format, ...) {
+ va_list v;
+ va_start(v, format);
+ vfprintf(stderr, format, v);
+ va_end(v);
+ fprintf(stderr,"\n");
+}
+
+static
+void glx_debugging(void)
+{
+ _glapi_set_warning_func(warn_func);
+ _glapi_noop_enable_warnings(TRUE);
+}