From 77f58b46d9f20af89e74d1301e4220b5e48fa8be Mon Sep 17 00:00:00 2001 From: Iago Toral Quiroga Date: Mon, 7 Mar 2022 14:03:03 +0100 Subject: [PATCH] broadcom/compiler: add comment on why we don't use r5 with ldunifa MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Alejandro Piñeiro Part-of: --- src/broadcom/compiler/vir_register_allocate.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/broadcom/compiler/vir_register_allocate.c b/src/broadcom/compiler/vir_register_allocate.c index 4862f42..46c7e52 100644 --- a/src/broadcom/compiler/vir_register_allocate.c +++ b/src/broadcom/compiler/vir_register_allocate.c @@ -916,6 +916,11 @@ update_graph_and_reg_classes_for_inst(struct v3d_compile *c, int *acc_nodes, if (inst->dst.file == QFILE_TEMP) { /* Only a ldunif gets to write to R5, which only has a * single 32-bit channel of storage. + * + * NOTE: ldunifa is subject to the same, however, going by + * shader-db it is best to keep r5 exclusive to ldunif, probably + * because ldunif has usually a shorter lifespan, allowing for + * more accumulator reuse and QPU merges. */ if (!inst->qpu.sig.ldunif) { uint8_t class_bits = -- 2.7.4