lima: dont split vec3 unaligned load inputs
authorErico Nunes <nunes.erico@gmail.com>
Sun, 30 Aug 2020 20:12:23 +0000 (22:12 +0200)
committerMarge Bot <eric+marge@anholt.net>
Sun, 13 Sep 2020 10:09:29 +0000 (10:09 +0000)
commit4868ce1451ffceb65a03ef230da01da639286c2c
tree194c5d7dd76e0dc900daaacf194fe6d334fb98ee
parentbea6290ca090a7be7e7d51c9316cf68337ac4e1f
lima: dont split vec3 unaligned load inputs

It seems that the mali400 pp is unable to load vec3 unaligned varyings.
This can happen in the current state with mesa if a varying float is put
into the first component of a vec4 and a vec3 is packed right after it.
This would be fine as by default nir would create a vec4 load followed
by a mov with swizzle to realign the components into a vec3.
In lima_nir_split_load_input, this becomes a separate vec3 load
expecting the unaligned load.
Since this can't happen, skip the load input splitting for this special
case.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6507>
src/gallium/drivers/lima/ir/lima_nir_split_load_input.c