[Mesa-dev] [PATCH 6/7] nir: fix missing increments of num_inputs/num_outputs
Jason Ekstrand
jason at jlekstrand.net
Fri Nov 6 15:23:52 PST 2015
On Fri, Nov 6, 2015 at 8:35 AM, Rob Clark <robdclark at gmail.com> wrote:
> From: Rob Clark <robclark at freedesktop.org>
>
> Signed-off-by: Rob Clark <robclark at freedesktop.org>
> ---
> src/glsl/nir/nir_lower_clip.c | 2 ++
> src/glsl/nir/nir_lower_two_sided_color.c | 2 ++
> 2 files changed, 4 insertions(+)
>
> diff --git a/src/glsl/nir/nir_lower_clip.c b/src/glsl/nir/nir_lower_clip.c
> index 31ccfb2..4a91527 100644
> --- a/src/glsl/nir/nir_lower_clip.c
> +++ b/src/glsl/nir/nir_lower_clip.c
> @@ -55,9 +55,11 @@ create_clipdist_var(nir_shader *shader, unsigned drvloc,
>
> if (output) {
> exec_list_push_tail(&shader->outputs, &var->node);
> + shader->num_outputs++;
> }
> else {
> exec_list_push_tail(&shader->inputs, &var->node);
> + shader->num_inputs++;
I'm not sure what I think about this. Usually, num_inputs/outputs is
set by nir_lower_io or similar. They don't have to be vec4's. In the
i965 driver, FS inputs are in terms of floats. Maybe tgsi_to_nir
provides you those guarantees but we haven't for i965.
--Jason
> }
> return var;
> }
> diff --git a/src/glsl/nir/nir_lower_two_sided_color.c b/src/glsl/nir/nir_lower_two_sided_color.c
> index db519bf..269e252 100644
> --- a/src/glsl/nir/nir_lower_two_sided_color.c
> +++ b/src/glsl/nir/nir_lower_two_sided_color.c
> @@ -60,6 +60,8 @@ create_input(nir_shader *shader, unsigned drvloc, gl_varying_slot slot)
>
> exec_list_push_tail(&shader->inputs, &var->node);
>
> + shader->num_inputs++;
> +
> return var;
> }
>
> --
> 2.5.0
>
More information about the mesa-dev
mailing list