[Mesa-dev] [PATCH 3/8] radeonsi/nir: add si_nir_lookup_interp_param() helper

Marek Olšák maraeo at gmail.com
Mon Jan 29 19:37:12 UTC 2018


On Mon, Jan 15, 2018 at 4:46 AM, Timothy Arceri <tarceri at itsqueeze.com> wrote:
> ---
>  src/amd/common/ac_nir_to_llvm.c                   |  4 ---
>  src/amd/common/ac_nir_to_llvm.h                   |  5 ++++
>  src/amd/common/ac_shader_abi.h                    |  2 ++
>  src/gallium/drivers/radeonsi/si_shader_internal.h |  4 +++
>  src/gallium/drivers/radeonsi/si_shader_nir.c      | 36 +++++++++++++++++++++++
>  5 files changed, 47 insertions(+), 4 deletions(-)
>
> diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
> index e79fdd2ec2..3efb01137c 100644
> --- a/src/amd/common/ac_nir_to_llvm.c
> +++ b/src/amd/common/ac_nir_to_llvm.c
> @@ -3926,10 +3926,6 @@ static LLVMValueRef visit_var_atomic(struct nir_to_llvm_context *ctx,
>         return result;
>  }
>
> -#define INTERP_CENTER 0
> -#define INTERP_CENTROID 1
> -#define INTERP_SAMPLE 2
> -
>  static LLVMValueRef lookup_interp_param(struct nir_to_llvm_context *ctx,
>                                         enum glsl_interp_mode interp, unsigned location)
>  {
> diff --git a/src/amd/common/ac_nir_to_llvm.h b/src/amd/common/ac_nir_to_llvm.h
> index b3ad0a0985..99bc3ef8dd 100644
> --- a/src/amd/common/ac_nir_to_llvm.h
> +++ b/src/amd/common/ac_nir_to_llvm.h
> @@ -115,6 +115,11 @@ enum ac_ud_index {
>         AC_UD_MAX_UD = AC_UD_TCS_MAX_UD,
>  };
>
> +/* Interpolation locations */
> +#define INTERP_CENTER 0
> +#define INTERP_CENTROID 1
> +#define INTERP_SAMPLE 2

This should probably be in a different patch.

Marek


More information about the mesa-dev mailing list