<div dir="ltr"><div>Reviewed-by: Marek Olšák <<a href="mailto:marek.olsak@amd.com">marek.olsak@amd.com</a>><br><br></div>Marek<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jul 29, 2017 at 10:47 AM, Nicolai Hähnle <span dir="ltr"><<a href="mailto:nhaehnle@gmail.com" target="_blank">nhaehnle@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Nicolai Hähnle <<a href="mailto:nicolai.haehnle@amd.com">nicolai.haehnle@amd.com</a>><br>
<br>
Otherwise, code generation fails. This has become necessary since some<br>
shaders are wrapped in control flow.<br>
<br>
Fixes: 081ac6e5c6d2 ("radeonsi/gfx9: always wrap GS and TCS in an if-block (v2)")<br>
Cc: <a href="mailto:mesa-stable@lists.freedesktop.org">mesa-stable@lists.freedesktop.<wbr>org</a><br>
---<br>
 src/gallium/drivers/radeonsi/<wbr>si_shader_tgsi_setup.c | 2 +-<br>
 1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/src/gallium/drivers/<wbr>radeonsi/si_shader_tgsi_setup.<wbr>c b/src/gallium/drivers/<wbr>radeonsi/si_shader_tgsi_setup.<wbr>c<br>
index 9c4a234..df37267 100644<br>
--- a/src/gallium/drivers/<wbr>radeonsi/si_shader_tgsi_setup.<wbr>c<br>
+++ b/src/gallium/drivers/<wbr>radeonsi/si_shader_tgsi_setup.<wbr>c<br>
@@ -756,7 +756,7 @@ static void emit_declaration(struct lp_build_tgsi_context *bld_base,<br>
                         */<br>
                        if (array_size > 16 ||<br>
                            !ctx->screen->llvm_has_<wbr>working_vgpr_indexing) {<br>
-                               array_alloca = LLVMBuildAlloca(builder,<br>
+                               array_alloca = lp_build_alloca_undef(&ctx-><wbr>gallivm,<br>
                                        LLVMArrayType(ctx->f32,<br>
                                                      array_size), "array");<br>
                                ctx->temp_array_allocas[id] = array_alloca;<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.9.3<br>
<br>
______________________________<wbr>_________________<br>
mesa-stable mailing list<br>
<a href="mailto:mesa-stable@lists.freedesktop.org">mesa-stable@lists.freedesktop.<wbr>org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-stable" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-stable</a><br>
</font></span></blockquote></div><br></div>