From 4c35bc7e612f806d2e8a8a7126ddcdf45597806a Mon Sep 17 00:00:00 2001 From: Duncan Hopkins Date: Thu, 12 Mar 2020 16:45:39 +0000 Subject: [PATCH] zink: zero out zink_render_pass_state Since zink_render_pass_state is used as a hash-key, the entire struct gets compared. This means we don't want any uninitialized padding in there, or else we risk getting false negatives. This has led to issues on macOS builds. So let's zero out the struct before we start filling it out. Reviewed-by: Erik Faye-Lund Tested-by: Marge Bot Part-of: --- src/gallium/drivers/zink/zink_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index 0580d234fec..e4343244894 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -484,7 +484,7 @@ get_render_pass(struct zink_context *ctx) { struct zink_screen *screen = zink_screen(ctx->base.screen); const struct pipe_framebuffer_state *fb = &ctx->fb_state; - struct zink_render_pass_state state; + struct zink_render_pass_state state = { 0 }; for (int i = 0; i < fb->nr_cbufs; i++) { struct pipe_resource *res = fb->cbufs[i]->texture; -- 2.30.2