Bug 3024 - No thread saftey in Mesa's libGL
Summary: No thread saftey in Mesa's libGL
Status: RESOLVED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: libGL (show other bugs)
Version: unspecified
Hardware: All All
: high major
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-13 20:29 UTC by Ian Romanick
Modified: 2005-04-17 17:00 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Patch to use pthreads or TLS for per-thread GLX context, version 01 (5.01 KB, patch)
2005-04-14 13:58 UTC, Ian Romanick
no flags Details | Splinter Review

Description Ian Romanick 2005-04-13 20:29:12 UTC
The libGL built in the Mesa tree, via 'make linux-dri' and friends, is built
without XTHREADS defined.  Because of this, there is *NO* per-thread GLX
context.  Just grep for XTHREADS in src/glx/x11 for a good time. :(
Comment 1 Ian Romanick 2005-04-14 13:58:06 UTC
Created attachment 2426 [details] [review]
Patch to use pthreads or TLS for per-thread GLX context, version 01

Since everything else in the Mesa build uses either pthreads or TLS, this patch
adds similar support to libGL for the per-thread GLX context.

Also, glxext.c will give an error during compilation if THREADS is defined but
PTHREADS or XTHREADS is not.  If there are no supported platforms that don't
support multithreading, then this should be changed from '#elif defined(
THREADS )' to just '#else'.  That is, libGL will require either PTHREADS or
XTHREADS.  I personally think that is the right way to go, but that change can
be made later.

This patch also removes the dependency on GLX_DIRECT_RENDERING for per-thread
GLX context support.

If there are no objections, I will commit this to Mesa CVS on 15-Apr-2005.
Comment 2 Ian Romanick 2005-04-18 10:00:05 UTC
Fix committed to Mesa CVS.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.