[Mesa-dev] [PATCH] radv/nir: avoid packing vertex outputs we can eliminate

Timothy Arceri tarceri at itsqueeze.com
Tue Nov 6 20:40:01 UTC 2018


On 7/11/18 5:00 am, Eric Anholt wrote:
> Timothy Arceri <tarceri at itsqueeze.com> writes:
> 
>> On Mon, Nov 5, 2018, at 4:44 PM, Timothy Arceri wrote:
>>> On 6/11/18 11:30 am, Eric Anholt wrote:
>>>> Timothy Arceri <tarceri at itsqueeze.com> writes:
>>>>
>>>>> For now I have only enabled this for RADV we can do it
>>>>> also for radeonsi also but we need to add a CAP for it.
>>>>
>>>> If we're doing this at link time, why not push the constant value from
>>>> the producer into the consumer shader and then cut out the varying
>>>> entirely?
>>>>
>>>
>>> Maybe we could look to do this between vertex stages but we can do this
>>
>> Sorry that should be: "can't do this"
>>
>>> for fragment inputs (which is what this patch is for) unless they are
>>> marked as flat (which almost never happens). Or I'm I missing something?
> 
> If the vertex shader is providing a constant for all the vertices you're
> interpolating between, how is that different from being flat?

We can just copy the flat constants directly across to the fs. 
Everything else still needs to be interpolated, are you saying there is 
a simple way to do this?


More information about the mesa-dev mailing list