[Mesa-dev] [PATCHv2 00/13] multithread GLSL compiler

Brian Paul brianp at vmware.com
Wed Jul 9 07:42:45 PDT 2014


On 07/09/2014 01:47 AM, Chia-I Wu wrote:
> Hi list,
>
> This is my second try to add multithread support for the GLSL compiler.
> Changes since v1 are
>
>   - glLinkProgram can now be threaded
>   - added ctx->Const.DeferCompileShader and ctx->Const.DeferLinkProgram to
>     allow drivers to control what get threaded
>   - minimal changes to i965 to enable DeferLinkProgram
>
> The most interesting patch should be patch 8, which makes the necessary
> changes to core mesa.  Patch 13 touches i965 and is more a RFC patch.
>
> v2 still requires applications to "Do the Right Thing" to benefit from
> multithread compiler.  But that can be changed as noted in patch 8.  I am open
> to suggestions.
>
> A summary of the patches:
>
> Patch 1 makes our GL_KRH_debug implementation thread-safe.
>
> Patch 2~5 make the GLSL compiler thread-safe.  These are mostly the same as v1,
> except for how locale_t is initialized.
>
> Patch 6~7 add a singleton thread pool to the compiler.
>
> Patch 8 adds the infrastructure to core mesa to enable multithread
> compiling/linkg, and patch 9 adds a dri option to enable DeferCompileShader
> for i965.
>
> Patch 10~12 refactor some code in i965 and patch 13 adds the necessary changes
> to enable DeferLinkProgram.

Patches 1-8 look pretty good to me.  Just minor comments on #6 and #8.

Also, if this goes in, let's mention this feature in the 10.3 release 
notes file.

For 1-8: Reviewed-by: Brian Paul <brianp at vmware.com>

-Brian





More information about the mesa-dev mailing list