broadcom/compiler: add lowering pass to scalarize non 32-bit general load/store
authorIago Toral Quiroga <itoral@igalia.com>
Tue, 18 Jan 2022 09:59:42 +0000 (10:59 +0100)
committerMarge Bot <emma+marge@anholt.net>
Tue, 25 Jan 2022 09:08:26 +0000 (09:08 +0000)
commit765d9feb468d4047cb30ba35acef235659a6e991
tree7b994cb490cc24a1d2fc9c34bf0bc4b3539118ab
parent05e7e2245bf02c6b04a3b7ed9cefe3b515f522e6
broadcom/compiler: add lowering pass to scalarize non 32-bit general load/store

V3D hardware doesn't support vector access for general TMU load/store
operations like the ones we use for UBO and SSBO, so we need to split
these to scalar operations.

It should be noted that we also have a vectorization pass (which runs
later, during optimization), that may reconstruct some of these into
32-bit operations when possible (i.e. when the resulting operation
is 32-bit aligned).

Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14648>
src/broadcom/compiler/meson.build
src/broadcom/compiler/v3d_compiler.h
src/broadcom/compiler/v3d_nir_lower_load_store_bitsize.c [new file with mode: 0644]
src/broadcom/compiler/vir.c