[Mesa-dev] Discussion: C++11 std::future in Mesa

Marek Olšák maraeo at gmail.com
Wed Jun 1 18:17:12 UTC 2016


On Wed, Jun 1, 2016 at 7:40 PM, Patrick Baggett
<baggett.patrick at gmail.com> wrote:
>>
>>
>> No. Shader compilation can only be asynchronous if it's far enough
>> from a draw call and the app doesn't query its status. If it's next to
>> a draw call, multithreading is useless. Completely useless.
>>

I take my statement back. Multithreading can be useful for compiling
VS and FS in parallel when it's next to a draw call.

>
> I don't know a lot about the shader compilation/linking process, so
> I'm just asking this for my own benefit.
>
> I read that the optimizations take a long time. Is it possible to
> create a sort of -O0 version of the shader while the real version is
> generated by some thread pool? Or would there be some shaders that
> would just fail to run unless optimization took place (and the
> developers count on that)?

The latter. Register allocation is usually required for being able to
run a shader.

Marek


More information about the mesa-dev mailing list