<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Wed, Nov 7, 2018 at 4:06 PM Kenneth Graunke <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wednesday, November 7, 2018 1:45:59 PM PST Jason Ekstrand wrote:<br>
> On Wed, Nov 7, 2018 at 12:20 PM Kenneth Graunke <<a href="mailto:kenneth@whitecape.org" target="_blank">kenneth@whitecape.org</a>><br>
> wrote:<br>
> <br>
> > On Saturday, October 20, 2018 10:55:44 AM PST Jason Ekstrand wrote:<br>
> > > @@ -553,14 +552,18 @@<br>
> > fs_visitor::optimize_frontfacing_ternary(nir_alu_instr *instr,<br>
> > > if (src0->intrinsic != nir_intrinsic_load_front_face)<br>
> > > return false;<br>
> > ><br>
> > > - nir_const_value *value1 = nir_src_as_const_value(instr->src[1].src);<br>
> > > - if (!value1 || fabsf(value1->f32[0]) != 1.0f)<br>
> > > + if (!nir_src_is_const(instr->src[1].src) ||<br>
> > > + !nir_src_is_const(instr->src[2].src))<br>
> > > return false;<br>
> > ><br>
> > > - nir_const_value *value2 = nir_src_as_const_value(instr->src[2].src);<br>
> > > - if (!value2 || fabsf(value2->f32[0]) != 1.0f)<br>
> > > + const float value1 = nir_src_as_float(instr->src[1].src);<br>
> > > + const float value2 = nir_src_as_float(instr->src[2].src);<br>
> > > + if (fabsf(value1) != 1.0f || fabsf(value2) != 1.0f)<br>
> > > return false;<br>
> > ><br>
> > > + /* nir_opt_algebraic should have gotten rid of bcsel(b, a, a) */<br>
> > > + assert(value1 == -value2);<br>
> > > +<br>
> ><br>
> > This is likely true, but it doesn't seem like this belongs in this<br>
> > refactoring patch - we weren't doing it before, and no new code appears<br>
> > to depend on the condition.<br>
> <br>
> <br>
> Right. No *new* code does; but old code definitely does. Mind if I just<br>
> make it a separate commit?<br>
<br>
Sure, that's fine, feel free to put my R-b on that one as well.<br></blockquote><div><br></div><div>Cool. Will do. I'll push once Jenkins is happy. <br></div></div></div>