[Mesa-dev] [PATCH] glsl: Make access to type flyweight global state thread safe
Eric Anholt
eric at anholt.net
Thu Oct 25 11:17:16 PDT 2012
Ian Romanick <idr at freedesktop.org> writes:
> From: Ian Romanick <ian.d.romanick at intel.com>
>
> This should fix some problems related to compiling shaders in different
> contextes from multiple threads.
This is pretty nasty. I think de-rallocing this file might end up nicer
(we'd need a destructor that frees type->name and type->fields.whatever,
and a hash walk that calls it in _mesa_glsl_release_types and frees the
key string), then mutexes would only be needed for the structure/array
hash table inserts with no recursion issues.
Does that sound reasonable?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20121025/8914ee25/attachment.pgp>
More information about the mesa-dev
mailing list