[Mesa-dev] [PATCH 3/3] radeonsi/nir: call ac_lower_indirect_derefs()

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Mon Mar 5 01:14:39 UTC 2018


For the series

Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>

On Mon, Mar 5, 2018 at 2:09 AM, Timothy Arceri <tarceri at itsqueeze.com> wrote:
> Fixes piglit tests:
> tests/spec/glsl-1.50/execution/variable-indexing/gs-input-array-vec3-index-rd.shader_test
> tests/spec/glsl-1.50/execution/geometry/max-input-components.shader_test
> ---
>  src/gallium/drivers/radeonsi/si_compute.c       | 2 +-
>  src/gallium/drivers/radeonsi/si_shader.h        | 2 +-
>  src/gallium/drivers/radeonsi/si_shader_nir.c    | 4 +++-
>  src/gallium/drivers/radeonsi/si_state_shaders.c | 2 +-
>  4 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/src/gallium/drivers/radeonsi/si_compute.c b/src/gallium/drivers/radeonsi/si_compute.c
> index e9b6127115..d135a09add 100644
> --- a/src/gallium/drivers/radeonsi/si_compute.c
> +++ b/src/gallium/drivers/radeonsi/si_compute.c
> @@ -107,7 +107,7 @@ static void si_create_compute_state_async(void *job, int thread_index)
>                 sel.nir = program->ir.nir;
>
>                 si_nir_scan_shader(sel.nir, &sel.info);
> -               si_lower_nir(&sel);
> +               si_lower_nir(&sel, program->compiler_ctx_state.chip_class);
>         }
>
>
> diff --git a/src/gallium/drivers/radeonsi/si_shader.h b/src/gallium/drivers/radeonsi/si_shader.h
> index 28f6e6bc4e..23f9d20e19 100644
> --- a/src/gallium/drivers/radeonsi/si_shader.h
> +++ b/src/gallium/drivers/radeonsi/si_shader.h
> @@ -674,7 +674,7 @@ void si_nir_scan_shader(const struct nir_shader *nir,
>  void si_nir_scan_tess_ctrl(const struct nir_shader *nir,
>                            const struct tgsi_shader_info *info,
>                            struct tgsi_tessctrl_info *out);
> -void si_lower_nir(struct si_shader_selector *sel);
> +void si_lower_nir(struct si_shader_selector *sel, enum chip_class chip_class);
>
>  /* Inline helpers. */
>
> diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c
> index fc709d8546..3d538be4cf 100644
> --- a/src/gallium/drivers/radeonsi/si_shader_nir.c
> +++ b/src/gallium/drivers/radeonsi/si_shader_nir.c
> @@ -665,7 +665,7 @@ void si_nir_scan_shader(const struct nir_shader *nir,
>   * selector is created.
>   */
>  void
> -si_lower_nir(struct si_shader_selector* sel)
> +si_lower_nir(struct si_shader_selector* sel, enum chip_class chip_class)
>  {
>         /* Adjust the driver location of inputs and outputs. The state tracker
>          * interprets them as slots, while the ac/nir backend interprets them
> @@ -715,6 +715,8 @@ si_lower_nir(struct si_shader_selector* sel)
>         };
>         NIR_PASS_V(sel->nir, nir_lower_subgroups, &subgroups_options);
>
> +       ac_lower_indirect_derefs(sel->nir, chip_class);
> +
>         bool progress;
>         do {
>                 progress = false;
> diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c
> index 98a3dfe242..2893135242 100644
> --- a/src/gallium/drivers/radeonsi/si_state_shaders.c
> +++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
> @@ -1999,7 +1999,7 @@ static void *si_create_shader_selector(struct pipe_context *ctx,
>                 si_nir_scan_shader(sel->nir, &sel->info);
>                 si_nir_scan_tess_ctrl(sel->nir, &sel->info, &sel->tcs_info);
>
> -               si_lower_nir(sel);
> +               si_lower_nir(sel, sctx->b.chip_class);
>         }
>
>         sel->type = sel->info.processor;
> --
> 2.14.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list