Mesa (main): panfrost: Add valhall_has_blend_shader field

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Apr 7 18:02:37 UTC 2022


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

Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date:   Thu Apr  7 11:32:54 2022 -0400

panfrost: Add valhall_has_blend_shader field

Required in a hot path for silly historical reasons, so add a field to save a
pre-computed value thereof.

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

---

 src/gallium/drivers/panfrost/pan_context.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/gallium/drivers/panfrost/pan_context.h b/src/gallium/drivers/panfrost/pan_context.h
index c234a7a3dc9..ac28f53da45 100644
--- a/src/gallium/drivers/panfrost/pan_context.h
+++ b/src/gallium/drivers/panfrost/pan_context.h
@@ -202,6 +202,12 @@ struct panfrost_context {
 
         struct panfrost_blend_state *blend;
 
+        /* On Valhall, does the current blend state use a blend shader for any
+         * output? We need this information in a hot path to decide if
+         * per-sample shading should be enabled.
+         */
+        bool valhall_has_blend_shader;
+
         struct pipe_viewport_state pipe_viewport;
         struct pipe_scissor_state scissor;
         struct pipe_blend_color blend_color;



More information about the mesa-commit mailing list