ac/nir: Add vote_ieq/vote_feq lowering pass.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Mon, 5 Feb 2018 21:54:18 +0000 (22:54 +0100)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Wed, 7 Mar 2018 20:18:32 +0000 (21:18 +0100)
commit97f10934edf8ac02f28fccea0bcbbe9293375357
treed0af38ad0594961185a9f8a2ff31a88caa76fd4e
parentc217607b65ae00918ea86454eb59e6ee69c6ea68
ac/nir: Add vote_ieq/vote_feq lowering pass.

The old vote_eq implementation supported only booleans, but now
we have to support arbitrary values, so use the read_first_invocation
intrinsic + ballot.

I took this as an opportunity to figure out how easy it was to do this
in nir instead of in the nir_to_llvm pass, and it actually turned out
pretty okay IMO. Only creating the pass is some extra code.

Reviewed-by: Dave Airlie <airlied@redhat.com>
src/amd/Makefile.sources
src/amd/common/ac_lower_subgroups.c [new file with mode: 0644]
src/amd/common/ac_nir_to_llvm.c
src/amd/common/ac_nir_to_llvm.h
src/amd/common/meson.build