aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/drivers/panfrost/pan_assemble.c2
-rw-r--r--src/panfrost/midgard/compiler.h3
-rw-r--r--src/panfrost/midgard/midgard_compile.c4
-rw-r--r--src/panfrost/midgard/midgard_compile.h1
4 files changed, 1 insertions, 9 deletions
diff --git a/src/gallium/drivers/panfrost/pan_assemble.c b/src/gallium/drivers/panfrost/pan_assemble.c
index 334ea83305a..75158089c88 100644
--- a/src/gallium/drivers/panfrost/pan_assemble.c
+++ b/src/gallium/drivers/panfrost/pan_assemble.c
@@ -91,7 +91,7 @@ panfrost_shader_compile(struct panfrost_context *ctx, struct mali_shader_meta *m
meta->varying_count = program.varying_count;
meta->midgard1.work_count = program.work_register_count;
- state->can_discard = program.can_discard;
+ state->can_discard = s->info.fs.uses_discard;
state->writes_point_size = program.writes_point_size;
state->reads_point_coord = false;
state->helper_invocations = s->info.fs.needs_helper_invocations;
diff --git a/src/panfrost/midgard/compiler.h b/src/panfrost/midgard/compiler.h
index a3e174cb30c..2d5f07451a5 100644
--- a/src/panfrost/midgard/compiler.h
+++ b/src/panfrost/midgard/compiler.h
@@ -244,9 +244,6 @@ typedef struct compiler_context {
/* Mapping of texture register -> SSA index for unaliasing */
int texture_index[2];
- /* If any path hits a discard instruction */
- bool can_discard;
-
/* 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 5e5356ff72b..251eaed44e0 100644
--- a/src/panfrost/midgard/midgard_compile.c
+++ b/src/panfrost/midgard/midgard_compile.c
@@ -1248,8 +1248,6 @@ emit_intrinsic(compiler_context *ctx, nir_intrinsic_instr *instr)
struct midgard_instruction discard = v_branch(conditional, false);
discard.branch.target_type = TARGET_DISCARD;
emit_mir_instruction(ctx, discard);
-
- ctx->can_discard = true;
break;
}
@@ -2702,8 +2700,6 @@ midgard_compile_shader_nir(struct midgard_screen *screen, nir_shader *nir, midga
/* Deal with off-by-one related to the fencepost problem */
program->work_register_count = ctx->work_registers + 1;
-
- program->can_discard = ctx->can_discard;
program->uniform_cutoff = ctx->uniform_cutoff;
program->blend_patch_offset = ctx->blend_constant_offset;
diff --git a/src/panfrost/midgard/midgard_compile.h b/src/panfrost/midgard/midgard_compile.h
index 2c86ccbca7b..f76715e7a53 100644
--- a/src/panfrost/midgard/midgard_compile.h
+++ b/src/panfrost/midgard/midgard_compile.h
@@ -89,7 +89,6 @@ typedef struct {
unsigned varyings[32];
/* Boolean properties of the program */
- bool can_discard;
bool writes_point_size;
int first_tag;