<div dir="ltr"><div>Connor wrote *exactly* the same patch:<br><br><a href="http://lists.freedesktop.org/archives/mesa-dev/2015-January/074522.html">http://lists.freedesktop.org/archives/mesa-dev/2015-January/074522.html</a><br><br></div>This version can have my R-B too.  And, fwiw, I like your commit message better.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 21, 2015 at 5:25 PM, Eric Anholt <span dir="ltr"><<a href="mailto:eric@anholt.net" target="_blank">eric@anholt.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">brw_fs_nir has only seen scalar bools so far, thanks to vector splitting,<br>
and the ralloc of in glsl_to_nir.cpp will *usually* get you a 0-filled<br>
chunk of memory, so reading too large of a value will usually get you the<br>
right bool value.  But once we start doing vector bools in a few commits,<br>
we end up getting bad values.<br>
---<br>
 src/glsl/nir/nir_lower_vars_to_ssa.c | 2 +-<br>
 1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/src/glsl/nir/nir_lower_vars_to_ssa.c b/src/glsl/nir/nir_lower_vars_to_ssa.c<br>
index 089f0d5..03967e3 100644<br>
--- a/src/glsl/nir/nir_lower_vars_to_ssa.c<br>
+++ b/src/glsl/nir/nir_lower_vars_to_ssa.c<br>
@@ -600,7 +600,7 @@ get_const_initializer_load(const nir_deref_var *deref,<br>
          load->value.u[i] = constant->value.u[matrix_offset + i];<br>
          break;<br>
       case GLSL_TYPE_BOOL:<br>
-         load->value.u[i] = constant->value.u[matrix_offset + i] ?<br>
+         load->value.u[i] = constant->value.b[matrix_offset + i] ?<br>
                              NIR_TRUE : NIR_FALSE;<br>
          break;<br>
       default:<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.1.3<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div>