<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Apr 4, 2018 at 4:16 PM, Caio Marcelo de Oliveira Filho <span dir="ltr"><<a href="mailto:caio.oliveira@intel.com" target="_blank">caio.oliveira@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">In the emit_copies() function, the use of "newv" and "temp" names made<br>
sense when only copies from temporaries to the new variables were<br>
being done. But now there are other calls to copy with other pairings,<br>
and "temp" doesn't always refer to a temporary created in this<br>
pass. Use the names "dest" and "src" instead.<br>
---<br>
 .../nir/nir_lower_io_to_<wbr>temporaries.c         | 22 +++++++++----------<br>
 1 file changed, 11 insertions(+), 11 deletions(-)<br>
<br>
diff --git a/src/compiler/nir/nir_lower_<wbr>io_to_temporaries.c b/src/compiler/nir/nir_lower_<wbr>io_to_temporaries.c<br>
index 301ba65892..c3e1207f4e 100644<br>
--- a/src/compiler/nir/nir_lower_<wbr>io_to_temporaries.c<br>
+++ b/src/compiler/nir/nir_lower_<wbr>io_to_temporaries.c<br>
@@ -40,34 +40,34 @@ struct lower_io_state {<br>
 };<br>
<br>
 static void<br>
-emit_copies(nir_cursor cursor, nir_shader *shader, struct exec_list *new_vars,<br>
-          struct exec_list *old_vars)<br>
+emit_copies(nir_cursor cursor, nir_shader *shader, struct exec_list *dest_vars,<br>
+            struct exec_list *src_vars)<br>
 {<br>
-   assert(exec_list_length(new_<wbr>vars) == exec_list_length(old_vars));<br>
+   assert(exec_list_length(dest_<wbr>vars) == exec_list_length(src_vars));<br>
<br>
-   foreach_two_lists(new_node, new_vars, old_node, old_vars) {<br>
-      nir_variable *newv = exec_node_data(nir_variable, new_node, node);<br>
-      nir_variable *temp = exec_node_data(nir_variable, old_node, node);<br>
+   foreach_two_lists(new_node, dest_vars, old_node, src_vars) {<br>
+      nir_variable *dest = exec_node_data(nir_variable, new_node, node);<br>
+      nir_variable *src = exec_node_data(nir_variable, old_node, node);<br></blockquote><div><br></div><div>We probably want to use src_node and dst_node here.<br><br></div><div>Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br><br></div><div>I've made the above change and will push once Jenkins comes back one more time.<br><br></div><div>--Jason<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
       /* No need to copy the contents of a non-fb_fetch_output output variable<br>
        * to the temporary allocated for it, since its initial value is<br>
        * undefined.<br>
        */<br>
-      if (temp->data.mode == nir_var_shader_out &&<br>
-          !temp->data.fb_fetch_output)<br>
+      if (src->data.mode == nir_var_shader_out &&<br>
+          !src->data.fb_fetch_output)<br>
          continue;<br>
<br>
       /* Can't copy the contents of the temporary back to a read-only<br>
        * interface variable.  The value of the temporary won't have been<br>
        * modified by the shader anyway.<br>
        */<br>
-      if (newv->data.read_only)<br>
+      if (dest->data.read_only)<br>
          continue;<br>
<br>
       nir_intrinsic_instr *copy =<br>
          nir_intrinsic_instr_create(<wbr>shader, nir_intrinsic_copy_var);<br>
-      copy->variables[0] = nir_deref_var_create(copy, newv);<br>
-      copy->variables[1] = nir_deref_var_create(copy, temp);<br>
+      copy->variables[0] = nir_deref_var_create(copy, dest);<br>
+      copy->variables[1] = nir_deref_var_create(copy, src);<br>
<br>
       nir_instr_insert(cursor, &copy->instr);<br>
    }<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></div>