From: Eric Anholt Date: Thu, 2 Aug 2018 18:12:37 +0000 (-0700) Subject: v3d: Avoid spilling that breaks the r5 usage after a ldvary. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=50a8713d4f90a6c70a23f9f5871420371df283a7;p=mesa.git v3d: Avoid spilling that breaks the r5 usage after a ldvary. Fixes bad rendering when forcing 2 spills in glxgears. Cc: "18.2" --- diff --git a/src/broadcom/compiler/vir_register_allocate.c b/src/broadcom/compiler/vir_register_allocate.c index bc34f68e59a..accc07a3a33 100644 --- a/src/broadcom/compiler/vir_register_allocate.c +++ b/src/broadcom/compiler/vir_register_allocate.c @@ -94,6 +94,15 @@ v3d_choose_spill_node(struct v3d_compile *c, struct ra_graph *g, } } + /* Refuse to spill a ldvary's dst, because that means + * that ldvary's r5 would end up being used across a + * thrsw. + */ + if (inst->qpu.sig.ldvary) { + assert(inst->dst.file == QFILE_TEMP); + BITSET_CLEAR(c->spillable, inst->dst.index); + } + if (inst->is_last_thrsw) started_last_seg = true;