<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 13, 2015 at 8:21 PM, Kenneth Graunke <span dir="ltr"><<a href="mailto:kenneth@whitecape.org" target="_blank">kenneth@whitecape.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Tuesday, January 13, 2015 08:02:54 PM Jason Ekstrand wrote:<br>
> On Jan 13, 2015 6:38 PM, "Kenneth Graunke" <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>> wrote:<br>
> ><br>
> > On Tuesday, January 13, 2015 10:28:20 AM Jason Ekstrand wrote:<br>
> > > Going through the for loop every time has noticable overhead.  This<br>
> fixes<br>
> > > things up so we only do that once ever and then just do a hash table<br>
> lookup<br>
> > > which should be much cheaper.<br>
> > > ---<br>
> > >  src/mesa/main/formats.c | 67<br>
> +++++++++++++++++++++++++++++++++++++++++--------<br>
> > >  1 file changed, 56 insertions(+), 11 deletions(-)<br>
> ><br>
> > This will break Windows.<br>
><br>
> Why? We have a C++11-based  implementation of pthread_once.<br>
> --Jason<br>
<br>
</div></div>I think you have to use call_once and "once_flag".  I don't see pthread_once<br>
existing in threads_win32.h, only threads_posix.h, which doesn't appear to<br>
be #included on windows.<br></blockquote><div><br></div><div>Fixed locally.  I can send a v2 if you really want.<br></div><div>--Jason<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
--Ken</blockquote></div><br></div></div>