broadcom/compiler: skip unnecessary unifa writes
authorIago Toral Quiroga <itoral@igalia.com>
Thu, 18 Feb 2021 07:32:13 +0000 (08:32 +0100)
committerMarge Bot <eric+marge@anholt.net>
Tue, 23 Feb 2021 08:08:01 +0000 (08:08 +0000)
commit54c17e45ae8596961b02f356254784c2ef46b9e1
treee2761f4e4ba5c2879e6363544f0e35c2a1e46115
parente1cf2406da9bece65609c087373465b3f827f6f2
broadcom/compiler: skip unnecessary unifa writes

If a new UBO load happens to read exactly at the offset right after the
previous UBO load (something that is fairly common, for example when
reading a matrix), we can skip the unifa write (with its 3 delay slots)
and just continue to call ldunifa to continue reading consecutive addresses.

Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9128>
src/broadcom/compiler/nir_to_vir.c
src/broadcom/compiler/v3d_compiler.h