[Piglit] [PATCH 1/2] glx: Replace extra mutexes with XInitThreads

Paul Berry stereotype441 at gmail.com
Mon Nov 19 14:28:43 PST 2012


On 19 November 2012 13:26, Eric Anholt <eric at anholt.net> wrote:

> Paul Berry <stereotype441 at gmail.com> writes:
>
> > From: Ian Romanick <ian.d.romanick at intel.com>
> >
> > To use multithreading with xlib, you're supposed to call XInitThreads
> > before any other xlib call.  Without this, xlib and GLX calls won't be
> > thread safe.  It looks like this test had an extra mutex to work
> > around the lack of thread saftey in glXCreateContext and
> > glXMakeCurrent.
>
> I don't think that was the intent behind the mutexes -- really just
> wanted the two rendering threads to be totally serialized.  If we wanted
> to test threads doing simultaneous drawing, we would probably want to do
> drawing in a loop and hopefully get the two threads started at the same
> time.
>
> That said, we should definitely use XInitThreads().
>

Ok, I'll change the patch to just do XInitThreads().
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20121119/82aecec7/attachment.html>


More information about the Piglit mailing list