pan/bi: Don't analyze helper reqs in !frag shaders

Waste of time, and possibly invalid too.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15461>
This commit is contained in:
Alyssa Rosenzweig 2022-03-13 19:43:18 -04:00 committed by Marge Bot
parent a16163a9fd
commit 666b714a37

View file

@ -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 */