nir: Add ability to lower non-const quad broadcasts to const ones.
authorTimur Kristóf <timur.kristof@gmail.com>
Wed, 11 Mar 2020 14:01:56 +0000 (15:01 +0100)
committerMarge Bot <eric+marge@anholt.net>
Thu, 12 Mar 2020 13:16:07 +0000 (13:16 +0000)
commitec16535b493b54c8c039576c0303f324242ae3fb
treed3a91a09f63db60b96a1d4ee5b446d9b15060b42
parent3aa83d809f6dd61e8052d39e5b3cf048c6fb8223
nir: Add ability to lower non-const quad broadcasts to const ones.

Some hardware doesn't support subgroup shuffle, and on such hardware
it makes no sense to lower quad broadcasts to shuffle. Instead, let's
lower them to four const quad broadcasts, paired with bcsel instructions.

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4147>
src/compiler/nir/nir.h
src/compiler/nir/nir_lower_subgroups.c