[Mesa-dev] [PATCH v3 05/10] formats: Use a hash table for _mesa_format_from_array_format

Jason Ekstrand jason at jlekstrand.net
Wed Jan 14 10:03:18 PST 2015


On Tue, Jan 13, 2015 at 8:21 PM, Kenneth Graunke <kenneth at whitecape.org>
wrote:

> On Tuesday, January 13, 2015 08:02:54 PM Jason Ekstrand wrote:
> > On Jan 13, 2015 6:38 PM, "Kenneth Graunke" <kenneth at whitecape.org>
> wrote:
> > >
> > > On Tuesday, January 13, 2015 10:28:20 AM Jason Ekstrand wrote:
> > > > Going through the for loop every time has noticable overhead.  This
> > fixes
> > > > things up so we only do that once ever and then just do a hash table
> > lookup
> > > > which should be much cheaper.
> > > > ---
> > > >  src/mesa/main/formats.c | 67
> > +++++++++++++++++++++++++++++++++++++++++--------
> > > >  1 file changed, 56 insertions(+), 11 deletions(-)
> > >
> > > This will break Windows.
> >
> > Why? We have a C++11-based  implementation of pthread_once.
> > --Jason
>
> I think you have to use call_once and "once_flag".  I don't see
> pthread_once
> existing in threads_win32.h, only threads_posix.h, which doesn't appear to
> be #included on windows.
>

Fixed locally.  I can send a v2 if you really want.
--Jason


>
> --Ken
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150114/18d09f58/attachment.html>


More information about the mesa-dev mailing list