On 19 November 2012 13:26, Eric Anholt <span dir="ltr"><<a href="mailto:eric@anholt.net" target="_blank">eric@anholt.net</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">Paul Berry <<a href="mailto:stereotype441@gmail.com">stereotype441@gmail.com</a>> writes:<br>
<br>
> From: Ian Romanick <<a href="mailto:ian.d.romanick@intel.com">ian.d.romanick@intel.com</a>><br>
><br>
> To use multithreading with xlib, you're supposed to call XInitThreads<br>
> before any other xlib call. Without this, xlib and GLX calls won't be<br>
> thread safe. It looks like this test had an extra mutex to work<br>
> around the lack of thread saftey in glXCreateContext and<br>
> glXMakeCurrent.<br>
<br>
</div>I don't think that was the intent behind the mutexes -- really just<br>
wanted the two rendering threads to be totally serialized. If we wanted<br>
to test threads doing simultaneous drawing, we would probably want to do<br>
drawing in a loop and hopefully get the two threads started at the same<br>
time.<br>
<br>
That said, we should definitely use XInitThreads().<br>
</blockquote></div><br>Ok, I'll change the patch to just do XInitThreads().<br></div>