[Mesa-dev] Draft ARB_parallel_shader_compile RFC

Nicolai Hähnle nhaehnle at gmail.com
Tue Apr 18 18:17:26 UTC 2017


On 18.04.2017 18:57, Marek Olšák wrote:
> We also have asynchronous compilation for optimized shaders (linking
> separate shaders etc.) using the same threaded queue as the initial
> compilations, and we can't let apps suppress the optimized ones.

Good point. I think if the app says it doesn't want parallel compiles at 
all, it would still get 1 background thread that is only used for the 
optimized shaders.

Cheers,
Nicolai

>
> Marek
>
> On Apr 18, 2017 1:08 PM, "Nicolai Hähnle" <nhaehnle at gmail.com
> <mailto:nhaehnle at gmail.com>> wrote:
>
>     On 17.04.2017 14:07, Edward O'Callaghan wrote:
>
>         Hi folks,
>
>         This is my early draft on the threaded shader compile "suggestion"
>         thread. The requirements according the spec are rather weak as
>         it is up to the implementation, which frankly can even just ignore
>         the requested thread count. However, afaik in the case of radeonsi
>         it is already threaded. Anyhoo I just wanted to get some feedback..
>
>
>     Thanks for working on this. As others said, 90% of the work is
>     elsewhere. Some thoughts on that:
>
>     Since radeonsi already does parallelization of the backend compile,
>     this extension should control the sum of threads used for frontend
>     *and* backend compiles. In practice, that should mean having a
>     single thread pool which services both types of compiles (and links).
>
>     My first thought would be to have a driver-allocated util_queue
>     which gets passed across the Gallium and Mesa interfaces -- or
>     perhaps have a driver function table entry for kicking off
>     asynchronous compiles and links.
>
>     Cheers,
>     Nicolai
>
>
>         Please kindly review,
>
>         Edward O'Callaghan (3):
>
>          [PATCH 1/3] mesa: Add ARB_parallel_shader_compile boilerplate
>          [PATCH 2/3] mesa: implement ARB_parallel_shader_compile
>          [PATCH 3/3] st/mesa: enable ARB_parallel_shader_compile
>         _______________________________________________
>         mesa-dev mailing list
>         mesa-dev at lists.freedesktop.org
>         <mailto:mesa-dev at lists.freedesktop.org>
>         https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>         <https://lists.freedesktop.org/mailman/listinfo/mesa-dev>
>
>
>
>     --
>     Lerne, wie die Welt wirklich ist,
>     Aber vergiss niemals, wie sie sein sollte.
>     _______________________________________________
>     mesa-dev mailing list
>     mesa-dev at lists.freedesktop.org <mailto:mesa-dev at lists.freedesktop.org>
>     https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>     <https://lists.freedesktop.org/mailman/listinfo/mesa-dev>
>


-- 
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.


More information about the mesa-dev mailing list