nir/gl_nir_lower_buffers: Set up align_mul/offset on UBOs.
authorEric Anholt <eric@anholt.net>
Tue, 8 Sep 2020 19:44:30 +0000 (12:44 -0700)
committerMarge Bot <eric+marge@anholt.net>
Wed, 30 Sep 2020 19:53:43 +0000 (19:53 +0000)
commit9c5a793dc72bf6977643b0fc8bf8b1579639d7d7
treec7b51730015f9145b30ba075557637c01fa13044
parentffbfc1ec0eb9190e8e7fa099631917e2987db325
nir/gl_nir_lower_buffers: Set up align_mul/offset on UBOs.

nir_lower_to_explicit_io will give us good alignments if we have the
cast's alignment information known, and it's trivial: Just the offset of
the UBO variable that is at the base of the deref.  Otherwise, explicit io
assumes the load is aligned just to the size of a scalar value in it.

The change in freedreno is in the noise.

Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6612>
src/compiler/glsl/gl_nir_lower_buffers.c