<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 28, 2014 at 12:29 PM, Matt Turner <span dir="ltr"><<a href="mailto:mattst88@gmail.com" target="_blank">mattst88@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Tue, Oct 28, 2014 at 12:10 PM, Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>> wrote:<br>
><br>
> On Oct 28, 2014 11:57 AM, "Matt Turner" <<a href="mailto:mattst88@gmail.com">mattst88@gmail.com</a>> wrote:<br>
>><br>
>> On Thu, Oct 16, 2014 at 3:40 PM, Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br>
>> wrote:<br>
>> > Before, we used the a signed d-word for booleans and the immedates we<br>
>> > emitted varried between signed and unsigned. This commit changes the<br>
>> > type<br>
>> > to unsigned (I think that makes more sense) and makes immediates more<br>
>> > consistent. This allows copy propagation to work better cleans up some<br>
>> > instructions.<br>
>> ><br>
>> > total instructions in shared programs: 5473519 -> 5465864 (-0.14%)<br>
>> > instructions in affected programs: 432849 -> 425194 (-1.77%)<br>
>> > GAINED: 27<br>
>> > LOST: 0<br>
>><br>
>> I assumed at first that this was on Haswell, but it couldn't be<br>
>> because Haswell doesn't use 0/1 for boolean. What platform was this?<br>
><br>
> It doesn't matter what form of booleans the arch uses. I believe it was on<br>
> HSW.<br>
<br>
</span>It's unclear to me how you're coming to that conclusion. None of the<br>
hunks in brw_fs_visitor.cpp affect platforms where<br>
Const.UniformBooleanTrue != 1.<br></blockquote><div><br></div><div>Not true. The real problem we were hitting was when we emitted a value from an ir_constant. In this case, we emitted it as a copy from unsigned to signed regardless of your platform. That was what was causing us extra instructions. Most of the other changes are purely cosmetic because I decided to unify on UD rather than D.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I suppose the meaningful change in this patch for those platforms is<br>
the one in brw_shader.cpp.<br>
<span class=""><br>
> However, as I have mentioned in private, I've had trouble running<br>
> shaderdb and believing the results. They could be bogus but I don't think<br>
> so.<br>
<br>
</span>Also unclear to me how you could not when I just tested it myself.<br>
</blockquote></div><br></div><div class="gmail_extra">Re-running shader-db myself...<br><br></div><div class="gmail_extra">--Jason<br></div></div>