<div dir="auto"><div><br><div class="gmail_extra"><br><div class="gmail_quote">On 20 Sep. 2017 18:13, "Juan A. Suarez Romero" <<a href="mailto:jasuarez@igalia.com">jasuarez@igalia.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="quoted-text">On Wed, 2017-08-23 at 22:07 +0300, Andres Gomez wrote:<br>
> Hi Dave,<br>
><br>
> This patch landed tagged for 17.2 only. Was it, then, not nominated for<br>
> 17.1 intentionally ?<br>
><br>
<br>
</div>As we are preparing a new 17.1 release, gently pinging.</blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">Gfx9 fixups are 17.2 only.</div><div dir="auto"><br></div><div dir="auto">Dave.</div><div dir="auto"><br></div><div dir="auto"></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><font color="#888888"><br>
<br>
        J.A.<br>
</font><div class="elided-text"><br>
> Br.<br>
><br>
> On Thu, 2017-08-17 at 14:27 +1000, Dave Airlie wrote:<br>
> > From: Dave Airlie <<a href="mailto:airlied@redhat.com">airlied@redhat.com</a>><br>
> ><br>
> > GFX9 moved where the viewport index export goes.<br>
> ><br>
> > Signed-off-by: Dave Airlie <<a href="mailto:airlied@redhat.com">airlied@redhat.com</a>><br>
> > ---<br>
> >  src/amd/common/ac_nir_to_llvm.<wbr>c | 32 +++++++++++++++++++++++++-----<wbr>--<br>
> >  1 file changed, 25 insertions(+), 7 deletions(-)<br>
> ><br>
> > diff --git a/src/amd/common/ac_nir_to_<wbr>llvm.c b/src/amd/common/ac_nir_to_<wbr>llvm.c<br>
> > index 7aa7567..a17a232 100644<br>
> > --- a/src/amd/common/ac_nir_to_<wbr>llvm.c<br>
> > +++ b/src/amd/common/ac_nir_to_<wbr>llvm.c<br>
> > @@ -5518,11 +5518,11 @@ handle_vs_outputs_post(struct nir_to_llvm_context *ctx,<br>
> >                                                  ctx->nir->outputs[radeon_llvm_<wbr>reg_index_soa(VARYING_SLOT_<wbr>VIEWPORT, 0)], "");<br>
> >     }<br>
> ><br>
> > -   uint32_t mask = ((outinfo->writes_pointsize == true ? 1 : 0) |<br>
> > -                    (outinfo->writes_layer == true ? 4 : 0) |<br>
> > -                    (outinfo->writes_viewport_<wbr>index == true ? 8 : 0));<br>
> > -   if (mask) {<br>
> > -           pos_args[1].enabled_channels = mask;<br>
> > +   if (outinfo->writes_pointsize ||<br>
> > +       outinfo->writes_layer ||<br>
> > +       outinfo->writes_viewport_<wbr>index) {<br>
> > +           pos_args[1].enabled_channels = ((outinfo->writes_pointsize == true ? 1 : 0) |<br>
> > +                                           (outinfo->writes_layer == true ? 4 : 0));<br>
> >             pos_args[1].valid_mask = 0;<br>
> >             pos_args[1].done = 0;<br>
> >             pos_args[1].target = V_008DFC_SQ_EXP_POS + 1;<br>
> > @@ -5536,8 +5536,26 @@ handle_vs_outputs_post(struct nir_to_llvm_context *ctx,<br>
> >                     pos_args[1].out[0] = psize_value;<br>
> >             if (outinfo->writes_layer == true)<br>
> >                     pos_args[1].out[2] = layer_value;<br>
> > -           if (outinfo->writes_viewport_<wbr>index == true)<br>
> > -                   pos_args[1].out[3] = viewport_index_value;<br>
> > +           if (outinfo->writes_viewport_<wbr>index == true) {<br>
> > +                   if (ctx->options->chip_class >= GFX9) {<br>
> > +                           /* GFX9 has the layer in out.z[10:0] and the viewport<br>
> > +                            * index in out.z[19:16].<br>
> > +                            */<br>
> > +                           LLVMValueRef v = viewport_index_value;<br>
> > +                           v = to_integer(&ctx->ac, v);<br>
> > +                           v = LLVMBuildShl(ctx->builder, v,<br>
> > +                                            LLVMConstInt(ctx->i32, 16, false),<br>
> > +                                            "");<br>
> > +                           v = LLVMBuildOr(ctx->builder, v,<br>
> > +                                           to_integer(&ctx->ac, pos_args[1].out[2]), "");<br>
> > +<br>
> > +                           pos_args[1].out[2] = to_float(&ctx->ac, v);<br>
> > +                           pos_args[1].enabled_channels |= 1 << 2;<br>
> > +                   } else {<br>
> > +                           pos_args[1].out[3] = viewport_index_value;<br>
> > +                           pos_args[1].enabled_channels |= 1 << 3;<br>
> > +                   }<br>
> > +           }<br>
> >     }<br>
> >     for (i = 0; i < 4; i++) {<br>
> >             if (pos_args[i].out[0])<br>
</div><div class="elided-text">______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</div></blockquote></div><br></div></div></div>