broadcom/compiler: disallow spilling if TMU pipelining was enabled

TMU pipelining makes TMU spilling difficult and can easily lead to
doing large amounts of spills to compile a shader. It is best to
only use pipelining if we can compile without spilling.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8825>
This commit is contained in:
Iago Toral Quiroga 2021-02-02 09:20:47 +01:00 committed by Marge Bot
parent e18d6bbf2f
commit 0f90b729fb

View file

@ -737,9 +737,12 @@ v3d_register_allocate(struct v3d_compile *c, bool *spilled)
break;
/* Don't emit spills using the TMU until we've dropped
* thread count first.
* thread count first. Also, don't spill if we have
* enabled TMU pipelining, as that can make TMU spilling
* pretty terrible.
*/
if (is_uniform || thread_index == 0) {
if (is_uniform ||
(thread_index == 0 && c->disable_tmu_pipelining)) {
v3d_spill_reg(c, map[node].temp);
/* Ask the outer loop to call back in. */