diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-07-23 16:52:40 -0700 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-07-25 06:34:21 -0700 |
commit | bab4f6c724d384cfee7e7f98ff3b52648850641d (patch) | |
tree | 195f09a7a369a14ecb3228fac1a5b576440e4c0c /src/panfrost | |
parent | 48991c7a1f07dc00821e3505b5d13ffdd1143e07 (diff) |
panfrost: Use nir_gather_info information about discards
No need to track this ourselves!
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/panfrost')
-rw-r--r-- | src/panfrost/midgard/compiler.h | 3 | ||||
-rw-r--r-- | src/panfrost/midgard/midgard_compile.c | 4 | ||||
-rw-r--r-- | src/panfrost/midgard/midgard_compile.h | 1 |
3 files changed, 0 insertions, 8 deletions
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; |