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

Marek Olšák maraeo at gmail.com
Wed Nov 30 11:43:43 UTC 2016


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.

Marek


More information about the mesa-dev mailing list