<div dir="ltr">Whoops, that should be "radeonsi with radeonsi_enable_nir=true" since NIR isn't enabled by default yet.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, May 2, 2019 at 9:35 PM Connor Abbott <<a href="mailto:cwabbott0@gmail.com">cwabbott0@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>This will crash at runtime, since it'll construct a "struct transform" with all NULL pointers, and then the loop below in ${pass_name}_block() will see that there's one transform in the array since it uses ARRAY_SIZE and then crash trying to access it.</div><div><br></div><div>Running piglit with i965, or radeonsi will reproduce the crash.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, May 2, 2019 at 7:52 PM Brian Paul <<a href="mailto:brianp@vmware.com" target="_blank">brianp@vmware.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">This fixes a build failure with MSVC.<br>
<br>
---<br>
<br>
I've compiled tested this, but not sure how to runtime test it.<br>
---<br>
 src/compiler/nir/nir_algebraic.py | 3 +++<br>
 1 file changed, 3 insertions(+)<br>
<br>
diff --git a/src/compiler/nir/nir_algebraic.py b/src/compiler/nir/nir_algebraic.py<br>
index 6db749e..dc25421 100644<br>
--- a/src/compiler/nir/nir_algebraic.py<br>
+++ b/src/compiler/nir/nir_algebraic.py<br>
@@ -997,6 +997,9 @@ static const struct transform ${pass_name}_state${state_id}_xforms[] = {<br>
 % for i in state_xforms:<br>
   { ${xforms[i].search.c_ptr(cache)}, ${xforms[i].replace.c_value_ptr(cache)}, ${xforms[i].condition_index} },<br>
 % endfor<br>
+% if state_xforms == []: # avoid empty initializers for MSVC<br>
+  0<br>
+% endif<br>
 };<br>
 % endfor<br>
<br>
-- <br>
2.7.4<br>
<br>
_______________________________________________<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/mailman/listinfo/mesa-dev</a></blockquote></div>
</blockquote></div>