Mesa (main): panfrost: Initialise the blend equation in create_blend_state

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jul 14 01:44:58 UTC 2021


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

Author: Icecream95 <ixn at disroot.org>
Date:   Wed Jul 14 12:04:42 2021 +1200

panfrost: Initialise the blend equation in create_blend_state

Valgrind still complains about uninitialised values, but tests don't
flake anymore.

Fixes flakes in dEQP-GLES3.functional.fragment_out.*

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11862>

---

 src/gallium/drivers/panfrost/pan_cmdstream.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c
index db613d6f0de..d31a7466a9d 100644
--- a/src/gallium/drivers/panfrost/pan_cmdstream.c
+++ b/src/gallium/drivers/panfrost/pan_cmdstream.c
@@ -3596,7 +3596,7 @@ panfrost_create_blend_state(struct pipe_context *pipe,
         for (unsigned c = 0; c < so->pan.rt_count; ++c) {
                 unsigned g = blend->independent_blend_enable ? c : 0;
                 const struct pipe_rt_blend_state pipe = blend->rt[g];
-                struct pan_blend_equation equation;
+                struct pan_blend_equation equation = {0};
 
                 equation.color_mask = pipe.colormask;
                 equation.blend_enable = pipe.blend_enable;



More information about the mesa-commit mailing list