diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-06-10 08:21:24 -0700 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-06-10 08:23:08 -0700 |
commit | e9703fb4162e85943c52b6559d3554b521125da4 (patch) | |
tree | d406f99c7ae2370cb945b9c5195a51b709c76ec1 /src | |
parent | e9316fdfd4899c269a19e106a6ffa4309ae48b27 (diff) |
panfrost: Ignore discards in dead branch analysis
Fixes regressions in
dEQP-GLES2.functional.shaders.discard.dynamic_loop_*
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/panfrost/midgard/midgard_compile.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/panfrost/midgard/midgard_compile.c b/src/gallium/drivers/panfrost/midgard/midgard_compile.c index bc9521aa9ed..4ea8834de2b 100644 --- a/src/gallium/drivers/panfrost/midgard/midgard_compile.c +++ b/src/gallium/drivers/panfrost/midgard/midgard_compile.c @@ -1731,6 +1731,11 @@ midgard_opt_cull_dead_branch(compiler_context *ctx, midgard_block *block) * just generally special */ if (ins->prepacked_branch) continue; + /* Discards are similarly special and may not correspond to the + * end of a block */ + + if (ins->branch.target_type == TARGET_DISCARD) continue; + if (branched) { /* We already branched, so this is dead */ mir_remove_instruction(ins); |