[Mesa-stable] [PATCH] radeonsi: ensure that temp array allocas are in the entry block

Marek Olšák maraeo at gmail.com
Mon Jul 31 11:06:16 UTC 2017


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

Marek

On Sat, Jul 29, 2017 at 10:47 AM, Nicolai Hähnle <nhaehnle at gmail.com> wrote:

> From: Nicolai Hähnle <nicolai.haehnle at amd.com>
>
> Otherwise, code generation fails. This has become necessary since some
> shaders are wrapped in control flow.
>
> Fixes: 081ac6e5c6d2 ("radeonsi/gfx9: always wrap GS and TCS in an if-block
> (v2)")
> Cc: mesa-stable at lists.freedesktop.org
> ---
>  src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c
> b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c
> index 9c4a234..df37267 100644
> --- a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c
> +++ b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c
> @@ -756,7 +756,7 @@ static void emit_declaration(struct
> lp_build_tgsi_context *bld_base,
>                          */
>                         if (array_size > 16 ||
>                             !ctx->screen->llvm_has_working_vgpr_indexing)
> {
> -                               array_alloca = LLVMBuildAlloca(builder,
> +                               array_alloca = lp_build_alloca_undef(&ctx->
> gallivm,
>                                         LLVMArrayType(ctx->f32,
>                                                       array_size),
> "array");
>                                 ctx->temp_array_allocas[id] = array_alloca;
> --
> 2.9.3
>
> _______________________________________________
> mesa-stable mailing list
> mesa-stable at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-stable
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-stable/attachments/20170731/c0e95887/attachment-0001.html>


More information about the mesa-stable mailing list