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

Timothy Arceri tarceri at itsqueeze.com
Sun Oct 14 21:30:23 UTC 2018


What happened to v2?

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