gallium/ntt: Drop comment about needing loop label setup.
authorEric Anholt <eric@anholt.net>
Fri, 11 Dec 2020 22:36:47 +0000 (14:36 -0800)
committerMarge Bot <eric+marge@anholt.net>
Fri, 8 Jan 2021 21:04:31 +0000 (21:04 +0000)
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 <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8373>

src/gallium/auxiliary/nir/nir_to_tgsi.c

index c73a325..9769dcb 100644 (file)
@@ -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