Mesa (main): panvk: Pass through alpha_zero_nop/one_store flags

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Oct 26 19:15:31 UTC 2021


Module: Mesa
Branch: main
Commit: 3b146fb466d1e710a7bd3c9e9f5acf02a1e7523b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3b146fb466d1e710a7bd3c9e9f5acf02a1e7523b

Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date:   Sun Oct 24 19:15:26 2021 -0400

panvk: Pass through alpha_zero_nop/one_store flags

When constructing the Internal Blend Descriptor for fixed-function
blending, set the alpha_zero_nop/one_store flags based on the given
equation.

Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Acked-by: Boris Brezillon <boris.brezillon at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13508>

---

 src/panfrost/vulkan/panvk_vX_cs.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/panfrost/vulkan/panvk_vX_cs.c b/src/panfrost/vulkan/panvk_vX_cs.c
index fc39ab834de..a9c7b901c3c 100644
--- a/src/panfrost/vulkan/panvk_vX_cs.c
+++ b/src/panfrost/vulkan/panvk_vX_cs.c
@@ -634,11 +634,17 @@ panvk_per_arch(emit_blend)(const struct panvk_device *dev,
       constant <<= 16 - chan_size;
       cfg.constant = constant;
 
-      if (pan_blend_is_opaque(blend->rts[rt].equation))
+      if (pan_blend_is_opaque(blend->rts[rt].equation)) {
          cfg.internal.mode = MALI_BLEND_MODE_OPAQUE;
-      else
+      } else {
          cfg.internal.mode = MALI_BLEND_MODE_FIXED_FUNCTION;
 
+         cfg.internal.fixed_function.alpha_zero_nop =
+                 pan_blend_alpha_zero_nop(blend->rts[rt].equation);
+         cfg.internal.fixed_function.alpha_one_store =
+                 pan_blend_alpha_one_store(blend->rts[rt].equation);
+      }
+
       /* If we want the conversion to work properly,
        * num_comps must be set to 4
        */



More information about the mesa-commit mailing list