[Mesa-dev] [PATCH 4/8] radeonsi/nir: add si_nir_load_sample_position() helper

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


It would be better to adjust the interface of load_sample_position as
needed instead of adding a new wrapper.

Marek

On Mon, Jan 15, 2018 at 4:46 AM, Timothy Arceri <tarceri at itsqueeze.com> wrote:
> ---
>  src/gallium/drivers/radeonsi/si_shader.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
> index 8e91a45455..a04b01eb79 100644
> --- a/src/gallium/drivers/radeonsi/si_shader.c
> +++ b/src/gallium/drivers/radeonsi/si_shader.c
> @@ -1905,6 +1905,12 @@ static LLVMValueRef load_sample_position(struct si_shader_context *ctx, LLVMValu
>         return lp_build_gather_values(&ctx->gallivm, pos, 4);
>  }
>
> +static LLVMValueRef si_nir_load_sample_position(struct ac_shader_abi *abi, LLVMValueRef sample_id)
> +{
> +       struct si_shader_context *ctx = si_shader_context_from_abi(abi);
> +       return load_sample_position(ctx, sample_id);
> +}
> +
>  static LLVMValueRef si_load_tess_coord(struct ac_shader_abi *abi,
>                                        LLVMTypeRef type,
>                                        unsigned num_components)
> --
> 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