panfrost: Ensure final.no_colour is initialized.
authorVinson Lee <vlee@freedesktop.org>
Sat, 23 May 2020 01:34:34 +0000 (18:34 -0700)
committerMarge Bot <eric+marge@anholt.net>
Sat, 23 May 2020 21:00:52 +0000 (21:00 +0000)
Fix warning reported by Coverity Scan.

Uninitialized scalar variable (UNINIT)
uninit_use: Using uninitialized value final. Field final.no_colour is
uninitialized.

Fixes: 3e4e849e6a96 ("panfrost: Disable tib read/write when colourmask = 0x0")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5183>

src/gallium/drivers/panfrost/pan_blend_cso.c

index a68a9911b5780b6eba5a2d049abf07e3098ebf31..518005c9f68916c7f5c5fec11c4831c468365d76 100644 (file)
@@ -265,6 +265,7 @@ panfrost_get_blend_for_context(struct panfrost_context *ctx, unsigned rti, struc
         struct panfrost_blend_shader *shader = panfrost_get_blend_shader(ctx, blend, fmt, rti);
         final.is_shader = true;
         final.no_blending = false;
+        final.no_colour = false;
         final.shader.work_count = shader->work_count;
         final.shader.first_tag = shader->first_tag;