summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <alyssa@collabora.com>2022-03-13 19:43:18 -0400
committerDylan Baker <dylan.c.baker@intel.com>2022-03-29 12:21:39 -0700
commit77699bb3bff5106cba92d0d99a9e7aeeeba9f067 (patch)
treecc58e8477b7fd633bf3acc8c6bae470b81196049
parent420717c6eb790a9c1cfad0ec9b8720930c30fcf6 (diff)
downloadmesa-77699bb3bff5106cba92d0d99a9e7aeeeba9f067.tar.gz
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> (cherry picked from commit 666b714a372b27f09dcc0ac6002a485deec62a0a)
-rw-r--r--.pick_status.json2
-rw-r--r--src/panfrost/bifrost/bifrost_compile.c7
2 files changed, 6 insertions, 3 deletions
diff --git a/.pick_status.json b/.pick_status.json
index 6573b47f072..1d6bc260332 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -908,7 +908,7 @@
"description": "pan/bi: Don't analyze helper reqs in !frag shaders",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"because_sha": null
},
{
diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c
index 5f0cf9bff76..18611be7e0d 100644
--- a/src/panfrost/bifrost/bifrost_compile.c
+++ b/src/panfrost/bifrost/bifrost_compile.c
@@ -3886,8 +3886,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 */