From 666b714a372b27f09dcc0ac6002a485deec62a0a Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Sun, 13 Mar 2022 19:43:18 -0400 Subject: [PATCH] pan/bi: Don't analyze helper reqs in !frag shaders Waste of time, and possibly invalid too. Signed-off-by: Alyssa Rosenzweig Cc: mesa-stable Part-of: --- src/panfrost/bifrost/bifrost_compile.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c index bf0da824c32..b9b1b853306 100644 --- a/src/panfrost/bifrost/bifrost_compile.c +++ b/src/panfrost/bifrost/bifrost_compile.c @@ -4130,8 +4130,11 @@ bi_compile_variant_nir(nir_shader *nir, /* Analyze before register allocation to avoid false dependencies. The * skip bit is a function of only the data flow graph and is invariant - * under valid scheduling. */ - bi_analyze_helper_requirements(ctx); + * under valid scheduling. Helpers are only defined for fragment + * shaders, so this analysis is only required in fragment shaders. + */ + if (ctx->stage == MESA_SHADER_FRAGMENT) + bi_analyze_helper_requirements(ctx); /* Fuse TEXC after analyzing helper requirements so the analysis * doesn't have to know about dual textures */