<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sat, Mar 10, 2018 at 10:18 AM, Jason Ekstrand <span dir="ltr"><<a href="mailto:jason@jlekstrand.net" target="_blank">jason@jlekstrand.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This tiny series moves the pass that Bas wrote for lowering vote<br>
instructions to ballots into common code.  As you can see from the diffstat<br>
below, it cuts the size of the pass in half by removing boilerplate.  The<br>
new version (in nir_lower_subgroups) also contains two bugfixes:<br>
<br>
 1) The old pass wasn't actually inserting the RFI instruction<br>
<br>
 2) The old pass wouldn't handle NaN correctly in feq because it switched<br>
    to effectively using ineg(fne(a, b)) which is not the same as feq(a, b)<br>
    when NaN is present.<br>
<br>
This has not been tested at all beyond compile-testing (and I didn't even<br>
compile-test radv).<br></blockquote><div><br></div><div>I hacked up anv to use it and ran the subgroups tests from the 1.1 CTS.  This pointed out some bugs which I've now fixed and I sent a v2 which works at least for anv.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Cc: Bas Nieuwenhuizen <<a href="mailto:bas@basnieuwenhuizen.nl">bas@basnieuwenhuizen.nl</a>><br>
Cc: Timothy Arceri <<a href="mailto:tarceri@itsqueeze.com">tarceri@itsqueeze.com</a>><br>
<br>
Jason Ekstrand (2):<br>
  nir/subgroups: Add lowering for vote_ieq/vote_feq to a ballot<br>
  ac/nir: Use lower_vote_eq_to_ballot instead of ac_nir_lower_subgroups<br>
<br>
 src/amd/Makefile.sources                     |  1 -<br>
 src/amd/common/ac_lower_<wbr>subgroups.c          | 92 ----------------------------<br>
 src/amd/common/ac_nir_to_llvm.<wbr>c              |  3 -<br>
 src/amd/common/ac_nir_to_llvm.<wbr>h              |  2 -<br>
 src/amd/common/meson.build                   |  1 -<br>
 src/compiler/nir/nir.h                       |  1 +<br>
 src/compiler/nir/nir_lower_<wbr>subgroups.c       | 48 +++++++++++++++<br>
 src/gallium/drivers/radeonsi/<wbr>si_shader_nir.c |  1 +<br>
 8 files changed, 50 insertions(+), 99 deletions(-)<br>
 delete mode 100644 src/amd/common/ac_lower_<wbr>subgroups.c<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
2.5.0.400.gff86faf<br>
<br>
</font></span></blockquote></div><br></div></div>