pan/mdg: Remove texture_op_count
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 12 May 2020 17:36:51 +0000 (13:36 -0400)
committerMarge Bot <eric+marge@anholt.net>
Tue, 12 May 2020 22:30:41 +0000 (22:30 +0000)
Was used as a crude approximation of the terminate flag, which we now
can do properly.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5014>

src/panfrost/midgard/compiler.h
src/panfrost/midgard/midgard_compile.c
src/panfrost/midgard/midgard_derivatives.c
src/panfrost/midgard/midgard_emit.c

index bf125369fde8dc2d392fbbd8f53c6264621b460e..2fe0d15aa324ac8a5d095cce8388fea79e202d1c 100644 (file)
@@ -274,10 +274,6 @@ typedef struct compiler_context {
          * register pressure */
         int work_registers;
 
-        /* Used for cont/last hinting. Increase when a tex op is added.
-         * Decrease when a tex op is removed. */
-        int texture_op_count;
-
         /* The number of uniforms allowable for the fast path */
         int uniform_cutoff;
 
index e144dd72b2a78bed66a21f54dc6ac9cfe12e680e..43e92a9f08ed0c3af6523ef3b92931a7c3e373f8 100644 (file)
@@ -1917,9 +1917,6 @@ emit_texop_native(compiler_context *ctx, nir_tex_instr *instr,
         }
 
         emit_mir_instruction(ctx, ins);
-
-        /* Used for .cont and .last hinting */
-        ctx->texture_op_count++;
 }
 
 static void
index 6ccf2b1de440edcf7490732ff0abd8cde1c6d16b..cfb3c08b295d3f0db5d73051fffe71b3aa2340fe 100644 (file)
@@ -119,9 +119,6 @@ midgard_emit_derivatives(compiler_context *ctx, nir_alu_instr *instr)
                 ins.mask &= instr->dest.write_mask;
 
         emit_mir_instruction(ctx, ins);
-
-        /* TODO: Set .cont/.last automatically via dataflow analysis */
-        ctx->texture_op_count++;
 }
 
 void
@@ -158,9 +155,6 @@ midgard_lower_derivatives(compiler_context *ctx, midgard_block *block)
                 /* Insert the new instruction */
                 mir_insert_instruction_before(ctx, mir_next_op(ins), dup);
 
-                /* TODO: Set .cont/.last automatically via dataflow analysis */
-                ctx->texture_op_count++;
-
                 /* We'll need both instructions to write to the same index, so
                  * rewrite to use a register */
 
index b62052b1317cf4117a3e477f16e3d9a995beb97e..b0bb319103965b3a3098ff1b5f6bfc79529ce56d 100644 (file)
@@ -505,8 +505,6 @@ emit_binary_bundle(compiler_context *ctx,
                 ins->texture.in_reg_full = (isz == 32);
                 ins->texture.sampler_type = midgard_sampler_type(ins->dest_type);
 
-                ctx->texture_op_count--;
-
                 if (mir_op_computes_derivatives(ctx->stage, ins->texture.op)) {
                         ins->texture.cont = !ins->helper_terminate;
                         ins->texture.last = ins->helper_terminate || ins->helper_execute;