From 67c5db9b9f65da7dc79b3b3e4a8e3c672302b397 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 11 Dec 2020 14:36:47 -0800 Subject: [PATCH] gallium/ntt: Drop comment about needing loop label setup. BRK/CONT don't take a label, as shown by tgsi_opcode_tmp.h and the lack of any users of a label on those instructions in tree. I can't find any user of ENDLOOP's label. Additionally, GLSL-to-TGSI apparently never set up the BGNLOOP label, so even nvfx's usage probably wants us to not set it. Reviewed-by: Gert Wollny Part-of: --- src/gallium/auxiliary/nir/nir_to_tgsi.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/gallium/auxiliary/nir/nir_to_tgsi.c b/src/gallium/auxiliary/nir/nir_to_tgsi.c index c73a3257704..9769dcbb95b 100644 --- a/src/gallium/auxiliary/nir/nir_to_tgsi.c +++ b/src/gallium/auxiliary/nir/nir_to_tgsi.c @@ -48,8 +48,6 @@ struct ntt_compile { bool addr_declared[2]; struct ureg_dst addr_reg[2]; - unsigned loop_label; - /* if condition set up at the end of a block, for ntt_emit_if(). */ struct ureg_src if_cond; @@ -2086,20 +2084,16 @@ ntt_emit_if(struct ntt_compile *c, nir_if *if_stmt) static void ntt_emit_loop(struct ntt_compile *c, nir_loop *loop) { - unsigned last_loop_label = c->loop_label; - + /* GLSL-to-TGSI never set the begin/end labels to anything, even though nvfx + * does reference BGNLOOP's. Follow the former behavior unless something comes up + * with a need. + */ unsigned begin_label; ureg_BGNLOOP(c->ureg, &begin_label); ntt_emit_cf_list(c, &loop->body); - /* XXX: Need to set cont/break labels for svga, nv30, nv50. - * - * ureg_fixup_label(c->ureg, label, ureg_get_instruction_number(c->ureg)); - */ unsigned end_label; ureg_ENDLOOP(c->ureg, &end_label); - - c->loop_label = last_loop_label; } static void