panfrost: Handle !independent_blend for blend shaders
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fri, 15 May 2020 16:19:22 +0000 (12:19 -0400)
committerMarge Bot <eric+marge@anholt.net>
Fri, 22 May 2020 18:05:14 +0000 (18:05 +0000)
Fixes MRT blending.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5153>

src/gallium/drivers/panfrost/pan_blend_shaders.c

index a639e66c1cb6a64a06b337cdee4d143419284d4f..079080879a9443bb643f334fc1e8a947d1c6cc65 100644 (file)
@@ -85,6 +85,9 @@ nir_make_options(const struct pipe_blend_state *blend, unsigned i)
 
         options.logicop_enable = false;
 
+        if (!blend->independent_blend_enable)
+                i = 0;
+
         /* If blend is disabled, we just use replace mode */
 
         nir_lower_blend_channel rgb = {