nir: Add ability to lower non-const quad broadcasts to const ones

Graphics / Mesa 3D Graphics Library / Mesa - Timur Kristóf [gmail.com] - 12 March 2020 13:16 EDT

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

ec16535b493 nir: Add ability to lower non-const quad broadcasts to const ones.
src/compiler/nir/nir.h | 1 +
src/compiler/nir/nir_lower_subgroups.c | 42 +++++++++++++++++++++++++++++++++-
2 files changed, 42 insertions(+), 1 deletion(-)

Upstream: cgit.freedesktop.org


  • Share