<div dir="auto"><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Dec 15, 2016 9:45 AM, "Gustaw Smolarczyk" <<a href="mailto:wielkiegie@gmail.com">wielkiegie@gmail.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div class="quoted-text"><div><div class="gmail_extra"><div class="gmail_quote">15 gru 2016 18:19 "Jason Ekstrand"<<a href="mailto:jason@jlekstrand.net" target="_blank">jason@jlekstrand.net</a><wbr>> napisał(a):<br type="attribution"><blockquote class="m_-7792686110926901563quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">---<br>
 src/compiler/nir/nir.h | 5 +++++<br>
 1 file changed, 5 insertions(+)<br>
<br>
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h<br>
index f1c99ce..4a9fe65 100644<br>
--- a/src/compiler/nir/nir.h<br>
+++ b/src/compiler/nir/nir.h<br>
@@ -373,6 +373,11 @@ typedef struct nir_register {<br>
    struct list_head if_uses;<br>
 } nir_register;<br>
<br>
+#define nir_foreach_register(var, reg_list) \<br>
+   foreach_list_typed(nir_regist<wbr>er, reg, node, reg_list)<br></blockquote></div></div></div></div><div dir="auto">Shouldn't the macro definition use the var parameter? Below too.</div></div></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">Yes... The only reason it worked was that I always called the iteration parameter "reg".  Good catch!  I'll Gary that fixed.</div><div dir="auto"><br></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"><div dir="auto"><div dir="auto">Regards,</div><div dir="auto">Gustaw</div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="m_-7792686110926901563quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="quoted-text">
+#define nir_foreach_register_safe(var, reg_list) \<br>
+   foreach_list_typed_safe(nir_r<wbr>egister, reg, node, reg_list)<br>
+<br>
 typedef enum {<br>
    nir_instr_type_alu,<br>
    nir_instr_type_call,<br>
</div><font color="#888888"><font color="#888888">--<br>
2.5.0.400.gff86faf<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">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></font></blockquote></div><br></div></div></div>
</blockquote></div><br></div></div></div>