Commit 4c35bc7e authored by Duncan Hopkins's avatar Duncan Hopkins Committed by Marge Bot
Browse files

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 's avatarErik Faye-Lund <erik.faye-lund@collabora.com>
Tested-by: Marge Bot <mesa/mesa!4212>
Part-of: <mesa/mesa!4212>
parent c923de68
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment