Mesa (staging/21.2): pan/bi: Don't set td in blend shaders
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Aug 23 17:44:10 UTC 2021
Module: Mesa
Branch: staging/21.2
Commit: 559b5519ad2739f3ee6cbf680e11f81b5a2377eb
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=559b5519ad2739f3ee6cbf680e11f81b5a2377eb
Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date: Wed Aug 18 21:38:07 2021 +0000
pan/bi: Don't set td in blend shaders
This breaks screen-space derivatives in a shader that uses multiple
render targets, if the derivative calculation is scheduled after a BLEND
instruction calling into a blend shader.
Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12478>
(cherry picked from commit 710498e424e31ad4f308f52a03338ac30a70271b)
---
.pick_status.json | 2 +-
src/panfrost/bifrost/bi_helper_invocations.c | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index c02adb96d2f..41e80496fc2 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -310,7 +310,7 @@
"description": "pan/bi: Don't set td in blend shaders",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": null
},
diff --git a/src/panfrost/bifrost/bi_helper_invocations.c b/src/panfrost/bifrost/bi_helper_invocations.c
index a8d2c61c1e2..c9b5b4e3ebf 100644
--- a/src/panfrost/bifrost/bi_helper_invocations.c
+++ b/src/panfrost/bifrost/bi_helper_invocations.c
@@ -133,8 +133,9 @@ void
bi_analyze_helper_terminate(bi_context *ctx)
{
/* Other shader stages do not have a notion of helper threads, so we
- * can skip the analysis */
- if (ctx->stage != MESA_SHADER_FRAGMENT)
+ * can skip the analysis. Don't run for blend shaders, either, since
+ * they run in the context of another shader that we don't see. */
+ if (ctx->stage != MESA_SHADER_FRAGMENT || ctx->inputs->is_blend)
return;
/* Set blocks as directly requiring helpers, and if they do add them to
More information about the mesa-commit
mailing list