nir: Make nir_lower_ubo_vec4() handle non-vec4-aligned loads.
authorEric Anholt <eric@anholt.net>
Tue, 8 Sep 2020 18:55:58 +0000 (11:55 -0700)
committerMarge Bot <eric+marge@anholt.net>
Wed, 30 Sep 2020 19:53:43 +0000 (19:53 +0000)
commite3f465580511153daca9ec9085375bd518ed5b24
treea12714b4b17c00f4adeac4a2e979bd40d39983db
parent618556a8cbdf86c31eb359c043cc9c629dc6fc0b
nir: Make nir_lower_ubo_vec4() handle non-vec4-aligned loads.

It turns out I had missed a case in my enumeration of why everything
currently was vec4-aligned.

Fixes a simple testcase of loading from a vec3[2] array in freedreno with
IR3_SHADER_DEBUG=nouboopt.

Initial shader-db results look devastating:

total instructions in shared programs: 8019997 -> 12829370 (59.97%)
total cat6 in shared programs: 87683 -> 145840 (66.33%)

Hopefully this will recover once we introduce the i/o vectorizer, but that
was blocked on getting the vec3 case fixed.

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