[Mesa-dev] [PATCH] radeonsi: Do not set both inreg and byval

Marek Olšák maraeo at gmail.com
Thu Oct 10 13:49:43 CEST 2013


Will the byval function arguments break the driver with LLVM 3.3?

Marek

On Thu, Oct 10, 2013 at 12:34 AM, Vincent Lejeune <vljn at ovi.com> wrote:
> ---
>  src/gallium/drivers/radeonsi/radeonsi_shader.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/src/gallium/drivers/radeonsi/radeonsi_shader.c b/src/gallium/drivers/radeonsi/radeonsi_shader.c
> index ab996cc..9d95997 100644
> --- a/src/gallium/drivers/radeonsi/radeonsi_shader.c
> +++ b/src/gallium/drivers/radeonsi/radeonsi_shader.c
> @@ -1655,11 +1655,12 @@ static void create_function(struct si_shader_context *si_shader_ctx)
>
>         for (i = 0; i <= last_sgpr; ++i) {
>                 LLVMValueRef P = LLVMGetParam(si_shader_ctx->radeon_bld.main_fn, i);
> -               LLVMAddAttribute(P, LLVMInRegAttribute);
> +               switch (i) {
> +               default:
> +                       LLVMAddAttribute(P, LLVMInRegAttribute);
> +                       break;
>                 /* We tell llvm that array inputs are passed by value to allow Sinking pass
>                  * to move load. Inputs are constant so this is fine. */
> -               switch (i) {
> -               default: break;
>                 case SI_PARAM_CONST:
>                 case SI_PARAM_SAMPLER:
>                 case SI_PARAM_RESOURCE:
> --
> 1.8.3.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list