From 710498e424e31ad4f308f52a03338ac30a70271b Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Wed, 18 Aug 2021 21:38:07 +0000 Subject: [PATCH] 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 Cc: mesa-stable Part-of: --- src/panfrost/bifrost/bi_helper_invocations.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/panfrost/bifrost/bi_helper_invocations.c b/src/panfrost/bifrost/bi_helper_invocations.c index 184796eae74..fbd2ddfa621 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