nir: Add a lowering pass for backends wanting load_ubo with vec4 offsets.
authorEric Anholt <eric@anholt.net>
Tue, 18 Aug 2020 18:38:41 +0000 (11:38 -0700)
committerEric Anholt <eric@anholt.net>
Mon, 24 Aug 2020 16:53:35 +0000 (09:53 -0700)
commit73616598bd25764789f858fdadf7c6cd9dccb49c
treec3e77636c008b705e4b23dffed07f13521abce16
parentd84a16e4817c33eb8cf7d47cc15e6a3ee6385cd1
nir: Add a lowering pass for backends wanting load_ubo with vec4 offsets.

This is very common for backends -- r600, freedreno, and nir_to_tgsi all
needed versions of it.  Make a common intrinsic to use for it with a
shared, slightly-tuned-from-ir3 lowering pass.

Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6378>
src/compiler/Makefile.sources
src/compiler/nir/meson.build
src/compiler/nir/nir.h
src/compiler/nir/nir_intrinsics.py
src/compiler/nir/nir_lower_ubo_vec4.c [new file with mode: 0644]
src/compiler/nir/nir_validate.c