[Mesa-dev] [PATCH 4/4] nir: link time opt duplicate varyings

Timothy Arceri tarceri at itsqueeze.com
Sat Dec 15 02:26:28 UTC 2018


On 15/12/18 1:16 pm, Timothy Arceri wrote:
> On 15/12/18 7:32 am, Marek Olšák wrote:
>> For patches 1-3:
>>
>> Reviewed-by: Marek Olšák <marek.olsak at amd.com 
>> <mailto:marek.olsak at amd.com>>
>>
> 
> Thanks!
> 
>> I'm not so knowledgeable to be able to comment on patch 4.
>>
>> Does it also merge varyings such as (x,y,undef,undef) and 
>> (x,undef,undef,w)? There is a game which outputs (x,y,z,undef) and 
>> (x,y,undef,undef) where the vertex shader is a SSO.
> 
> No. All of the link-time optimisations in NIR are currently only applied 
> at actual link-time. I've often thought about adding a way to apply 
> these to SSO shaders but this is unlikely something I will end up 
> working on since our main focus these days is on Vulkan and there we 
> always link the entire pipeline so its not an issue.
> 

Just to be clear. The exiting NIR link-time optimisations we have will 
already convert (x,y,undef,undef) and (x,undef,undef,w) to (x,y,x,w).

This pass just takes things further, eliminating components holding the 
same value if we can detect it.


More information about the mesa-dev mailing list