[Mesa-dev] [PATCH 02/15] nir: fix compacting varyings when XFB outputs are present

Samuel Pitoiset samuel.pitoiset at gmail.com
Mon Oct 15 08:24:55 UTC 2018



On 10/14/18 11:30 PM, Timothy Arceri wrote:
> What happened to v2?

This one isn't up-to-date.

> 
> On 13/10/18 11:57 pm, Samuel Pitoiset wrote:
>> We shouldn't try to compact any varyings known as always
>> active IO, especially XFB outputs. For example, if one
>> component of an xfb output is also used as input varying
>> in the next stage, it shouldn't be compacted.
>>
>> Because we look at the input varyings from the consumer
>> stage, we don't know if one of them is an XFB output. One
>> solution is to mark all components as used when
>> always_active_io is true to avoid wrong remapping.
>>
>> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
>> ---
>>   src/compiler/nir/nir_linking_helpers.c | 9 +++++++++
>>   1 file changed, 9 insertions(+)
>>
>> diff --git a/src/compiler/nir/nir_linking_helpers.c 
>> b/src/compiler/nir/nir_linking_helpers.c
>> index 85712a7cb1..88014e9a1d 100644
>> --- a/src/compiler/nir/nir_linking_helpers.c
>> +++ b/src/compiler/nir/nir_linking_helpers.c
>> @@ -236,6 +236,15 @@ get_slot_component_masks_and_interp_types(struct 
>> exec_list *var_list,
>>                  get_interp_type(var, default_to_smooth_interp);
>>               interp_loc[location + i] = get_interp_loc(var);
>> +            if (var->data.always_active_io) {
>> +               /* Mark all components as used to avoid repacting xfb 
>> varyings
>> +                * wrongly. For instance, if one component of an xfb 
>> output is
>> +                * also used as input varying in the next stage.
>> +                */
>> +               comps[location + i] |= 0xf;
>> +               continue;
>> +            }
>> +
>>               if (dual_slot) {
>>                  if (i & 1) {
>>                     comps[location + i] |= ((1 << comps_slot2) - 1);
>>


More information about the mesa-dev mailing list