[Mesa-dev] [PATCH 2/2] radeonsi: move instance divisors into a constant buffer

Marek Olšák maraeo at gmail.com
Tue Jun 27 15:07:21 UTC 2017


On Tue, Jun 27, 2017 at 9:22 AM, Nicolai Hähnle <nhaehnle at gmail.com> wrote:
> On 27.06.2017 02:14, Marek Olšák wrote:
>>
>> From: Marek Olšák <marek.olsak at amd.com>
>>
>> Shader key size: 107 -> 47
>
>
> Nice improvement.
>
>
>> Divisors of 0 and 1 are encoded in the shader key. Greater instance
>> divisors
>> are loaded from a constant buffer.
>>
>> The shader code doing the division is huge. Is it something we need to
>> worry about? Does any app use instance divisors >= 2?
>
>
> This reminds me of a certain LLVM improvement that I still need to clear.
>
> I doubt instance divisors >= 2 are used. As a data point, Vulkan doesn't
> support it as a feature at all, IIRC.
>
> Can we get an optimized monotholic shader variant built for shaders that
> have to fetch? This should help if anybody ever triggers this, because

We can't get optimized variants if we want to keep the shader key
small. If I put all instance divisors into key.opt, it would defeat
the effect of this patch.

Marek


More information about the mesa-dev mailing list