[Mesa-dev] [PATCH 00/20] RadeonSI: Optimized shader variants and other improvements
Marek Olšák
maraeo at gmail.com
Mon Nov 21 18:05:54 UTC 2016
On Mon, Nov 21, 2016 at 9:32 AM, Nicolai Hähnle <nhaehnle at gmail.com> wrote:
> 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.
R600_DEBUG=mono works like forceopt - the compilation is done on
demand and no shader is compiled asynchronously.
Marek
More information about the mesa-dev
mailing list