[Mesa-dev] [PATCH 1/8] nir: add is_xfb_only to nir variable

Timothy Arceri tarceri at itsqueeze.com
Tue Sep 12 23:50:39 UTC 2017


Whoop subject should be:

nir: add always_active_io to nir variable

On 13/09/17 09:37, Timothy Arceri wrote:
> Will be used in nir link pass to decided if we can remove a varying
> or not.
> ---
>   src/compiler/glsl/glsl_to_nir.cpp |  1 +
>   src/compiler/nir/nir.h            | 10 ++++++++++
>   2 files changed, 11 insertions(+)
> 
> diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp
> index bb2ba17b220..ea75e3c8e99 100644
> --- a/src/compiler/glsl/glsl_to_nir.cpp
> +++ b/src/compiler/glsl/glsl_to_nir.cpp
> @@ -326,6 +326,7 @@ nir_visitor::visit(ir_variable *ir)
>      var->type = ir->type;
>      var->name = ralloc_strdup(var, ir->name);
>   
> +   var->data.always_active_io = ir->data.always_active_io;
>      var->data.read_only = ir->data.read_only;
>      var->data.centroid = ir->data.centroid;
>      var->data.sample = ir->data.sample;
> diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
> index 8330e6d7ce7..fab2110f619 100644
> --- a/src/compiler/nir/nir.h
> +++ b/src/compiler/nir/nir.h
> @@ -192,6 +192,16 @@ typedef struct nir_variable {
>         unsigned invariant:1;
>   
>         /**
> +       * When separate shader programs are enabled, only input/outputs between
> +       * the stages of a multi-stage separate program can be safely removed
> +       * from the shader interface. Other input/outputs must remains active.
> +       *
> +       * This is also used to make sure xfb varyings that are unused by the
> +       * fragment shader are not removed.
> +       */
> +      unsigned always_active_io:1;
> +
> +      /**
>          * Interpolation mode for shader inputs / outputs
>          *
>          * \sa glsl_interp_mode
> 


More information about the mesa-dev mailing list