Why does thread support depend on GLX_DIRECT_RENDERING in libGL?
Keith Packard
keithp at keithp.com
Thu Apr 14 09:35:09 PDT 2005
On Thu, 2005-04-14 at 09:07 -0700, Ian Romanick wrote:
> While working on bug #3024, I noticed something kind of odd. Every
> place where there is code that depends on XTHREADS being defined, it
> also depends on GLX_DIRECT_RENDERING being defined. The net result
> being that the only time you get thread safety in libGL (i.e., a GLX
> context per thread) is when GLX_DIRECT_RENDERING is defined. This seems
> wrong.
As an aside -- there's a way to detect XTHREADS support in the local
Xlib so that libGL can be built correctly if you like.
I use the following snippet in various configure.ac files:
AC_MSG_CHECKING([for XTHREADS in Xlib])
AC_RUN_IFELSE(
[AC_LANG_PROGRAM([[#include <X11/Xlib.h>]],
[[return XInitThreads() == 0 ? 0 : 1;]])],
[xthreads=no],
[xthreads=yes],
[xthreads=yes])
AC_MSG_RESULT($xthreads)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg/attachments/20050414/095b8330/attachment.pgp>
More information about the xorg
mailing list