[Mesa-dev] [PATCH] radeonsi/nir: fix si_nir_load_tcs_varyings() for outputs

Marek Olšák maraeo at gmail.com
Wed Feb 14 17:41:37 UTC 2018


Reviewed-by: Marek Olšák <marek.olsak at amd.com>

Marek

On Wed, Feb 14, 2018 at 2:22 AM, Timothy Arceri <tarceri at itsqueeze.com> wrote:
> We were incorrectly using the input info for outputs.
> ---
>  src/gallium/drivers/radeonsi/si_shader.c | 13 +++++++++++--
>  1 file changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
> index 825cb9dd0e..ec03f537d0 100644
> --- a/src/gallium/drivers/radeonsi/si_shader.c
> +++ b/src/gallium/drivers/radeonsi/si_shader.c
> @@ -1254,11 +1254,20 @@ static LLVMValueRef si_nir_load_tcs_varyings(struct ac_shader_abi *abi,
>                 param_index = LLVMConstInt(ctx->i32, const_index, 0);
>         }
>
> +       ubyte *names;
> +       ubyte *indices;
> +       if (load_input) {
> +               names = info->input_semantic_name;
> +               indices = info->input_semantic_index;
> +       } else {
> +               names = info->output_semantic_name;
> +               indices = info->output_semantic_index;
> +       }
> +
>         dw_addr = get_dw_address_from_generic_indices(ctx, stride, dw_addr,
>                                                       vertex_index, param_index,
>                                                       driver_location,
> -                                                     info->input_semantic_name,
> -                                                     info->input_semantic_index,
> +                                                     names, indices,
>                                                       is_patch);
>
>         LLVMValueRef value[4];
> --
> 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