panfrost: Use nir_gather_info information about discards

No need to track this ourselves!

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
This commit is contained in:
Alyssa Rosenzweig 2019-07-23 16:52:40 -07:00
parent 48991c7a1f
commit bab4f6c724
4 changed files with 1 additions and 9 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -89,7 +89,6 @@ typedef struct {
unsigned varyings[32];
/* Boolean properties of the program */
bool can_discard;
bool writes_point_size;
int first_tag;