[Mesa-dev] [PATCH 3/3] st/mesa: skip lower_output_reads when possible

Nicolai Hähnle nicolai.haehnle at amd.com
Wed Nov 30 11:47:08 UTC 2016


On 30.11.2016 12:43, Marek Olšák wrote:
> On Wed, Nov 30, 2016 at 9:09 AM, Nicolai Hähnle <nhaehnle at gmail.com> wrote:
>> On 29.11.2016 12:41, Marek Olšák wrote:
>>>
>>> For the series:
>>>
>>> Reviewed-by: Marek Olšák <marek.olsak at amd.com>
>>>
>>> It was a matter of time that this would resurface again. We used to
>>> have this, but some people didn't want it and removed it.
>>
>>
>> I can see how not reading from outputs might make life easier for some
>> drivers, but with the way we use LLVM, it was just redundant.
>>
>>
>>> I wonder if radeonsi implements output indirect indexing exactly like
>>> temps, or if there are differences.
>>
>>
>> Not quite. TCS is completely different, but in other shader stages output
>> indirect indexing uses the "fallback" path that builds an LLVM-level vector
>> out of the relevant part of the output file, then does insertelement, then
>> stores everything back to the output file.
>>
>> Temporary indirect indexing should always use the path where the array is
>> one big alloca (or one alloca per component), and we load/store from a
>> pointer into that array. The fallback path should only be used when the
>> state tracker doesn't provide ArrayIDs.
>>
>> If indirect indexing of outputs becomes a problem, we could try to
>> communicate ArrayIDs of outputs to improve that code.
>
> We do have ArrayIDs of outputs for all shader stages except for fragment.

You're right. They're currently only used to limit the size of the 
temporary LLVM vector, we don't do the same alloca improvement as we do 
for temporaries though.

Nicolai

> Marek
>


More information about the mesa-dev mailing list