On Sat, May 3, 2014 at 1:52 AM, Ian Romanick <i...@freedesktop.org> wrote:
> On 04/22/2014 01:58 AM, Chia-I Wu wrote:
>> There may be two contexts compiling shaders at the same time.  locale_t needs
>> to be protected.
>
> Rather than calling glsl_initialize_strtod from other places in the
> compiler, it seems better to use call_once from the strtof and strtod
> functions.
How about having a static object to call newlocale()/freelocale() in
its constructor/destructor?  It will impose no overead on
glsl_strtod(), at the expense of little wasted memory when the
applications do not compile shaders.

-- 
o...@lunarg.com
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to