<div dir="ltr"><div>Reviewed-by: Marek Olšák <<a href="mailto:marek.olsak@amd.com">marek.olsak@amd.com</a>></div><div><br></div><div>Marek<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 15, 2018 at 2:34 PM, Rob Clark <span dir="ltr"><<a href="mailto:robdclark@gmail.com" target="_blank">robdclark@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Note, actually fixes 9987a072cb, but the problems don't show up until<br>
19a91841c3.<br>
<br>
Fixes: 19a91841c3 st/mesa: Use Array._DrawVAO in st_atom_array.c.<br>
Fixes: 9987a072cb st/mesa: Make the input_to_index array available.<br>
Signed-off-by: Rob Clark <<a href="mailto:robdclark@gmail.com">robdclark@gmail.com</a>><br>
---<br>
 src/mesa/state_tracker/st_<wbr>program.c | 14 +++++++-------<br>
 1 file changed, 7 insertions(+), 7 deletions(-)<br>
<br>
diff --git a/src/mesa/state_tracker/st_<wbr>program.c b/src/mesa/state_tracker/st_<wbr>program.c<br>
index a52c9f82569..a7671b7fd1d 100644<br>
--- a/src/mesa/state_tracker/st_<wbr>program.c<br>
+++ b/src/mesa/state_tracker/st_<wbr>program.c<br>
@@ -634,13 +634,6 @@ st_create_vp_variant(struct st_context *st,<br>
          fprintf(stderr, "mesa: cannot emulate deprecated features\n");<br>
    }<br>
<br>
-   for (unsigned index = 0; index < vpv->num_inputs; ++index) {<br>
-      unsigned attr = stvp->index_to_input[index];<br>
-      if (attr == ST_DOUBLE_ATTRIB_PLACEHOLDER)<br>
-         continue;<br>
-      vpv->vert_attrib_mask |= 1u << attr;<br>
-   }<br>
-<br>
    if (ST_DEBUG & DEBUG_TGSI) {<br>
       tgsi_dump(vpv->tgsi.tokens, 0);<br>
       debug_printf("\n");<br>
@@ -672,6 +665,13 @@ st_get_vp_variant(struct st_context *st,<br>
       /* create now */<br>
       vpv = st_create_vp_variant(st, stvp, key);<br>
       if (vpv) {<br>
+          for (unsigned index = 0; index < vpv->num_inputs; ++index) {<br>
+             unsigned attr = stvp->index_to_input[index];<br>
+             if (attr == ST_DOUBLE_ATTRIB_PLACEHOLDER)<br>
+                continue;<br>
+             vpv->vert_attrib_mask |= 1u << attr;<br>
+          }<br>
+<br>
          /* insert into list */<br>
          vpv->next = stvp->variants;<br>
          stvp->variants = vpv;<br>
<span class="HOEnZb"><font color="#888888">-- <br>
2.17.0<br>
<br>
______________________________<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>
</font></span></blockquote></div><br></div>