Mesa (master): pan/mdg: Remove texture_op_count
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue May 12 22:54:14 UTC 2020
Module: Mesa
Branch: master
Commit: 69e4d4fabe728e49b22ddcff49153deb3bc43e94
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=69e4d4fabe728e49b22ddcff49153deb3bc43e94
Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date: Tue May 12 13:36:51 2020 -0400
pan/mdg: Remove texture_op_count
Was used as a crude approximation of the terminate flag, which we now
can do properly.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5014>
---
src/panfrost/midgard/compiler.h | 4 ----
src/panfrost/midgard/midgard_compile.c | 3 ---
src/panfrost/midgard/midgard_derivatives.c | 6 ------
src/panfrost/midgard/midgard_emit.c | 2 --
4 files changed, 15 deletions(-)
diff --git a/src/panfrost/midgard/compiler.h b/src/panfrost/midgard/compiler.h
index bf125369fde..2fe0d15aa32 100644
--- a/src/panfrost/midgard/compiler.h
+++ b/src/panfrost/midgard/compiler.h
@@ -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;
diff --git a/src/panfrost/midgard/midgard_compile.c b/src/panfrost/midgard/midgard_compile.c
index e144dd72b2a..43e92a9f08e 100644
--- a/src/panfrost/midgard/midgard_compile.c
+++ b/src/panfrost/midgard/midgard_compile.c
@@ -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
diff --git a/src/panfrost/midgard/midgard_derivatives.c b/src/panfrost/midgard/midgard_derivatives.c
index 6ccf2b1de44..cfb3c08b295 100644
--- a/src/panfrost/midgard/midgard_derivatives.c
+++ b/src/panfrost/midgard/midgard_derivatives.c
@@ -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 */
diff --git a/src/panfrost/midgard/midgard_emit.c b/src/panfrost/midgard/midgard_emit.c
index b62052b1317..b0bb3191039 100644
--- a/src/panfrost/midgard/midgard_emit.c
+++ b/src/panfrost/midgard/midgard_emit.c
@@ -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;
More information about the mesa-commit
mailing list