[Mesa-dev] [PATCH 00/20] RadeonSI: Optimized shader variants and other improvements

Nicolai Hähnle nhaehnle at gmail.com
Mon Nov 21 08:32:19 UTC 2016


On 16.11.2016 19:38, Marek Olšák wrote:
> Patches 1-10 are random improvements.
>
> Patches 11-14 are cleanups.
>
> Patches 15-20 add support for optimized shader variants compiled
> asynchronously (without stalling rendering).
>
> The following optimizations are implemented for the shader variants:
> - If user clipping is disabled, clip distances and the gl_ClipVertex
>   code is removed from vertex shaders.
> - All VS outputs not read by a PS are removed. All VS code that
>   computes those including vertex attribute loads is removed
>   automatically by dead-code elimination.
> - If GL_RASTERIZER_DISCARD is set, all varyings are removed from
>   vertex shaders.
> - If doing depth-only rendering, it has the same behavior for
>   vertex shaders as GL_RASTERIZER_DISCARD.
>
> It's all about optimizing vertex shaders and VS output resources.
>
> I've just realized I might have to limit the compilation of optimized
> shader variants to only a limited number of threads, so that apps
> aren't slowed down by this.
>
> I hope this is just the beginning of many things we can do with
> asynchronous compilation.

This is very cool stuff and the patches look good to me.

However, for better testing please add debug flags 'noopt' and 
'forceopt' (or something like that), where noopt disables all async 
optimized variants and forceopt always waits for the optimized variants, 
so we can run piglit with forceopt enabled for additional testing.

With that in mind, patches 15 - 20 are also:

Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>

>
> Please review.
>
> Marek
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>


More information about the mesa-dev mailing list