From 7534a31a11cbde2cd651592f0805c3f2b43e0c96 Mon Sep 17 00:00:00 2001 From: Icecream95 Date: Sat, 6 Jun 2020 15:39:22 +1200 Subject: [PATCH] pan/mdg: Move search_var to earlier in midgard_compile.c It will be needed by the new zs lowering. Reviewed-by: Alyssa Rosenzweig Part-of: --- src/panfrost/midgard/midgard_compile.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/panfrost/midgard/midgard_compile.c b/src/panfrost/midgard/midgard_compile.c index 8865bda0973..ef549848956 100644 --- a/src/panfrost/midgard/midgard_compile.c +++ b/src/panfrost/midgard/midgard_compile.c @@ -253,6 +253,17 @@ midgard_nir_lower_fdot2(nir_shader *shader) return progress; } +static const nir_variable * +search_var(struct exec_list *vars, unsigned driver_loc) +{ + nir_foreach_variable(var, vars) { + if (var->data.driver_location == driver_loc) + return var; + } + + return NULL; +} + /* Flushes undefined values to zero */ static void @@ -1379,17 +1390,6 @@ emit_control_barrier(compiler_context *ctx) emit_mir_instruction(ctx, ins); } -static const nir_variable * -search_var(struct exec_list *vars, unsigned driver_loc) -{ - nir_foreach_variable(var, vars) { - if (var->data.driver_location == driver_loc) - return var; - } - - return NULL; -} - static unsigned mir_get_branch_cond(nir_src *src, bool *invert) { -- 2.30.2