From: Icecream95 Date: Sat, 6 Jun 2020 03:39:22 +0000 (+1200) Subject: pan/mdg: Move search_var to earlier in midgard_compile.c X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7534a31a11cbde2cd651592f0805c3f2b43e0c96;p=mesa.git 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: --- 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) {